@kungfu-tech/buildchain 4.0.1-alpha.3 → 4.0.1-alpha.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 (95) hide show
  1. package/architecture/decisions/0002-next-development-transition.md +101 -0
  2. package/architecture/internal-capabilities.json +52 -3
  3. package/architecture/maintainability-policy.json +22 -10
  4. package/architecture/v3-core-mechanism-inventory.json +89 -0
  5. package/architecture/v4-capability-state-machine-manifest.json +73 -0
  6. package/architecture/v4-compatibility-facts-parity.json +77 -0
  7. package/architecture/v4-delivery-warrant-shadow-fixtures.json +15 -6
  8. package/architecture/v4-next-development-parity.json +192 -0
  9. package/architecture/v4-release-train-parity.json +1 -0
  10. package/architecture/v4-tail-reseal-parity.json +150 -0
  11. package/bin/buildchain.mjs +16 -1
  12. package/bin/internal/command-registry.mjs +2 -0
  13. package/bin/internal/compatibility-facts-cli.mjs +101 -0
  14. package/contracts/fixtures/next-development-transition-v1/anchored-manual-waiting.json +47 -0
  15. package/contracts/fixtures/next-development-transition-v1/semver-auto-planned.json +47 -0
  16. package/contracts/fixtures/next-development-transition-v1/version-model-cases.json +40 -0
  17. package/contracts/fixtures/v4-compatibility-facts-v1/shared.json +1129 -0
  18. package/contracts/fixtures/v4-floating-consumer-policy-v1/cases.json +7 -1
  19. package/contracts/fixtures/v4-tail-reseal-v1/valid.json +229 -0
  20. package/contracts/next-development-request-v1.schema.json +66 -0
  21. package/contracts/next-development-transition-v1.schema.json +292 -0
  22. package/contracts/v4-compatibility-facts-v1.schema.json +230 -0
  23. package/contracts/v4-tail-reseal-v1.schema.json +276 -0
  24. package/dist/site/agent-index.json +1 -0
  25. package/dist/site/artifact-schemas.json +2 -0
  26. package/dist/site/buildchain-contract.json +1388 -23
  27. package/dist/site/buildchain-site.json +259 -21
  28. package/dist/site/capability-registry.json +10 -8
  29. package/dist/site/cli-registry.json +106 -0
  30. package/dist/site/kfd-claims.json +187 -12
  31. package/dist/site/kfd-upstream-aggregate.json +1 -1
  32. package/dist/site/manual-registry.json +35 -4
  33. package/dist/site/node-api-registry.json +6578 -4492
  34. package/dist/site/page-registry.json +235 -13
  35. package/dist/site/public-surface-audit.json +241 -7
  36. package/dist/site/publication-authority-registry.json +6 -1
  37. package/dist/site/publication-registry.json +4 -4
  38. package/dist/site/release-provenance.json +7 -0
  39. package/dist/site/schemas/v4-compatibility-facts-v1.schema.json +230 -0
  40. package/dist/site/site-manifest.json +24 -8
  41. package/dist/site/workflow-registry.json +36 -4
  42. package/docs/MAP.md +4 -1
  43. package/docs/cli-reference.md +125 -0
  44. package/docs/dev-alpha-candidate-patrol.md +8 -0
  45. package/docs/dev-delivery-warrant.md +8 -4
  46. package/docs/next-development-transition.md +118 -0
  47. package/docs/node-api-reference.md +256 -123
  48. package/docs/v4-compatibility-facts.md +91 -0
  49. package/docs/v4-tail-reseal.md +73 -0
  50. package/docs/versioning.md +4 -3
  51. package/package.json +14 -5
  52. package/packages/core/buildchain-agent-manuals.js +2 -0
  53. package/packages/core/buildchain-compatibility-authority.js +336 -0
  54. package/packages/core/buildchain-compatibility-fact.js +394 -0
  55. package/packages/core/buildchain-compatibility-facts.json +217 -0
  56. package/packages/core/buildchain-compatibility-proof.js +566 -0
  57. package/packages/core/buildchain-contract.js +93 -141
  58. package/packages/core/channel-candidate.js +8 -0
  59. package/packages/core/channel-promotion-baseline.js +55 -0
  60. package/packages/core/dev-alpha-candidate-selection.js +10 -2
  61. package/packages/core/dev-delivery-execution-transfer.js +21 -1
  62. package/packages/core/dev-delivery-process-boundary.js +19 -7
  63. package/packages/core/dev-delivery-provider-heartbeat.js +18 -6
  64. package/packages/core/dev-delivery-warrant-state.js +4 -5
  65. package/packages/core/dev-delivery-warrant.js +1 -0
  66. package/packages/core/kungfu-temporal-fact.js +557 -0
  67. package/packages/core/next-development-candidate-reservation.js +186 -0
  68. package/packages/core/next-development-controller.js +728 -0
  69. package/packages/core/next-development-projection.js +287 -0
  70. package/packages/core/next-development-transition.js +738 -0
  71. package/packages/core/paper-agent-entry.js +11 -5
  72. package/packages/core/paper.js +16 -5
  73. package/packages/core/v4-canonical-contracts.js +5 -0
  74. package/packages/core/v4-floating-consumer-policy.js +29 -9
  75. package/packages/core/v4-tail-reseal-contract.js +26 -0
  76. package/packages/core/v4-tail-reseal-github.js +178 -0
  77. package/packages/core/v4-tail-reseal-receipt.js +225 -0
  78. package/packages/core/v4-tail-reseal.js +594 -0
  79. package/scripts/buildchain-cli-help.mjs +20 -0
  80. package/scripts/check-inventory.mjs +11 -0
  81. package/scripts/check-v4-floating-consumer-policy-contract.mjs +1 -1
  82. package/scripts/dev-alpha-candidate-patrol.mjs +22 -1
  83. package/scripts/dev-pr-auto-merge.mjs +1 -1
  84. package/scripts/generate-next-development-guidance.mjs +49 -0
  85. package/scripts/generate-site-bundle.mjs +16 -3
  86. package/scripts/init-repo.mjs +22 -4
  87. package/scripts/next-development-self-dogfood-harness.mjs +460 -0
  88. package/scripts/next-development-self-dogfood.mjs +597 -0
  89. package/scripts/next-development-transition.mjs +47 -0
  90. package/scripts/release-train-self-dogfood.mjs +94 -92
  91. package/scripts/site-capability-metadata.mjs +12 -0
  92. package/scripts/v4-consumer-policy.mjs +1 -5
  93. package/scripts/v4-tail-reseal-macos-rehearsal.mjs +134 -0
  94. package/scripts/v4-tail-reseal.mjs +416 -0
  95. package/templates/native-dev-delivery.yml +2 -0
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
3
  "contract": "kungfu-buildchain-site-manifest",
4
- "generatedAt": "2026-08-15T19:57:44.433Z",
5
- "publishedAt": "2026-08-15T19:57:44.433Z",
4
+ "generatedAt": "2026-08-16T06:14:57.817Z",
5
+ "publishedAt": "2026-08-16T06:14:57.817Z",
6
6
  "reproducible": true,
7
7
  "timestampPolicy": "ci-injected",
8
8
  "deterministicInputs": [
@@ -19,7 +19,7 @@
19
19
  "declared Buildchain surface manifest contract"
20
20
  ],
21
21
  "sourceDateEpoch": "0",
22
- "sourceRevision": "cfc0256de1826e0e0ec4a4e55644c869f3286f91",
22
+ "sourceRevision": "358df2d1ab42465111896a42cde85dcca08549d5",
23
23
  "timestampPolicyDetails": {
24
24
  "contract": "kungfu-buildchain-surface-timestamp-policy",
25
25
  "timestampFields": [
@@ -37,7 +37,7 @@
37
37
  },
38
38
  "package": {
39
39
  "name": "@kungfu-tech/buildchain",
40
- "version": "4.0.1-alpha.3",
40
+ "version": "4.0.1-alpha.5",
41
41
  "versionSource": "package.json#version"
42
42
  },
43
43
  "entrypoint": "buildchain-site.json",
@@ -53,7 +53,7 @@
53
53
  "path": "docs/MAP.md",
54
54
  "plane": "use",
55
55
  "exists": true,
56
- "digest": "sha256:16120e34c1a178b00309887d7903c2c8acb95815326091cf46a608d375435b99"
56
+ "digest": "sha256:fd63caf537bdc0dc2a220688dcb89534f6f84f6223e8c45f399a7d1bb8f8faf8"
57
57
  },
58
58
  {
59
59
  "id": "getting-started",
@@ -135,6 +135,14 @@
135
135
  "exists": true,
136
136
  "digest": "sha256:6989ada03d381e68fdec55b26b76b2070fb37969826eadc0a989844a732ba557"
137
137
  },
138
+ {
139
+ "id": "next-development-transition",
140
+ "title": "Next-development transition",
141
+ "path": "docs/next-development-transition.md",
142
+ "plane": "verify",
143
+ "exists": true,
144
+ "digest": "sha256:c33c017ae163650b422f7ec294a05f3db8b8e99b87c55ab2d8ac3cce1726448f"
145
+ },
138
146
  {
139
147
  "id": "release-propagation",
140
148
  "title": "Release propagation",
@@ -237,7 +245,7 @@
237
245
  "path": "docs/cli-reference.md",
238
246
  "plane": "use",
239
247
  "exists": true,
240
- "digest": "sha256:82b5d7afa63fc4cfa29ffb813f1830b30eeee3d9b0da821f77240a9ddb25584e"
248
+ "digest": "sha256:157d6259dd8f884833f7065f52bff0d482878eca72623dcc607e4204692e4970"
241
249
  },
242
250
  {
243
251
  "id": "node-api-reference",
@@ -245,7 +253,7 @@
245
253
  "path": "docs/node-api-reference.md",
246
254
  "plane": "use",
247
255
  "exists": true,
248
- "digest": "sha256:8f0c42d4453003d9bff861392c890f557a54608662e1cc380ed9aaa6635df016"
256
+ "digest": "sha256:34a2feafe2f6183afbc0a72fa6362d39db6968c2bac187a1a1dd376d7ca50e50"
249
257
  },
250
258
  {
251
259
  "id": "build-facts",
@@ -319,6 +327,14 @@
319
327
  "exists": true,
320
328
  "digest": "sha256:6dfe8a9b974040fc1465b0da696519b4e97b0b901e30d852ffacda0d193810af"
321
329
  },
330
+ {
331
+ "id": "v4-compatibility-facts",
332
+ "title": "Buildchain v4 compatibility Facts",
333
+ "path": "docs/v4-compatibility-facts.md",
334
+ "plane": "verify",
335
+ "exists": true,
336
+ "digest": "sha256:d29c904a17aca0ca3ad4f48a826f530610d77ffca8bde76ef7e5b4c245c2ca47"
337
+ },
322
338
  {
323
339
  "id": "release-flow",
324
340
  "title": "Release flow",
@@ -341,7 +357,7 @@
341
357
  "path": "docs/versioning.md",
342
358
  "plane": "why",
343
359
  "exists": true,
344
- "digest": "sha256:fa094ca11fe51b2f23b2154523414676d6f8c8fa50493c5027a469da9115a414"
360
+ "digest": "sha256:a2fc36e62ac3adfa0dd499972f22cad22131ccc526e11e890e2cbdc4d3a31341"
345
361
  },
346
362
  {
347
363
  "id": "web-surface-deployments",
@@ -2006,7 +2006,7 @@
2006
2006
  "status": "preview",
2007
2007
  "owner": "buildchain-workflows",
2008
2008
  "maturity": "preview",
2009
- "introducedVersion": "4.0.1-alpha.3",
2009
+ "introducedVersion": "4.0.1-alpha.5",
2010
2010
  "compatibilityPromise": "preserved-through-the-v3-major-line",
2011
2011
  "deprecationReplacement": "",
2012
2012
  "sunsetCondition": "explicit-breaking-change-review-in-a-future-major-line",
@@ -2027,7 +2027,7 @@
2027
2027
  "status": "preview",
2028
2028
  "owner": "buildchain-workflows",
2029
2029
  "maturity": "preview",
2030
- "introducedVersion": "4.0.1-alpha.3",
2030
+ "introducedVersion": "4.0.1-alpha.5",
2031
2031
  "compatibilityPromise": "preserved-through-the-v3-major-line",
2032
2032
  "deprecationReplacement": "",
2033
2033
  "sunsetCondition": "explicit-breaking-change-review-in-a-future-major-line",
@@ -2048,7 +2048,7 @@
2048
2048
  "status": "preview",
2049
2049
  "owner": "buildchain-workflows",
2050
2050
  "maturity": "preview",
2051
- "introducedVersion": "4.0.1-alpha.3",
2051
+ "introducedVersion": "4.0.1-alpha.5",
2052
2052
  "compatibilityPromise": "preserved-through-the-v3-major-line",
2053
2053
  "deprecationReplacement": "",
2054
2054
  "sunsetCondition": "explicit-breaking-change-review-in-a-future-major-line",
@@ -2098,7 +2098,7 @@
2098
2098
  "status": "preview",
2099
2099
  "owner": "buildchain-workflows",
2100
2100
  "maturity": "preview",
2101
- "introducedVersion": "4.0.1-alpha.3",
2101
+ "introducedVersion": "4.0.1-alpha.5",
2102
2102
  "compatibilityPromise": "preserved-through-the-v3-major-line",
2103
2103
  "deprecationReplacement": "",
2104
2104
  "sunsetCondition": "explicit-breaking-change-review-in-a-future-major-line",
@@ -3029,6 +3029,38 @@
3029
3029
  "sunsetCondition": "explicit-breaking-change-review-in-a-future-major-line",
3030
3030
  "nonDuplicationRationale": "Existing workflow identity retained for caller compatibility and repository orchestration."
3031
3031
  },
3032
+ {
3033
+ "id": "v4-tail-reseal",
3034
+ "path": ".github/workflows/v4-tail-reseal.yml",
3035
+ "reusable": true,
3036
+ "inputs": [
3037
+ "artifact-retention-days",
3038
+ "consumer-policy-receipt-json",
3039
+ "macos-finalization-command",
3040
+ "request-json"
3041
+ ],
3042
+ "inputCount": 4,
3043
+ "secrets": [
3044
+ "BUILDCHAIN_EVIDENCE_READ_TOKEN",
3045
+ "BUILDCHAIN_SIGNING_TOKEN"
3046
+ ],
3047
+ "secretCount": 2,
3048
+ "outputs": [
3049
+ "release-candidate-passport-json",
3050
+ "tail-reseal-receipt-root"
3051
+ ],
3052
+ "outputCount": 2,
3053
+ "surface": "repository-workflow",
3054
+ "capabilityGroup": "api-cli-reference",
3055
+ "status": "active",
3056
+ "owner": "buildchain-workflows",
3057
+ "maturity": "active",
3058
+ "introducedVersion": "pre-3.0.2-alpha.4",
3059
+ "compatibilityPromise": "preserved-through-the-v3-major-line",
3060
+ "deprecationReplacement": "",
3061
+ "sunsetCondition": "explicit-breaking-change-review-in-a-future-major-line",
3062
+ "nonDuplicationRationale": "Existing workflow identity retained for caller compatibility and repository orchestration."
3063
+ },
3032
3064
  {
3033
3065
  "id": "verify",
3034
3066
  "path": ".github/workflows/verify.yml",
package/docs/MAP.md CHANGED
@@ -66,7 +66,7 @@ workflow, action, and Node API export also carries a `capabilityGroup`,
66
66
  | Publication Artifacts | `publication-registry.json`, `workflow-registry.json`, `node-api-registry.json`, `manual-registry.json`, `kungfu-buildchain-publication-artifact-registry` | [`publication-artifacts.md`](publication-artifacts.md), [`reusable-build-surface.md`](reusable-build-surface.md) |
67
67
  | Distribution Indexes and Badges | `badge-endpoint-registry.json`, `node-api-registry.json`, `manual-registry.json` | [`readme-badges.md`](readme-badges.md), [`homebrew.md`](homebrew.md) |
68
68
  | Build Facts, Observability, and Diagnostics | `cli-registry.json`, `node-api-registry.json`, lifecycle artifacts | [`build-facts.md`](build-facts.md), [`toolkit-observability.md`](toolkit-observability.md), [`consumer-issue-reporting.md`](consumer-issue-reporting.md) |
69
- | Governance, Versioning, and Runtime Drift | `buildchain-contract.json`, `workflow-registry.json`, `release-model.json` | [`github-governance-authority.md`](github-governance-authority.md), [`release-governance.md`](release-governance.md), [`release-flow.md`](release-flow.md), [`versioning.md`](versioning.md), [`runtime-train-validation.md`](runtime-train-validation.md), [`cli.md`](cli.md) |
69
+ | Governance, Versioning, and Runtime Drift | `buildchain-contract.json`, `workflow-registry.json`, `release-model.json`, `schemas/v4-compatibility-facts-v1.schema.json` | [`v4-compatibility-facts.md`](v4-compatibility-facts.md), [`github-governance-authority.md`](github-governance-authority.md), [`release-governance.md`](release-governance.md), [`release-flow.md`](release-flow.md), [`next-development-transition.md`](next-development-transition.md), [`versioning.md`](versioning.md), [`runtime-train-validation.md`](runtime-train-validation.md), [`cli.md`](cli.md) |
70
70
  | CLI and Node API Reference | `cli-registry.json`, `node-api-registry.json`, `workflow-registry.json`, `manual-registry.json` | [`cli-reference.md`](cli-reference.md), [`node-api-reference.md`](node-api-reference.md), [`cli.md`](cli.md), [`../packages/core/README.md`](../packages/core/README.md) |
71
71
 
72
72
  | Capability | Machine-readable entry | Manual entry |
@@ -80,6 +80,7 @@ workflow, action, and Node API export also carries a `capabilityGroup`,
80
80
  | KFD-1 / KFD-2 / KFD-3 first-class CLI and Node API | `.buildchain/kfd/kfd-3/surfaces.json`, `dist/site/kfd-claims.json`, `buildchain.release.json`, KFD schemas from `@kungfu-tech/kfd` | [`kfd-support.md`](kfd-support.md), [`cli.md`](cli.md#commands) |
81
81
  | Declarative KFD Agent Hub adapter conformance and Passport evidence | `.buildchain/kfd/agent-hub.json`, `.buildchain/artifacts/kfd-agent-hub/evidence.json`, `buildchain.release.json#kfdAgentHub` | [`kfd-agent-hub.md`](kfd-agent-hub.md) |
82
82
  | Floating `@v3` drift detection and compatibility issues | `dist/site/buildchain-contract.json` | [`reusable-build-surface.md`](reusable-build-surface.md#floating-ref-contract-lock) |
83
+ | Directional, Cut-bound v4 contract compatibility and legacy digest projections | `dist/site/buildchain-contract.json`, `dist/site/schemas/v4-compatibility-facts-v1.schema.json` | [`v4-compatibility-facts.md`](v4-compatibility-facts.md) |
83
84
  | npm publish transactions, evidence, dist-tags, and recovery | `dist/site/release-model.json`, `dist/site/artifact-schemas.json` | [`publish-transaction.md`](publish-transaction.md) |
84
85
  | Git/source/version/module/product build facts | `dist/site/node-api-registry.json`, `dist/site/cli-registry.json`, `kungfu-buildchain-module-build-facts`, `kungfu-buildchain-product-build-facts` | [`build-facts.md`](build-facts.md) |
85
86
  | GitHub Release passport/evidence publication | `dist/site/release-model.json`, `dist/site/artifact-schemas.json` | [`release-governance.md`](release-governance.md), [`release-candidate.md`](release-candidate.md) |
@@ -114,6 +115,7 @@ replace them.
114
115
  | What exact canonical bytes, roots, clocks, event, receipt, and typed-fault contracts do Rust and JavaScript share in v4? | [`v4-canonical-contracts.md`](v4-canonical-contracts.md) | use/verify | preview |
115
116
  | How is one per-platform v4 build stage identified, retained, observed, and reused without provider identity or a second writer? | [`v4-stage-capsule.md`](v4-stage-capsule.md) | use/verify | preview |
116
117
  | How does a late platform failure deterministically reuse qualified Stage Capsules and rebuild only invalid or missing dependencies? | [`v4-stage-capsule.md`](v4-stage-capsule.md#deterministic-resume-planning) | use/verify | preview |
118
+ | How does a late macOS signing failure reuse an exact retained v4 Alpha candidate and rerun only the fenced release tail? | [`v4-tail-reseal.md`](v4-tail-reseal.md) | use/verify | preview |
117
119
  | How do Rust and JavaScript read the same retained Delivery Warrant traces and emit one semantic projection? | [`v4-canonical-contracts.md`](v4-canonical-contracts.md#shared-delivery-warrant-fixture-runner) | use/verify | preview |
118
120
  | How does an explicit caller try the qualified v4 read projection and roll back without moving v3 writer authority? | [`v4-delivery-warrant-read-candidate.md`](v4-delivery-warrant-read-candidate.md) | use/verify | preview |
119
121
  | How do protected dev branches and scheduled ready-PR merging work? | [`release-governance.md`](release-governance.md#protected-dev-branches) | use | stable |
@@ -125,6 +127,7 @@ replace them.
125
127
  | How do I report or safely apply branch and pull-request engineering hygiene? | [`engineering-housekeeper.md`](engineering-housekeeper.md) | use/verify | preview |
126
128
  | How does Buildchain decide patch, minor, and major release lines? | [`versioning.md`](versioning.md) | why | stable |
127
129
  | What exact branch/tag state machine runs on alpha, release, and major gate? | [`release-flow.md`](release-flow.md) | verify | stable |
130
+ | How does a completed Alpha remain successful while the following development version is prepared? | [`next-development-transition.md`](next-development-transition.md), [`../architecture/decisions/0002-next-development-transition.md`](../architecture/decisions/0002-next-development-transition.md) | verify/use | preview |
128
131
  | What did Buildchain migrate or retire from old action repositories? | [`migration-inventory.md`](migration-inventory.md) | verify | stable |
129
132
  | What is the active action and workflow source of truth? | [`ownership.md`](ownership.md) | verify | stable |
130
133
  | How do I declare version files and custom lifecycle commands? | [`lifecycle-protocol.md`](lifecycle-protocol.md) | use | stable |
@@ -728,6 +728,50 @@ buildchain facts
728
728
  buildchain facts aggregate [--cwd <dir>] [--product <id>] [--module-fact <file>]... [--artifact <path>]... [--output <file>] [--json]
729
729
  ```
730
730
 
731
+ ### `buildchain facts compatibility project`
732
+
733
+ - Help: `buildchain facts compatibility project --help`
734
+ - Canonical id: `build-facts`
735
+ - Options: `--cwd`, `--json`, `--output`, `--registry`
736
+ - Syntax:
737
+
738
+ ```text
739
+ buildchain facts compatibility project [--cwd <dir>] [--registry <json-or-path>] [--output <file>] [--json]
740
+ ```
741
+
742
+ ### `buildchain facts compatibility query`
743
+
744
+ - Help: `buildchain facts compatibility query --help`
745
+ - Canonical id: `build-facts`
746
+ - Options: `--cwd`, `--json`, `--query`, `--registry`
747
+ - Syntax:
748
+
749
+ ```text
750
+ buildchain facts compatibility query --query <json-or-path> [--registry <json-or-path>] [--cwd <dir>] [--json]
751
+ ```
752
+
753
+ ### `buildchain facts compatibility query-template`
754
+
755
+ - Help: `buildchain facts compatibility query-template --help`
756
+ - Canonical id: `build-facts`
757
+ - Options: `--cwd`, `--fact-root`, `--json`, `--query-id`, `--registry`
758
+ - Syntax:
759
+
760
+ ```text
761
+ buildchain facts compatibility query-template --fact-root <sha256:...> [--query-id <id>] [--registry <json-or-path>] [--cwd <dir>] [--json]
762
+ ```
763
+
764
+ ### `buildchain facts compatibility verify`
765
+
766
+ - Help: `buildchain facts compatibility verify --help`
767
+ - Canonical id: `build-facts`
768
+ - Options: `--cwd`, `--json`, `--registry`
769
+ - Syntax:
770
+
771
+ ```text
772
+ buildchain facts compatibility verify [--cwd <dir>] [--registry <json-or-path>] [--json]
773
+ ```
774
+
731
775
  ### `buildchain facts module`
732
776
 
733
777
  - Help: `buildchain facts module --help`
@@ -1586,6 +1630,30 @@ buildchain log <info|warn|error> --event <name> [--phase <phase>] [--component <
1586
1630
  buildchain mark --event <name> [--phase <phase>] [--component <name>] [--attribute key=value]... [--path <jsonl>] [--json]
1587
1631
  ```
1588
1632
 
1633
+ ## `next-development`
1634
+
1635
+ ### `buildchain next-development`
1636
+
1637
+ - Help: `buildchain next-development --help`
1638
+ - Canonical id: `next-development`
1639
+ - Options: none declared
1640
+ - Syntax:
1641
+
1642
+ ```text
1643
+ buildchain next-development
1644
+ ```
1645
+
1646
+ ### `buildchain next-development materialize`
1647
+
1648
+ - Help: `buildchain next-development materialize --help`
1649
+ - Canonical id: `next-development`
1650
+ - Options: `--cwd`, `--input`, `--json`, `--output`, `--write`
1651
+ - Syntax:
1652
+
1653
+ ```text
1654
+ buildchain next-development materialize --input <request.json> [--cwd <dir>] [--write] [--output <path>] [--json]
1655
+ ```
1656
+
1589
1657
  ## `npm`
1590
1658
 
1591
1659
  ### `buildchain npm`
@@ -2237,6 +2305,63 @@ buildchain sample process-tree [--interval-ms <n>] [--label <name>] [--output <j
2237
2305
  buildchain span --event <name> [--phase <phase>] [--component <name>] [--path <jsonl>] -- <command> [args...]
2238
2306
  ```
2239
2307
 
2308
+ ## `tail-reseal`
2309
+
2310
+ ### `buildchain tail-reseal`
2311
+
2312
+ - Help: `buildchain tail-reseal --help`
2313
+ - Canonical id: `tail-reseal`
2314
+ - Options: none declared
2315
+ - Syntax:
2316
+
2317
+ ```text
2318
+ buildchain tail-reseal
2319
+ ```
2320
+
2321
+ ### `buildchain tail-reseal admit`
2322
+
2323
+ - Help: `buildchain tail-reseal admit --help`
2324
+ - Canonical id: `tail-reseal`
2325
+ - Options: `--output`, `--request`
2326
+ - Syntax:
2327
+
2328
+ ```text
2329
+ buildchain tail-reseal admit --request <request.json> [--output <admission.json>]
2330
+ ```
2331
+
2332
+ ### `buildchain tail-reseal plan`
2333
+
2334
+ - Help: `buildchain tail-reseal plan --help`
2335
+ - Canonical id: `tail-reseal`
2336
+ - Options: `--output`, `--request`
2337
+ - Syntax:
2338
+
2339
+ ```text
2340
+ buildchain tail-reseal plan --request <request.json> [--output <plan.json>]
2341
+ ```
2342
+
2343
+ ### `buildchain tail-reseal seal`
2344
+
2345
+ - Help: `buildchain tail-reseal seal --help`
2346
+ - Canonical id: `tail-reseal`
2347
+ - Options: `--output`, `--passport`, `--plan`, `--protected-readback-root`, `--readbacks`, `--request`
2348
+ - Syntax:
2349
+
2350
+ ```text
2351
+ buildchain tail-reseal seal --request <request.json> --plan <plan.json> --readbacks <dir> --passport <passport.json> --protected-readback-root <sha256:...> [--output <receipt.json>]
2352
+ ```
2353
+
2354
+ ### `buildchain tail-reseal verify-platform`
2355
+
2356
+ - Help: `buildchain tail-reseal verify-platform --help`
2357
+ - Canonical id: `tail-reseal`
2358
+ - Options: `--artifact-root`, `--mode`, `--output`, `--platform`, `--provider-readback-root`, `--request`
2359
+ - Syntax:
2360
+
2361
+ ```text
2362
+ buildchain tail-reseal verify-platform --request <request.json> --platform <id> [--artifact-root <dir>] [--mode retained|resealed] [--provider-readback-root <sha256:...>] [--output <readback.json>]
2363
+ ```
2364
+
2240
2365
  ## `transaction`
2241
2366
 
2242
2367
  ### `buildchain transaction`
@@ -59,6 +59,14 @@ controller then compares the selected SHA to the exact Alpha head before it can
59
59
  be eligible, so a bounded scan cannot turn a commit outside the promotion
60
60
  ancestry into a candidate.
61
61
 
62
+ Generated next-development version preparation is not a product candidate. The
63
+ observer skips both the signed `chore(release): prepare ...` commit and its
64
+ two-parent integration commit. When later product work becomes qualified, the
65
+ nearest preparation becomes a reservation: Patrol reads every path changed by
66
+ that preparation at both exact SHAs and requires identical Git blob identities.
67
+ A missing or stale reserved path blocks selection before the Release Cut and
68
+ therefore before any heavy candidate build.
69
+
62
70
  The decision is `kungfu-buildchain-channel-candidate-decision/v1`. It records the
63
71
  source and target branches and SHAs, comparison distance, workflow paths, run
64
72
  identities and attempts, completion times, URLs, policy, and a canonical decision
@@ -383,8 +383,10 @@ The reusable `dev-pr-auto-merge.yml` supports three explicit rollout modes:
383
383
  The shipped Buildchain caller and native template configure this handoff path
384
384
  and accept the same complete input contract. A historical phase-less owner
385
385
  uses the distinct `legacy-phase-less-active-owner` command path. That path
386
- carries the exact queue state root, fencing token, generation, PR, head, and
387
- source-run binding, omits `environment-root`, `native-command`, and
386
+ carries the exact queue state root observed before its duplicate submission,
387
+ fencing token, generation, PR, head, and source-run binding. The submission
388
+ receipt proves that pre-transition root even though the queue transition
389
+ advances the current state root. The path omits `environment-root`, `native-command`, and
388
390
  `native-command-root`, and rejects readback drift. It therefore resumes the
389
391
  historical non-native authority without inventing a native command contract
390
392
  or upgrading the owner to native proof authority.
@@ -471,8 +473,10 @@ consumer workflow. It supports both explicit dispatch and the bounded wake
471
473
  event, calls the allowed floating `@v4-alpha` selector, explicitly passes the v4
472
474
  runtime ref that locks every delivery job to the same checkout, and keeps the
473
475
  native command in the consumer repository rather than inventing
474
- provider-specific shards. The reusable workflow defaults that explicit input
475
- to `v4-alpha`; an empty input or any v3 selector fails before the first runtime
476
+ provider-specific shards. Both callers explicitly bind the queue-admission
477
+ and active-lease status contexts so write/readback fencing uses the same exact
478
+ names. The reusable workflow defaults the explicit runtime input to
479
+ `v4-alpha`; an empty input or any v3 selector fails before the first runtime
476
480
  checkout.
477
481
 
478
482
  This mechanism schedules protected delivery only. It does not serialize local
@@ -0,0 +1,118 @@
1
+ ---
2
+ status: preview
3
+ period: ongoing
4
+ theme: next-development-transition
5
+ doc_type: generated-contract-guidance
6
+ source_level: generated-from-node-contract
7
+ confidence: high
8
+ sensitivity: public
9
+ evidence_grade: A
10
+ review_state: self-reviewed
11
+ last_reviewed: 2026-08-11
12
+ ---
13
+
14
+ # Next-development Transition
15
+
16
+ This document is generated from
17
+ `packages/core/next-development-transition.js` and
18
+ `packages/core/next-development-controller.js` and
19
+ `packages/core/next-development-projection.js`. Edit those sources and run
20
+ `node scripts/generate-next-development-guidance.mjs`; direct edits fail the
21
+ projection drift check.
22
+
23
+ ## Contract
24
+
25
+ - Contract: `kungfu-buildchain-next-development-transition/v1`
26
+ - Durable controller: `kungfu-buildchain-next-development-controller/v1`
27
+ - ADR: [ADR 0002](../architecture/decisions/0002-next-development-transition.md)
28
+ - States: `planned`, `waiting-anchor`, `materialized`, `pr-pending`, `merged`, `verified`
29
+ - Legal version models: `semver/auto` and `anchored/manual`
30
+ - Invariant: A completed Alpha remains successful and its refs remain immutable while the next-development transition is incomplete.
31
+
32
+ An Alpha publication is terminal success independently of this transition.
33
+ The idempotency key is a deterministic hash of the completed-Alpha root,
34
+ repository, legal model, and sorted declared paths. Incomplete Dev preparation
35
+ therefore cannot relabel Alpha N as failed, and replay cannot select a different
36
+ Alpha or path set.
37
+
38
+ ## Durable controller
39
+
40
+ `scheduleNextDevelopmentController` atomically creates one child for the
41
+ repository and completed-Alpha root. Identical wakes reuse it. The store
42
+ boundary requires read, create-if-absent, and compare-and-swap operations; the
43
+ controller root fences every checkpoint. Materialization uses an operation key
44
+ derived from the child, exact current protected Dev SHA, and reviewed target,
45
+ so a fresh runner can recover an already-created commit instead of rebuilding
46
+ the Alpha candidate or depending on the original runner workspace.
47
+
48
+ Before opening the protected version PR, the controller reads Dev again. A
49
+ moved head makes the prepared attempt `superseded`; the following wake
50
+ regenerates only declared version material from that latest SHA. After merge,
51
+ `verified` remains unreachable until protected Dev readback contains the
52
+ prepared commit and its target version, source roots, and derived roots exactly
53
+ match the checkpoint. The executor surface contains no Alpha publication, tag,
54
+ release, or package operation.
55
+
56
+ Alpha finalization no longer treats a non-fast-forward Dev update as successful
57
+ bookkeeping. It requires an exact checkout of the current Dev head, regenerates
58
+ the declared version lifecycle there, and uses a non-force merge or reusable
59
+ protected version PR. Candidate Patrol ignores both the generated preparation
60
+ commit and its two-parent integration commit. Before a later product candidate
61
+ can settle, Patrol reads every prepared version path at the candidate SHA and
62
+ requires the exact reserved blob identities; missing or stale state blocks
63
+ before a Release Cut or heavy candidate build.
64
+
65
+ ## Version models
66
+
67
+ `semver/auto` increments the Alpha sequence on the same semantic patch. For
68
+ example, completed `1.4.2-alpha.7` plans `1.4.2-alpha.8`. It must not accept an anchor or an
69
+ operator-selected target.
70
+
71
+ `anchored/manual` enters `waiting-anchor` until the caller provides both a
72
+ semantic target and the exact digest of the configured anchor manifest. The
73
+ adapter verifies the manifest already present in the checkout; it never invents
74
+ or edits upstream anchor facts. `semver/manual` and `anchored/auto` are
75
+ invalid.
76
+
77
+ ## Public self-dogfood and adoption
78
+
79
+ `.github/workflows/v4-public-consumer-dogfood.yml` remains the exact thin
80
+ consumer of the public `v4-stage-capsule-canary.yml@v4-alpha` contract. Its
81
+ declared `lifecycle.verify` runs `pnpm run check`, so the same public path
82
+ executes pure recovery tests that inject a transient durable-state write
83
+ failure, restore the adapter operation on a fresh runner, supersede stale work
84
+ when protected Dev moves, preserve `pr-pending` during protected-PR delay, and
85
+ prove both legal version models. No caller-local qualification job, action,
86
+ or private self-dogfood route is added.
87
+
88
+ The existing dual-channel self-consumer separately retains exact hosted
89
+ `build.yml@v4-alpha` and `build.yml@v4` runtime evidence. Consumers adopt
90
+ the proved contract through the floating v4 coordinates; exact resolved SHAs
91
+ remain audit evidence and never become durable selectors.
92
+
93
+ ## Local adapter
94
+
95
+ From a normal Buildchain checkout:
96
+
97
+ ```sh
98
+ node scripts/next-development-transition.mjs materialize --cwd . --input <request.json>
99
+ ```
100
+
101
+ The command prints a rooted plan and performs no write by default. `--write`
102
+ may change only regular, non-symlink source files listed by `version.files`
103
+ in the loaded Buildchain config. The rooted adapter contract separately names
104
+ `version.derived_files` as allowed changes, `version.manifest` as read-only,
105
+ `BUILDCHAIN_VERSION` as the target input, `lifecycle.version-state` as the
106
+ derived-material stage, and `lifecycle.verify` as the truth gate. The
107
+ reference writer fails closed when derived files exist because transaction
108
+ execution is outside this contract slice. It performs no Git operation, ref
109
+ update, network request, provider call, lifecycle command, or anchor edit.
110
+
111
+ Preparing development state creates no tag, Release, public package, or
112
+ candidate. Those public effects remain outside the local adapter contract.
113
+
114
+ The request schema is
115
+ `contracts/next-development-request-v1.schema.json`; the durable record schema
116
+ is `contracts/next-development-transition-v1.schema.json`. Positive and
117
+ negative examples live under
118
+ `contracts/fixtures/next-development-transition-v1/`.