@kungfu-tech/buildchain 2.12.0 → 2.12.1-alpha.10

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 (42) hide show
  1. package/bin/buildchain.mjs +18 -0
  2. package/dist/site/buildchain-contract.json +8 -8
  3. package/dist/site/buildchain-site.json +92 -26
  4. package/dist/site/capability-registry.json +5 -5
  5. package/dist/site/cli-registry.json +12 -0
  6. package/dist/site/kfd-claims.json +182 -14
  7. package/dist/site/kfd-upstream-aggregate.json +1 -1
  8. package/dist/site/manual-registry.json +8 -7
  9. package/dist/site/node-api-registry.json +20 -7
  10. package/dist/site/page-registry.json +81 -15
  11. package/dist/site/public-surface-audit.json +95 -10
  12. package/dist/site/publication-registry.json +4 -4
  13. package/dist/site/release-provenance.json +1 -0
  14. package/dist/site/site-manifest.json +11 -11
  15. package/dist/site/workflow-registry.json +68 -3
  16. package/docs/MAP.md +3 -0
  17. package/docs/binary-distribution.md +20 -1
  18. package/docs/cli.md +17 -0
  19. package/docs/kfd-support.md +44 -1
  20. package/docs/lifecycle-protocol.md +12 -0
  21. package/docs/release-governance.md +23 -0
  22. package/docs/reusable-build-surface.md +69 -0
  23. package/docs/stable-candidate-patrol.md +188 -0
  24. package/package.json +3 -1
  25. package/packages/core/buildchain-config.js +58 -0
  26. package/packages/core/buildchain-kfd-claims.js +51 -2
  27. package/packages/core/buildchain-layout.js +46 -0
  28. package/packages/core/index.js +19 -0
  29. package/packages/core/kfd3-surface-register.js +59 -2
  30. package/packages/core/stable-candidate-ledger.js +276 -0
  31. package/scripts/build-standalone-binary.mjs +2 -1
  32. package/scripts/check-inventory.mjs +4 -1
  33. package/scripts/generate-site-bundle.mjs +9 -1
  34. package/scripts/init-repo.mjs +1 -1
  35. package/scripts/locked-source-checkout.mjs +52 -12
  36. package/scripts/npm-publish-dry-run.mjs +1 -1
  37. package/scripts/publication-artifact.mjs +1 -1
  38. package/scripts/publication-package.mjs +1 -1
  39. package/scripts/release-propagation.mjs +1 -1
  40. package/scripts/stable-candidate-patrol.mjs +448 -0
  41. package/scripts/stable-candidate-policy.mjs +25 -0
  42. package/scripts/stable-candidate-qualification.mjs +239 -0
@@ -3,11 +3,11 @@
3
3
  "contract": "kungfu-buildchain-public-surface-reverse-audit",
4
4
  "status": "passed",
5
5
  "summary": {
6
- "cliCommandCount": 75,
7
- "workflowCount": 39,
6
+ "cliCommandCount": 76,
7
+ "workflowCount": 42,
8
8
  "actionCount": 4,
9
- "sitePageCount": 45,
10
- "docCommandRefCount": 237,
9
+ "sitePageCount": 46,
10
+ "docCommandRefCount": 241,
11
11
  "failureCount": 0
12
12
  },
13
13
  "enumerated": {
@@ -257,6 +257,11 @@
257
257
  "source": "bin/buildchain.mjs",
258
258
  "usage": "buildchain kfd upstream roles [--json]"
259
259
  },
260
+ {
261
+ "id": "layout",
262
+ "source": "bin/buildchain.mjs",
263
+ "usage": "buildchain layout [--cwd <dir>] [--json]"
264
+ },
260
265
  {
261
266
  "id": "lifecycle",
262
267
  "source": "bin/buildchain.mjs",
@@ -411,6 +416,7 @@
411
416
  "buildchain-contract-lock-path",
412
417
  "buildchain-ref",
413
418
  "buildchain-repository",
419
+ "cargo-registry-index",
414
420
  "checkout-cache-fallback",
415
421
  "checkout-cache-fetch-attempts",
416
422
  "checkout-cache-github-timeout-seconds",
@@ -438,13 +444,19 @@
438
444
  "require-trusted-event",
439
445
  "require-verify",
440
446
  "runner-preset",
447
+ "rust-toolchain",
448
+ "rustup-dist-server",
449
+ "rustup-update-root",
441
450
  "sample-process-tree",
442
451
  "setup-node",
452
+ "setup-rust",
453
+ "shifu-cache-profile-digest",
454
+ "shifu-cache-profile-ref",
443
455
  "untrusted-policy",
444
456
  "verify-command",
445
457
  "working-directory"
446
458
  ],
447
- "inputCount": 50
459
+ "inputCount": 57
448
460
  },
449
461
  {
450
462
  "id": ".bump-minor-version",
@@ -709,6 +721,7 @@
709
721
  "buildchain-ref",
710
722
  "buildchain-repository",
711
723
  "buildchain-stable-contract-lock-path",
724
+ "cargo-registry-index",
712
725
  "checkout-cache-fallback",
713
726
  "checkout-cache-fetch-attempts",
714
727
  "checkout-cache-github-timeout-seconds",
@@ -736,13 +749,19 @@
736
749
  "require-trusted-event",
737
750
  "require-verify",
738
751
  "runner-preset",
752
+ "rust-toolchain",
753
+ "rustup-dist-server",
754
+ "rustup-update-root",
739
755
  "sample-process-tree",
740
756
  "setup-node",
757
+ "setup-rust",
758
+ "shifu-cache-profile-digest",
759
+ "shifu-cache-profile-ref",
741
760
  "untrusted-policy",
742
761
  "verify-command",
743
762
  "working-directory"
744
763
  ],
745
- "inputCount": 53
764
+ "inputCount": 60
746
765
  },
747
766
  {
748
767
  "id": "buildchain-alpha-self-dogfood",
@@ -809,6 +828,25 @@
809
828
  ],
810
829
  "inputCount": 3
811
830
  },
831
+ {
832
+ "id": "buildchain-stable-candidate-patrol",
833
+ "path": ".github/workflows/buildchain-stable-candidate-patrol.yml",
834
+ "inputs": [
835
+ "buildchain-ref",
836
+ "dry-run",
837
+ "release-now"
838
+ ],
839
+ "inputCount": 3
840
+ },
841
+ {
842
+ "id": "buildchain-stable-candidate-qualification",
843
+ "path": ".github/workflows/buildchain-stable-candidate-qualification.yml",
844
+ "inputs": [
845
+ "candidate-sha",
846
+ "dry-run"
847
+ ],
848
+ "inputCount": 2
849
+ },
812
850
  {
813
851
  "id": "candidate-lab",
814
852
  "path": ".github/workflows/candidate-lab.yml",
@@ -826,12 +864,13 @@
826
864
  "inputs": [
827
865
  "buildchain-ref",
828
866
  "buildchain-repository",
867
+ "mode",
829
868
  "node-version",
830
869
  "require-version-state",
831
870
  "upload-artifacts",
832
871
  "working-directory"
833
872
  ],
834
- "inputCount": 6
873
+ "inputCount": 7
835
874
  },
836
875
  {
837
876
  "id": "dev-pr-auto-merge",
@@ -1077,6 +1116,28 @@
1077
1116
  "inputs": [],
1078
1117
  "inputCount": 0
1079
1118
  },
1119
+ {
1120
+ "id": "stable-candidate-patrol",
1121
+ "path": ".github/workflows/stable-candidate-patrol.yml",
1122
+ "inputs": [
1123
+ "auto-approve",
1124
+ "auto-merge",
1125
+ "auto-promote",
1126
+ "buildchain-ref",
1127
+ "buildchain-repository",
1128
+ "dry-run",
1129
+ "hold",
1130
+ "hold-reason",
1131
+ "ledger-ref",
1132
+ "minimum-soak-seconds",
1133
+ "release-now",
1134
+ "required-checks",
1135
+ "revoke-reason",
1136
+ "revoked-versions",
1137
+ "target-branch"
1138
+ ],
1139
+ "inputCount": 15
1140
+ },
1080
1141
  {
1081
1142
  "id": "verify",
1082
1143
  "path": ".github/workflows/verify.yml",
@@ -1396,6 +1457,10 @@
1396
1457
  "id": "manual:site-bundle-contract",
1397
1458
  "category": "manual"
1398
1459
  },
1460
+ {
1461
+ "id": "manual:stable-candidate-patrol",
1462
+ "category": "manual"
1463
+ },
1399
1464
  {
1400
1465
  "id": "manual:toolkit-observability",
1401
1466
  "category": "manual"
@@ -2174,6 +2239,26 @@
2174
2239
  "path": "README.md",
2175
2240
  "command": "buildchain kfd"
2176
2241
  },
2242
+ {
2243
+ "id": "layout",
2244
+ "path": "docs/binary-distribution.md",
2245
+ "command": "buildchain layout --json"
2246
+ },
2247
+ {
2248
+ "id": "layout",
2249
+ "path": "docs/cli.md",
2250
+ "command": "buildchain layout --cwd"
2251
+ },
2252
+ {
2253
+ "id": "layout",
2254
+ "path": "docs/cli.md",
2255
+ "command": "buildchain layout"
2256
+ },
2257
+ {
2258
+ "id": "layout",
2259
+ "path": "docs/kfd-support.md",
2260
+ "command": "buildchain layout --cwd"
2261
+ },
2177
2262
  {
2178
2263
  "id": "lifecycle",
2179
2264
  "path": "docs/cli.md",
@@ -2605,9 +2690,9 @@
2605
2690
  "cliRegistryPath": "dist/site/cli-registry.json",
2606
2691
  "workflowRegistryPath": "dist/site/workflow-registry.json",
2607
2692
  "pageRegistryPath": "dist/site/page-registry.json",
2608
- "cliRegistryDigest": "3c0729f5351eb82fe26625fa5aabf30903f45f68af2431e02860f85ada468ac9",
2609
- "workflowRegistryDigest": "2bd177fe6e3cbcd382ba30d90c96f35865ef17fc29e451715696cb076d7da933",
2610
- "pageRegistryDigest": "b5dd01ba00663f68c579a0a2661707094cb4db99b0ee30dd608e224a517b490e"
2693
+ "cliRegistryDigest": "ab57fec294efb9dde1612787bfd0d532b5bb95298b5da14a2b51a5e71b9c7dcc",
2694
+ "workflowRegistryDigest": "e7e3db196607ac6dbf4058552a84692c86c4e5cbcee7080c6cde9d1b71873daf",
2695
+ "pageRegistryDigest": "8e2240c074e8e7b08761eba80c2650e6e9b94c8a6192266bb1b5b07a8aa08d38"
2611
2696
  },
2612
2697
  "comparison": {
2613
2698
  "missingCliRegistry": [],
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
3
  "contract": "kungfu-buildchain-publication-release-registry",
4
- "generatedAt": "2026-07-11T08:24:47.193Z",
5
- "publishedAt": "2026-07-11T08:24:47.193Z",
4
+ "generatedAt": "2026-07-13T04:23:40.596Z",
5
+ "publishedAt": "2026-07-13T04:23:40.596Z",
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": "b20e9da54c801f6e5e3e7012488a4632ea108ded",
22
+ "sourceRevision": "6a389143f2635c16f68971b214f70ed1b600a329",
23
23
  "timestampPolicyDetails": {
24
24
  "contract": "kungfu-buildchain-surface-timestamp-policy",
25
25
  "timestampFields": [
@@ -32,7 +32,7 @@
32
32
  },
33
33
  "package": {
34
34
  "name": "@kungfu-tech/buildchain",
35
- "version": "2.12.0",
35
+ "version": "2.12.1-alpha.10",
36
36
  "versionSource": "package.json#version"
37
37
  },
38
38
  "sourceKind": "package-site-bundle",
@@ -27,6 +27,7 @@
27
27
  "./publication-package": "./packages/core/publication-package.js",
28
28
  "./kfd-gate": "./packages/core/kfd-gate.js",
29
29
  "./release-candidate": "./packages/core/release-candidate.js",
30
+ "./stable-candidate-ledger": "./packages/core/stable-candidate-ledger.js",
30
31
  "./release-passport": "./packages/core/release-passport.js",
31
32
  "./release-propagation": "./packages/core/release-propagation.js",
32
33
  "./surface-manifest": "./packages/core/surface-manifest.js",
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
3
  "contract": "kungfu-buildchain-site-manifest",
4
- "generatedAt": "2026-07-11T08:24:47.193Z",
5
- "publishedAt": "2026-07-11T08:24:47.193Z",
4
+ "generatedAt": "2026-07-13T04:23:40.596Z",
5
+ "publishedAt": "2026-07-13T04:23:40.596Z",
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": "b20e9da54c801f6e5e3e7012488a4632ea108ded",
22
+ "sourceRevision": "6a389143f2635c16f68971b214f70ed1b600a329",
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": "2.12.0",
40
+ "version": "2.12.1-alpha.10",
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:bad18d05d3d03b77bf64d8697fc351d58b1372a355a4f25c6719bf08984a79a2"
56
+ "digest": "sha256:0735009b21cea9227f2c9b9bcbec1219898f4d211776b60aa030ace65821ec80"
57
57
  },
58
58
  {
59
59
  "id": "install",
@@ -109,7 +109,7 @@
109
109
  "path": "docs/binary-distribution.md",
110
110
  "plane": "verify",
111
111
  "exists": true,
112
- "digest": "sha256:36899140a9b2e9ce1565ed41f3d64f73a8829fad3d59a04b9498d9479c85c4be"
112
+ "digest": "sha256:08be4e97e1940a45a2c0aa2506012255888c23c1cbf8f5362b27c2b21089eb58"
113
113
  },
114
114
  {
115
115
  "id": "consumer-issue-reporting",
@@ -173,7 +173,7 @@
173
173
  "path": "docs/cli.md",
174
174
  "plane": "use",
175
175
  "exists": true,
176
- "digest": "sha256:133a7921163fecda050d772827bd498f35f11b1a3514e303dbfe89bb7a220f5d"
176
+ "digest": "sha256:3b3ac97c353f7549229f1102cca38236e734ec8d08c219d4a6e5ef2a48fc0e16"
177
177
  },
178
178
  {
179
179
  "id": "build-facts",
@@ -189,7 +189,7 @@
189
189
  "path": "docs/kfd-support.md",
190
190
  "plane": "verify",
191
191
  "exists": true,
192
- "digest": "sha256:456eef9dbb71df3842613083054942436e763c6aa5ca3ff8a51c5a4e8cc186e7"
192
+ "digest": "sha256:ab15de33a1a9e292b6da74c00b8b96b7c46330d0553a454d1de4c24c672fc025"
193
193
  },
194
194
  {
195
195
  "id": "lifecycle-protocol",
@@ -197,7 +197,7 @@
197
197
  "path": "docs/lifecycle-protocol.md",
198
198
  "plane": "use",
199
199
  "exists": true,
200
- "digest": "sha256:60c39693878258d275e9d47983b306faed35d6416297c14570429de73284604c"
200
+ "digest": "sha256:bef6f703a76667c731dccea6a0385b2196b5a23438ce4bc39894561530975f21"
201
201
  },
202
202
  {
203
203
  "id": "reusable-build-surface",
@@ -205,7 +205,7 @@
205
205
  "path": "docs/reusable-build-surface.md",
206
206
  "plane": "use",
207
207
  "exists": true,
208
- "digest": "sha256:dfa37928517a391c2ab214a095954dcb50e84f514cea0a8424619903843d9b8d"
208
+ "digest": "sha256:fbc74dee3a6f2283ea69a2a9a31945ac82ccaf1d270995539f5d80235ab74614"
209
209
  },
210
210
  {
211
211
  "id": "publish-transaction",
@@ -221,7 +221,7 @@
221
221
  "path": "docs/release-governance.md",
222
222
  "plane": "why",
223
223
  "exists": true,
224
- "digest": "sha256:11f0e3ff3162c7b3f886a38ab0e4b591886e2046937a9d006eda74b72a8cc9ab"
224
+ "digest": "sha256:3ae2bbc2df394726f350e58be1a71dd0379b99b19cd6ccf15fbe3b843f3890b6"
225
225
  },
226
226
  {
227
227
  "id": "release-flow",
@@ -25,6 +25,7 @@
25
25
  "buildchain-contract-lock-path",
26
26
  "buildchain-ref",
27
27
  "buildchain-repository",
28
+ "cargo-registry-index",
28
29
  "checkout-cache-fallback",
29
30
  "checkout-cache-fetch-attempts",
30
31
  "checkout-cache-github-timeout-seconds",
@@ -52,13 +53,19 @@
52
53
  "require-trusted-event",
53
54
  "require-verify",
54
55
  "runner-preset",
56
+ "rust-toolchain",
57
+ "rustup-dist-server",
58
+ "rustup-update-root",
55
59
  "sample-process-tree",
56
60
  "setup-node",
61
+ "setup-rust",
62
+ "shifu-cache-profile-digest",
63
+ "shifu-cache-profile-ref",
57
64
  "untrusted-policy",
58
65
  "verify-command",
59
66
  "working-directory"
60
67
  ],
61
- "inputCount": 50,
68
+ "inputCount": 57,
62
69
  "surface": "reusable-build",
63
70
  "capabilityGroup": "api-cli-reference",
64
71
  "status": "active"
@@ -368,6 +375,7 @@
368
375
  "buildchain-ref",
369
376
  "buildchain-repository",
370
377
  "buildchain-stable-contract-lock-path",
378
+ "cargo-registry-index",
371
379
  "checkout-cache-fallback",
372
380
  "checkout-cache-fetch-attempts",
373
381
  "checkout-cache-github-timeout-seconds",
@@ -395,13 +403,19 @@
395
403
  "require-trusted-event",
396
404
  "require-verify",
397
405
  "runner-preset",
406
+ "rust-toolchain",
407
+ "rustup-dist-server",
408
+ "rustup-update-root",
398
409
  "sample-process-tree",
399
410
  "setup-node",
411
+ "setup-rust",
412
+ "shifu-cache-profile-digest",
413
+ "shifu-cache-profile-ref",
400
414
  "untrusted-policy",
401
415
  "verify-command",
402
416
  "working-directory"
403
417
  ],
404
- "inputCount": 53,
418
+ "inputCount": 60,
405
419
  "surface": "channel-build-router",
406
420
  "capabilityGroup": "reusable-build",
407
421
  "status": "active"
@@ -489,6 +503,31 @@
489
503
  "capabilityGroup": "release-passport-trust",
490
504
  "status": "active"
491
505
  },
506
+ {
507
+ "id": "buildchain-stable-candidate-patrol",
508
+ "path": ".github/workflows/buildchain-stable-candidate-patrol.yml",
509
+ "inputs": [
510
+ "buildchain-ref",
511
+ "dry-run",
512
+ "release-now"
513
+ ],
514
+ "inputCount": 3,
515
+ "surface": "repository-patrol",
516
+ "capabilityGroup": "governance-versioning",
517
+ "status": "active"
518
+ },
519
+ {
520
+ "id": "buildchain-stable-candidate-qualification",
521
+ "path": ".github/workflows/buildchain-stable-candidate-qualification.yml",
522
+ "inputs": [
523
+ "candidate-sha",
524
+ "dry-run"
525
+ ],
526
+ "inputCount": 2,
527
+ "surface": "repository-patrol",
528
+ "capabilityGroup": "api-cli-reference",
529
+ "status": "repository-internal"
530
+ },
492
531
  {
493
532
  "id": "candidate-lab",
494
533
  "path": ".github/workflows/candidate-lab.yml",
@@ -509,12 +548,13 @@
509
548
  "inputs": [
510
549
  "buildchain-ref",
511
550
  "buildchain-repository",
551
+ "mode",
512
552
  "node-version",
513
553
  "require-version-state",
514
554
  "upload-artifacts",
515
555
  "working-directory"
516
556
  ],
517
- "inputCount": 6,
557
+ "inputCount": 7,
518
558
  "surface": "repository-workflow",
519
559
  "capabilityGroup": "api-cli-reference",
520
560
  "status": "active"
@@ -805,6 +845,31 @@
805
845
  "capabilityGroup": "api-cli-reference",
806
846
  "status": "compatibility-fixture"
807
847
  },
848
+ {
849
+ "id": "stable-candidate-patrol",
850
+ "path": ".github/workflows/stable-candidate-patrol.yml",
851
+ "inputs": [
852
+ "auto-approve",
853
+ "auto-merge",
854
+ "auto-promote",
855
+ "buildchain-ref",
856
+ "buildchain-repository",
857
+ "dry-run",
858
+ "hold",
859
+ "hold-reason",
860
+ "ledger-ref",
861
+ "minimum-soak-seconds",
862
+ "release-now",
863
+ "required-checks",
864
+ "revoke-reason",
865
+ "revoked-versions",
866
+ "target-branch"
867
+ ],
868
+ "inputCount": 15,
869
+ "surface": "repository-patrol",
870
+ "capabilityGroup": "governance-versioning",
871
+ "status": "active"
872
+ },
808
873
  {
809
874
  "id": "verify",
810
875
  "path": ".github/workflows/verify.yml",
package/docs/MAP.md CHANGED
@@ -99,6 +99,7 @@ replace them.
99
99
  | How do self-hosted runners relay large artifacts through S3 before GitHub artifacts? | [`reusable-build-surface.md`](reusable-build-surface.md#artifact-transfer-relay) | use | stable |
100
100
  | How do self-hosted runners reuse local Git checkout caches without weakening source locks? | [`reusable-build-surface.md`](reusable-build-surface.md#locked-source-checkout-cache) | use | stable |
101
101
  | How do I validate an unreleased Buildchain runtime train while keeping `@v2`? | [`runtime-train-validation.md`](runtime-train-validation.md) | use | stable |
102
+ | How do I automatically qualify alpha candidates and publish the newest non-revoked qualified candidate at a fixed window? | [`stable-candidate-patrol.md`](stable-candidate-patrol.md) | use | preview |
102
103
  | How do I deploy a site/app preview, staging, or production surface? | [`web-surface-deployments.md`](web-surface-deployments.md) | use | stable |
103
104
  | How do I publish observed infrastructure contracts for downstream consumers? | [`infra-contract.md`](infra-contract.md) | use | preview |
104
105
  | How do I use the active actions directly? | [`../actions/validate-config/README.md`](../actions/validate-config/README.md), [`../actions/run-lifecycle/README.md`](../actions/run-lifecycle/README.md), [`../actions/promote-buildchain-ref/README.md`](../actions/promote-buildchain-ref/README.md), [`../actions/report-buildchain-issue/README.md`](../actions/report-buildchain-issue/README.md) | use | stable |
@@ -117,6 +118,8 @@ replace them.
117
118
  [`release-flow.md`](release-flow.md).
118
119
  - **Buildchain self-dogfood / released alpha canary / stable compatibility lane** ->
119
120
  [`release-governance.md`](release-governance.md#buildchain-alpha-self-dogfood).
121
+ - **qualified alpha ledger / scheduled stable selection / hold and revoke** ->
122
+ [`stable-candidate-patrol.md`](stable-candidate-patrol.md).
120
123
  - **v2.1 vs v2.2 / when to open a new minor line** ->
121
124
  [`versioning.md`](versioning.md).
122
125
  - **dry-run / what would happen if this channel PR merges** -> [`cli.md`](cli.md)
@@ -38,6 +38,25 @@ Each archive is accompanied by:
38
38
  - `buildchain-release-bundle.tar.gz`;
39
39
  - `buildchain-release-bundle.json`.
40
40
 
41
+ ## KFD-3 Distribution Declaration
42
+
43
+ Buildchain self-describes this release lane in `dist/site/kfd-claims.json` as
44
+ the KFD-3 surface `distribution:buildchain-standalone`. Its declaration assigns
45
+ registration to Shifu, names `binary:build` as the reproducible task, and lists
46
+ the artifact kind, platform, and path glob for all three archives. Shifu should
47
+ discover the registry through `buildchain layout --json`, not by copying the
48
+ registry path.
49
+
50
+ The repository-owned task is:
51
+
52
+ ```bash
53
+ pnpm binary:build
54
+ ```
55
+
56
+ The release workflow still builds each target on its declared runner. The local
57
+ task is the stable task identity used by the KFD declaration and local smoke
58
+ checks; it does not replace the three-platform release matrix.
59
+
41
60
  ## Runner Policy
42
61
 
43
62
  Production binary builds use GitHub-hosted runners:
@@ -69,7 +88,7 @@ offline review, mirroring, or site ingestion.
69
88
  ## Local Smoke
70
89
 
71
90
  ```bash
72
- node scripts/build-standalone-binary.mjs --version v0.0.0-local --output-dir dist/binary
91
+ pnpm binary:build -- --version v0.0.0-local
73
92
  node bin/buildchain.mjs collect github-release \
74
93
  --tag v0.0.0-local \
75
94
  --assets-dir dist/binary \
package/docs/cli.md CHANGED
@@ -77,6 +77,7 @@ import { verifyReleasePassport } from "@kungfu-tech/buildchain/release-passport"
77
77
  import { createReleasePropagationPlan } from "@kungfu-tech/buildchain/release-propagation";
78
78
  import { planReleaseLineBootstrap } from "@kungfu-tech/buildchain/release-line-bootstrap";
79
79
  import { collectPublicSurfaceReverseAudit } from "@kungfu-tech/buildchain/public-surface-audit";
80
+ import { createBuildchainLayoutDiscovery } from "@kungfu-tech/buildchain/buildchain-layout";
80
81
  import contractWorld from "@kungfu-tech/buildchain/site/buildchain-contract.json" with { type: "json" };
81
82
  import capabilityRegistry from "@kungfu-tech/buildchain/site/capability-registry.json" with { type: "json" };
82
83
  import manualRegistry from "@kungfu-tech/buildchain/site/manual-registry.json" with { type: "json" };
@@ -90,6 +91,22 @@ floating-ref contract world for a runtime such as `@v2`.
90
91
 
91
92
  ## Commands
92
93
 
94
+ `buildchain layout` is the stable machine question for repository layout. Tools
95
+ such as Shifu should call it instead of copying `.buildchain/` path constants:
96
+
97
+ ```bash
98
+ buildchain layout --cwd /path/to/repository --json
99
+ ```
100
+
101
+ The result identifies the Buildchain version pin, repository root and config,
102
+ the canonical and currently resolved KFD-3 registry paths, and the KFD field
103
+ used to declare Shifu jurisdiction. A repository is in Shifu's distribution
104
+ jurisdiction only when a KFD-3 surface explicitly declares
105
+ `distribution.registrar="shifu"`; the presence of Buildchain configuration is
106
+ not sufficient. The same contract is available through
107
+ `createBuildchainLayoutDiscovery()` from
108
+ `@kungfu-tech/buildchain/buildchain-layout`.
109
+
93
110
  `buildchain init` writes a starter `.buildchain/buildchain.toml` and a reusable workflow
94
111
  caller at `.github/workflows/build.yml`.
95
112
 
@@ -279,6 +279,49 @@ detect standard public surfaces, write a small product-owned registry, audit the
279
279
  registry against the current artifact/source tree, generate a release-passport
280
280
  compatible witness, and query the resulting capability map.
281
281
 
282
+ ## Shifu Discovery and Distribution Declarations
283
+
284
+ Buildchain owns the repository-layout question; product tools must not copy its
285
+ internal paths. Shifu and other consumers use this sequence:
286
+
287
+ 1. read the welded `.buildchain-version` pin to select Buildchain;
288
+ 2. run `buildchain layout --cwd <repository> --json`;
289
+ 3. read the returned `kfd.registries["kfd-3"].path`;
290
+ 4. treat a surface as Shifu-managed only when its declaration contains
291
+ `distribution.registrar="shifu"`.
292
+
293
+ The layout response uses the
294
+ `kungfu-buildchain-layout-discovery` contract with an explicit schema version.
295
+ Changing or removing its fields is a public contract change. Consumers must not
296
+ fall back to a hard-coded registry location when the command is unavailable or
297
+ returns an unsupported contract.
298
+
299
+ A Shifu distribution declaration must contain at least one task and one
300
+ artifact. Every artifact declares `kind`, `platform`, and `pathGlob`; an
301
+ optional `sha256` is a lowercase 64-character hexadecimal digest. This makes
302
+ artifact form and platform machine-readable without asking Shifu to infer them
303
+ from filenames:
304
+
305
+ ```json
306
+ {
307
+ "distribution": {
308
+ "registrar": "shifu",
309
+ "tasks": ["binary:build"],
310
+ "artifacts": [
311
+ {
312
+ "kind": "binary",
313
+ "platform": "linux",
314
+ "pathGlob": "dist/binary/example-x86_64-unknown-linux-gnu.tar.gz"
315
+ }
316
+ ]
317
+ }
318
+ }
319
+ ```
320
+
321
+ Buildchain validates this shape whenever a KFD-3 registry is read or written.
322
+ Repositories that do not declare the registrar remain outside Shifu's
323
+ distribution jurisdiction.
324
+
282
325
  ## Detected, Declared, Enforced
283
326
 
284
327
  KFD-3 surface registration uses three states.
@@ -402,7 +445,7 @@ Buildchain dogfoods this model in two ways:
402
445
  `buildchain kfd 2 trust-assessment --json` expose and validate the KFD
403
446
  package's foundation KFD-2 trust facts against the latest KFD taxonomy;
404
447
  - `dist/site/kfd-claims.json` declares Buildchain's own KFD-3 collaboration
405
- interface;
448
+ interface, including a Shifu-owned standalone binary distribution surface;
406
449
  - `buildchain kfd 3 query buildchain --json` resolves the packaged
407
450
  Buildchain capability map from that site fact source.
408
451
 
@@ -158,6 +158,9 @@ commands = [
158
158
  "pnpm run package",
159
159
  ]
160
160
 
161
+ [lifecycle.check]
162
+ command = "pnpm run check:source"
163
+
161
164
  [lifecycle.verify]
162
165
  shell = "bash"
163
166
  script = """
@@ -167,6 +170,15 @@ git diff --check
167
170
  """
168
171
  ```
169
172
 
173
+ `lifecycle.check` is the repository-owned source-acceptance gate. It should
174
+ validate the checked-out source revision without entering the build, artifact,
175
+ or release lifecycle. Consumers can run it on GitHub-hosted Linux through
176
+ `.github/workflows/check.yml@v2` with `mode: source`; the reusable workflow runs
177
+ only `lifecycle.install` and `lifecycle.check`. The default `mode: verify`
178
+ continues to run `lifecycle.install` and `lifecycle.verify` for existing callers.
179
+ The reusable job name remains `check`, and `upload-artifacts: false` disables
180
+ evidence upload without changing the job conclusion used by branch protection.
181
+
170
182
  Shared environment variables can be declared once:
171
183
 
172
184
  ```toml