@kungfu-tech/buildchain 2.14.2 → 2.14.3-alpha.0

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 (45) hide show
  1. package/dist/site/agent-index.json +2 -0
  2. package/dist/site/artifact-schemas.json +4 -0
  3. package/dist/site/badge-endpoint-registry.json +320 -0
  4. package/dist/site/badges/v1/kfd-5/aligned.json +14 -0
  5. package/dist/site/badges/v1/kfd-5/declared.json +14 -0
  6. package/dist/site/badges/v1/kfd-5/downgraded.json +14 -0
  7. package/dist/site/badges/v1/kfd-5/draft.json +14 -0
  8. package/dist/site/badges/v1/kfd-5/failed.json +14 -0
  9. package/dist/site/badges/v1/kfd-5/missing.json +14 -0
  10. package/dist/site/badges/v1/kfd-5/passed.json +14 -0
  11. package/dist/site/badges/v1/kfd-5/planned.json +14 -0
  12. package/dist/site/badges/v1/kfd-6/aligned.json +14 -0
  13. package/dist/site/badges/v1/kfd-6/declared.json +14 -0
  14. package/dist/site/badges/v1/kfd-6/downgraded.json +14 -0
  15. package/dist/site/badges/v1/kfd-6/draft.json +14 -0
  16. package/dist/site/badges/v1/kfd-6/failed.json +14 -0
  17. package/dist/site/badges/v1/kfd-6/missing.json +14 -0
  18. package/dist/site/badges/v1/kfd-6/passed.json +14 -0
  19. package/dist/site/badges/v1/kfd-6/planned.json +14 -0
  20. package/dist/site/buildchain-contract.json +34 -19
  21. package/dist/site/buildchain-site.json +13 -11
  22. package/dist/site/capability-registry.json +1 -1
  23. package/dist/site/controller-registry.json +14 -2
  24. package/dist/site/kfd-claims.json +21 -6
  25. package/dist/site/kfd-upstream-aggregate.json +12 -12
  26. package/dist/site/manual-registry.json +2 -2
  27. package/dist/site/node-api-registry.json +15 -2
  28. package/dist/site/page-registry.json +4 -4
  29. package/dist/site/public-surface-audit.json +12 -4
  30. package/dist/site/publication-registry.json +4 -4
  31. package/dist/site/release-model.json +3 -1
  32. package/dist/site/release-passport-check-manifest.json +167 -0
  33. package/dist/site/release-provenance.json +3 -0
  34. package/dist/site/schemas/release-passport-v1.schema.json +198 -0
  35. package/dist/site/site-manifest.json +6 -6
  36. package/dist/site/workflow-registry.json +4 -1
  37. package/docs/release-passport.md +19 -0
  38. package/docs/release-propagation.md +19 -7
  39. package/package.json +5 -2
  40. package/packages/core/index.js +9 -0
  41. package/packages/core/package-manager.js +32 -0
  42. package/packages/core/release-passport-contract.js +249 -0
  43. package/scripts/check-inventory.mjs +7 -1
  44. package/scripts/generate-site-bundle.mjs +15 -0
  45. package/scripts/validate-package-manager-contract.mjs +24 -0
@@ -4,7 +4,7 @@
4
4
  "product": {
5
5
  "name": "Buildchain",
6
6
  "package": "@kungfu-tech/buildchain",
7
- "version": "2.14.2",
7
+ "version": "2.14.3-alpha.0",
8
8
  "repository": "https://github.com/kungfu-systems/buildchain"
9
9
  },
10
10
  "majorLine": "v2",
@@ -50,7 +50,7 @@
50
50
  "retryable GitHub fallback fetches use a bounded attempt budget before exact source SHA and tree verification"
51
51
  ],
52
52
  "breakingDigest": "sha256:a6a35370d6b0d0f46e1b2712dcc01961fe53c2febde95409a27a485c10a36650",
53
- "auditDigest": "sha256:07f01d270d7f5712be067697f652b5843a07748696c0d2b8b2020639108c669d"
53
+ "auditDigest": "sha256:46fa80913e6174f34b96c323ed913410b9fea0f3632a0ce9c7d4f3e0b23b7072"
54
54
  },
55
55
  {
56
56
  "contractVersion": 1,
@@ -159,7 +159,7 @@
159
159
  "GitHub Release passport and evidence publication is delegated to promote-buildchain-ref after the semver release transaction completes"
160
160
  ],
161
161
  "breakingDigest": "sha256:6dbae32ce3d7aab3be6957065105af574794581847b7637314dad45f5349c919",
162
- "auditDigest": "sha256:0a5691beb2469a71e22b0b7ecd3d32af539fa14dd6af6e14bf47d692a1788070"
162
+ "auditDigest": "sha256:1f65ef71c7cbafdcd7628a7d41929d153fa3bf9fcbc167d514a358dd49518e98"
163
163
  },
164
164
  {
165
165
  "contractVersion": 1,
@@ -527,7 +527,7 @@
527
527
  "manual entries carry source file digests so downstream sites and agents can detect stale hand-written documentation"
528
528
  ],
529
529
  "breakingDigest": "sha256:7d0d2819e3a3e72989d9c57b5efe9d0bc0a79bc0f2c82a0c7b9d6c5a211a91f2",
530
- "auditDigest": "sha256:e0fd0a6e19835663980faec6d4d132424d9ee65c27fcd3437bf30634740032bb"
530
+ "auditDigest": "sha256:14f679ffb745bf4f9edc9fabaef962c0de61aaa054d111fe691d5734714e6a8e"
531
531
  },
532
532
  {
533
533
  "contractVersion": 1,
@@ -549,7 +549,7 @@
549
549
  "agents can discover supported Node APIs without importing internal file paths"
550
550
  ],
551
551
  "breakingDigest": "sha256:48f925608d3e2131d90936b07dc2a30341204cae3e6e785c0f77d61ad755c945",
552
- "auditDigest": "sha256:dca785dc9f657536f84a9b40c3fb00d5a191bbd6cbce2fb1cb59cd0369150817"
552
+ "auditDigest": "sha256:03d6f62196eb47edcfc8b4b68abefc0a10912b276d407e75e83be443a112ba16"
553
553
  },
554
554
  {
555
555
  "contractVersion": 1,
@@ -600,7 +600,7 @@
600
600
  "controllerDescriptor": {
601
601
  "contract": "buildchain.controller-descriptor/v1",
602
602
  "digest": "sha256:373723a73d188194d389dee04c394d3b79cb0c016a370f2f5d0f60979a02ed48",
603
- "registryDigest": "sha256:266928038838e26ba1350c70d78290723ddb2fd209b66ab1afab776d948a379b",
603
+ "registryDigest": "sha256:2c6a3a4dce27e0d76baae1c9aeb4d3428866fe8b4c4022a8c582b054dace02fd",
604
604
  "inputClassifications": {
605
605
  "buildchain-ref": {
606
606
  "classification": "included",
@@ -747,7 +747,7 @@
747
747
  "controllerDescriptor": {
748
748
  "contract": "buildchain.controller-descriptor/v1",
749
749
  "digest": "sha256:367be236280f2597ffefc49680feb106b4cf9e8f5fb9420713351f075a168c4a",
750
- "registryDigest": "sha256:266928038838e26ba1350c70d78290723ddb2fd209b66ab1afab776d948a379b",
750
+ "registryDigest": "sha256:2c6a3a4dce27e0d76baae1c9aeb4d3428866fe8b4c4022a8c582b054dace02fd",
751
751
  "inputClassifications": {
752
752
  "BUILDCHAIN_ARTIFACT_RELAY_S3_DOWNLOAD_ROLE_ARN": {
753
753
  "classification": "redacted",
@@ -1006,7 +1006,7 @@
1006
1006
  "missing receipts are non-qualifying and must not be represented as a successful controller run"
1007
1007
  ],
1008
1008
  "breakingDigest": "sha256:e264a79f9f399038c2fcfd21e4168c68c2e1485ee5c651c02242a02b622ac2be",
1009
- "auditDigest": "sha256:07f01d270d7f5712be067697f652b5843a07748696c0d2b8b2020639108c669d"
1009
+ "auditDigest": "sha256:46fa80913e6174f34b96c323ed913410b9fea0f3632a0ce9c7d4f3e0b23b7072"
1010
1010
  },
1011
1011
  {
1012
1012
  "contractVersion": 1,
@@ -1113,7 +1113,7 @@
1113
1113
  "controllerDescriptor": {
1114
1114
  "contract": "buildchain.controller-descriptor/v1",
1115
1115
  "digest": "sha256:2e113607af3cb0a17b4da64b8758652a4bee4a162656ce7256a8e06de3d4cf2f",
1116
- "registryDigest": "sha256:266928038838e26ba1350c70d78290723ddb2fd209b66ab1afab776d948a379b",
1116
+ "registryDigest": "sha256:2c6a3a4dce27e0d76baae1c9aeb4d3428866fe8b4c4022a8c582b054dace02fd",
1117
1117
  "inputClassifications": {
1118
1118
  "BUILDCHAIN_ARTIFACT_RELAY_S3_DOWNLOAD_ROLE_ARN": {
1119
1119
  "classification": "redacted",
@@ -1443,7 +1443,7 @@
1443
1443
  "controllerDescriptor": {
1444
1444
  "contract": "buildchain.controller-descriptor/v1",
1445
1445
  "digest": "sha256:29569f4b754595792a16742d1c4c63838b54601674a2cb6c96261a72c962dece",
1446
- "registryDigest": "sha256:266928038838e26ba1350c70d78290723ddb2fd209b66ab1afab776d948a379b",
1446
+ "registryDigest": "sha256:2c6a3a4dce27e0d76baae1c9aeb4d3428866fe8b4c4022a8c582b054dace02fd",
1447
1447
  "inputClassifications": {
1448
1448
  "artifact-name": {
1449
1449
  "classification": "included",
@@ -1614,7 +1614,7 @@
1614
1614
  "controllerDescriptor": {
1615
1615
  "contract": "buildchain.controller-descriptor/v1",
1616
1616
  "digest": "sha256:7e6283c8fbeab7a680bae57c9ab9c8eb94aab7400d3ee01c5b9dfdd03f149edb",
1617
- "registryDigest": "sha256:266928038838e26ba1350c70d78290723ddb2fd209b66ab1afab776d948a379b",
1617
+ "registryDigest": "sha256:2c6a3a4dce27e0d76baae1c9aeb4d3428866fe8b4c4022a8c582b054dace02fd",
1618
1618
  "inputClassifications": {
1619
1619
  "artifact-path": {
1620
1620
  "classification": "digest-only",
@@ -1850,7 +1850,7 @@
1850
1850
  "controllerDescriptor": {
1851
1851
  "contract": "buildchain.controller-descriptor/v1",
1852
1852
  "digest": "sha256:6b132790b9798e8a5dfbe095701d8e024c160a08bc7c4bd477ee79feef7a9cfd",
1853
- "registryDigest": "sha256:266928038838e26ba1350c70d78290723ddb2fd209b66ab1afab776d948a379b",
1853
+ "registryDigest": "sha256:2c6a3a4dce27e0d76baae1c9aeb4d3428866fe8b4c4022a8c582b054dace02fd",
1854
1854
  "inputClassifications": {
1855
1855
  "artifact-name": {
1856
1856
  "classification": "included",
@@ -2031,7 +2031,7 @@
2031
2031
  "controllerDescriptor": {
2032
2032
  "contract": "buildchain.controller-descriptor/v1",
2033
2033
  "digest": "sha256:0613ea545fe2d630f34e665c8e6fe99df3f5333d75051a7176e9cf991e494f59",
2034
- "registryDigest": "sha256:266928038838e26ba1350c70d78290723ddb2fd209b66ab1afab776d948a379b",
2034
+ "registryDigest": "sha256:2c6a3a4dce27e0d76baae1c9aeb4d3428866fe8b4c4022a8c582b054dace02fd",
2035
2035
  "inputClassifications": {
2036
2036
  "artifact-name": {
2037
2037
  "classification": "included",
@@ -2305,7 +2305,7 @@
2305
2305
  "controllerDescriptor": {
2306
2306
  "contract": "buildchain.controller-descriptor/v1",
2307
2307
  "digest": "sha256:2507d132710f66d3ae6ffdb18f5e66172707b8e0f9ad9e888f7422fdacc99133",
2308
- "registryDigest": "sha256:266928038838e26ba1350c70d78290723ddb2fd209b66ab1afab776d948a379b",
2308
+ "registryDigest": "sha256:2c6a3a4dce27e0d76baae1c9aeb4d3428866fe8b4c4022a8c582b054dace02fd",
2309
2309
  "inputClassifications": {
2310
2310
  "BUILDCHAIN_ISSUE_APP_ID": {
2311
2311
  "classification": "redacted",
@@ -2580,7 +2580,7 @@
2580
2580
  "missing receipts are non-qualifying and must not be represented as a successful controller run"
2581
2581
  ],
2582
2582
  "breakingDigest": "sha256:46238f8fc3c20924decc57ecad142a462fc4739c6bc21409d5cd2457fc1c3cdd",
2583
- "auditDigest": "sha256:0a5691beb2469a71e22b0b7ecd3d32af539fa14dd6af6e14bf47d692a1788070"
2583
+ "auditDigest": "sha256:1f65ef71c7cbafdcd7628a7d41929d153fa3bf9fcbc167d514a358dd49518e98"
2584
2584
  },
2585
2585
  {
2586
2586
  "contractVersion": 1,
@@ -2624,21 +2624,24 @@
2624
2624
  "buildchain-repository",
2625
2625
  "downstream-base-ref",
2626
2626
  "downstream-branch",
2627
+ "downstream-prepare-command",
2627
2628
  "downstream-repository",
2628
2629
  "downstream-target",
2630
+ "downstream-verify-command",
2629
2631
  "dry-run",
2630
2632
  "graph-json",
2631
2633
  "lock-path",
2632
2634
  "pr-body",
2633
2635
  "pr-title",
2634
2636
  "propagation-token",
2637
+ "refresh-managed-readme-badges",
2635
2638
  "source-node",
2636
2639
  "upstream-release-json"
2637
2640
  ],
2638
2641
  "controllerDescriptor": {
2639
2642
  "contract": "buildchain.controller-descriptor/v1",
2640
- "digest": "sha256:9b9f9a2320c4349903d72ee46e329211b5538ed5ebebaa93559df4eafb835997",
2641
- "registryDigest": "sha256:266928038838e26ba1350c70d78290723ddb2fd209b66ab1afab776d948a379b",
2643
+ "digest": "sha256:ede9eba43b87cf19330d5f8203a1585bf066aa9affc9cac0f43230ac76b8580d",
2644
+ "registryDigest": "sha256:2c6a3a4dce27e0d76baae1c9aeb4d3428866fe8b4c4022a8c582b054dace02fd",
2642
2645
  "inputClassifications": {
2643
2646
  "buildchain-ref": {
2644
2647
  "classification": "included",
@@ -2656,6 +2659,10 @@
2656
2659
  "classification": "included",
2657
2660
  "source": "workflow-call-input"
2658
2661
  },
2662
+ "downstream-prepare-command": {
2663
+ "classification": "digest-only",
2664
+ "source": "workflow-call-input"
2665
+ },
2659
2666
  "downstream-repository": {
2660
2667
  "classification": "included",
2661
2668
  "source": "workflow-call-input"
@@ -2664,6 +2671,10 @@
2664
2671
  "classification": "included",
2665
2672
  "source": "workflow-call-input"
2666
2673
  },
2674
+ "downstream-verify-command": {
2675
+ "classification": "digest-only",
2676
+ "source": "workflow-call-input"
2677
+ },
2667
2678
  "dry-run": {
2668
2679
  "classification": "included",
2669
2680
  "source": "workflow-call-input"
@@ -2688,6 +2699,10 @@
2688
2699
  "classification": "redacted",
2689
2700
  "source": "workflow-call-secret"
2690
2701
  },
2702
+ "refresh-managed-readme-badges": {
2703
+ "classification": "included",
2704
+ "source": "workflow-call-input"
2705
+ },
2691
2706
  "source-node": {
2692
2707
  "classification": "included",
2693
2708
  "source": "workflow-call-input"
@@ -2705,9 +2720,9 @@
2705
2720
  "missing receipts are non-qualifying and must not be represented as a successful controller run"
2706
2721
  ],
2707
2722
  "breakingDigest": "sha256:d7a1f15990ce8bd13149474888232c7d4451dd2a49bebf4d4ce1336695da430e",
2708
- "auditDigest": "sha256:2750630ae675352b601dd6cb6a987df14bf11029fcf02aa54638b4fcdcb7590e"
2723
+ "auditDigest": "sha256:43fd4da155c701d4c5078373c1f47b50bebc6a46556b8db5e3c4d502c113fa95"
2709
2724
  }
2710
2725
  ],
2711
2726
  "compatibilityDigest": "sha256:af162b86ab4506e9b5f1d3c59b41f3fd57fbad79ff4d749a7f12ff16460517f8",
2712
- "contractDigest": "sha256:90466f4b69982ad1aba65d22596baa4cd0112454f44b1f7c33ab3de017029a06"
2727
+ "contractDigest": "sha256:394a6bfc690c07ee0adc8da9c357b09ad6710a5358015b767f2990dfbdf06573"
2713
2728
  }
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
3
  "contract": "kungfu-buildchain-site-bundle",
4
- "generatedAt": "2026-07-18T01:00:00.995Z",
5
- "publishedAt": "2026-07-18T01:00:00.995Z",
4
+ "generatedAt": "2026-07-18T22:57:23.219Z",
5
+ "publishedAt": "2026-07-18T22:57:23.219Z",
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": "ae16e640bf2f21c8f981ffa8b3523c8aae9200b2",
22
+ "sourceRevision": "8b0423396f09f29e2ea05c38896228751767ab21",
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.14.2",
40
+ "version": "2.14.3-alpha.0",
41
41
  "versionSource": "package.json#version"
42
42
  },
43
43
  "source": {
@@ -1490,7 +1490,7 @@
1490
1490
  ],
1491
1491
  "maturity": "stable",
1492
1492
  "sourcePath": "docs/release-passport.md",
1493
- "digest": "sha256:2421e3e9f2dd892971bea5deb605492dfec38f3a83e539229442b55380bebe25",
1493
+ "digest": "sha256:0029014ffab7d7228a12d8b92326b78cf6757a41f481b661c5997e2cef06d3cc",
1494
1494
  "headings": [
1495
1495
  {
1496
1496
  "level": 1,
@@ -1538,7 +1538,7 @@
1538
1538
  "anchor": "binary-distribution"
1539
1539
  }
1540
1540
  ],
1541
- "markdown": "# Release Passport\n\nBuildchain Release Passport is the core product mechanism: a mature product\nrelease record for artifacts that users or agents depend on.\n\nThe protocol is GitHub-native because it uses protected refs, reviewed\npromotion PRs, exact tags, GitHub Releases, npm Trusted Publishing, and\nmachine-readable evidence. A project can keep its existing build system and use\nBuildchain to make the release record auditable.\n\nRelease-candidate and final passports may also include compact\n`controllerReceipts[]` references. These bind a real reusable-workflow receipt\nto its plan digest, consumer source SHA, and exact Buildchain runtime SHA; they\ndo not infer execution evidence from a green job. See\n[`controller-evidence.md`](controller-evidence.md).\n\n## Contract\n\nThe release passport surface is a welded contract. Additive fields are allowed;\nbreaking semantic changes require a new major line.\n\nP0 protocol artifacts:\n\n- `product-mechanism.json`\n- `buildchain.release.json`\n- `artifact-evidence.json`\n- `impact.json`\n- `agent-index.json`\n- `check-report.json`\n- `llms.txt`\n- `buildchain-release-bundle.json`\n- `buildchain-release-bundle.tar.gz`\n\n`buildchain.release.json` is the first file an agent should read. It points to\nartifact evidence, impact, recovery, product mechanism, and agent index facts.\nIt is also the unified release responsibility summary: when publish\ntransactions are used, the same passport records the package set, npm dist-tags,\nrelease source refs, release-state ref, anchor manifest, registry artifact\ndigests, trusted publishing evidence, and transaction result.\n\nAdditive passport sections:\n\n- `release`: public release tag, internal transaction tag, line, channel,\n source SHA, target ref, release SHA, release material SHA, publish tooling\n SHA, and durable release-state ref. Anchored/manual package releases use the\n published package version for the public tag while preserving the internal\n exact transaction tag for Buildchain recovery.\n- `versionImpact`: final patch/minor/major classification, source, and\n rationale.\n- `surfaceImpacts`: per registered surface classification. The final impact is\n the highest entry in this list.\n- `packageSet`: main package, platform packages, package-set order, registry,\n versions, dist-tags, and package digests.\n- `anchorManifest`: anchored/manual version manifest path, digest, and fields.\n- `trustedPublishing`: provider, auth mode, workflow run evidence, and whether\n trusted publishing was enabled.\n- `transaction`: durable Buildchain release transaction id, state, exact tag,\n release SHA, state ref, and state SHA.\n- `surfaceTimestampPolicy`: the common Buildchain surface manifest timestamp\n policy. It records real CI/release generation and publication times,\n reproducibility inputs, source revision or source-date-epoch, and whether\n timestamp fields participate in the release artifact digest.\n- `buildFacts`: module/product build facts that bind Git source digests,\n version sources, lifecycle invocations, platforms, outputs, product\n artifacts, and verification results to the release.\n- `artifacts`: release assets and registry artifacts in one list, each pointing\n back to the evidence file that proves its digest. Registry artifacts retain\n optional built/reused action, content and current-release coordinates,\n platform/contract/parent metadata, and fail-closed verification evidence.\n\nBuildchain's own binary lane also publishes observability artifacts generated by\nthe Buildchain logging API and CLI:\n\n- `buildchain-log-events-<platform>.jsonl`\n- `buildchain-log-summary-<platform>.json`\n- `buildchain-log-events-passport.jsonl`\n- `buildchain-log-summary-passport.json`\n\n`buildchain-release-bundle.tar.gz` is the single evidence bundle for consumers\nthat want one file for offline inspection, mirroring, or site ingestion.\n`buildchain-release-bundle.json` records its digest and the digest of every\nincluded file.\n\n## Runner Policy\n\nProduction binary distribution should use GitHub-hosted runners by default:\n\n- `ubuntu-24.04`\n- `macos-latest`\n- `windows-2022`\n\nThis keeps the public release path easy for other projects to reproduce.\nSelf-hosted runners remain compatibility fixtures: they prove that the protocol\ndoes not depend on GitHub-hosted images, but they are not the default public\ndistribution lane.\n\nThe protocol records runner facts in `artifact-evidence.json`; it does not\nrequire a specific runner class.\n\n## CLI\n\nGenerate a local release passport bundle from release assets:\n\n```bash\nbuildchain collect github-release \\\n --tag v2.2.0 \\\n --repository kungfu-systems/buildchain \\\n --assets-dir dist \\\n --publish-evidence-json .buildchain/release-evidence/v2.2.0/evidence.json \\\n --transaction-json .buildchain/release-state/v2.2.0/state.json \\\n --package-set-json package-set.json \\\n --anchor-manifest-json libnode.release.json \\\n --build-summary-json .buildchain/artifacts/build-summary.json \\\n --build-facts-json .buildchain/facts/native-core.json \\\n --build-facts-json .buildchain/facts/product.json \\\n --platform-manifest-json .buildchain/artifacts/linux-x64/manifest.json \\\n --platform-manifest-json .buildchain/artifacts/darwin-arm64/manifest.json \\\n --platform-manifest-json .buildchain/artifacts/win32-x64/manifest.json \\\n --dist-tag-evidence-json .buildchain/release-evidence/v2.2.0/dist-tag-evidence.json \\\n --kfd-1-witness-json .buildchain/kfd/kfd-1/contract-world.witness.json \\\n --kfd-2-claim-json .buildchain/kfd/kfd-2/release-claims.json \\\n --output-dir .buildchain/release-passport\n```\n\n`packageSet` records the ordered main-plus-platform package set.\n`publish.packages[]` summarizes each published npm package with its version,\ndist-tag, registry, role, platform, and digest, so agents do not need to stitch\nnpm facts back together from the lower-level evidence files.\n`buildSummary`, `platformArtifactManifests`, and `distTagPromotion` preserve the\nbuild and npm dist-tag evidence chain in the same passport. `buildFacts[]`\nrecords first-class module/product build facts, while\n`evidence.buildFacts[]` gives agents compact paths, SHA-256 hashes, contracts,\nids, and digests for quick audit traversal. See\n[`build-facts.md`](build-facts.md) for the fact collection and verification\ncontract.\n\n### KFD-1 contract-world release gate\n\nBuildchain can gate release artifacts with KFD-1 contract-world witnesses. This\nis a structured evidence protocol, not a request for consumers to shell out to\nthe Kungfu SDK. The authority chain is:\n\n1. KFD owns the standard metadata and schema ids in `@kungfu-tech/kfd`.\n2. Buildchain imports that metadata, owns the JSON formatting policy, freezes\n the pre-build witness, and independently verifies post-build artifact bytes.\n3. Consumers only pass declarative witness JSON plus the artifact payloads their\n build already produced.\n\nThis gives agents a concrete answer to \"what changed and can I trust it?\" A\nrelease can include both normal release passport evidence and KFD-1 evidence:\nthe passport proves the release transaction and artifacts are complete, while\nKFD-1 proves selected contract-world surfaces inside those artifacts are the\nbyte-for-byte surfaces the release intended to ship.\n\nThe witness JSON names the contract world, the canonical serialization policy,\nand the release surfaces that must be byte-for-byte verified:\n\n```json\n{\n \"id\": \"kungfu-config\",\n \"standard\": \"kfd-1\",\n \"source\": \"kfd\",\n \"contractWorld\": {\n \"id\": \"kungfu-config\",\n \"kind\": \"schema\",\n \"name\": \"Kungfu config schema\"\n },\n \"canonicalPolicy\": {\n \"format\": \"json\",\n \"encoding\": \"utf-8\",\n \"indent\": 2,\n \"trailingNewline\": true\n },\n \"surfaces\": [\n {\n \"id\": \"kungfu-config-schema\",\n \"artifactPath\": \"Contents/Resources/core/config.schema.json\",\n \"expectedSha256\": \"...\"\n }\n ]\n}\n```\n\n`collect github-release` writes the result under the KFD-provided top-level key\ncurrently named `kfd-1`. Each contract world records the frozen witness digest,\nthe KFD package version, KFD schema ids, the Buildchain formatting policy, and\nthe actual artifact digest observed after the build. Verification fails closed\nwhen the witness is missing required facts, an artifact cannot be found, or a\npost-build digest does not match the frozen witness.\n\nFor the KFD repository itself, the KFD-1 witness can be a self-hosted standard\ncontract witness. In that mode KFD owns the standard-contract facts and\nBuildchain verifies declared source standard metadata, schemas, package\nexports, and site-consumption entrypoints against the packaged artifact. The\npassport records source and artifact hash summaries, schema ids, the\nself-hosting boundary, result, residual risk, and responsibility state for\nsource ownership, artifact verification, and release-passport proof ownership.\n\nGood KFD-1 witnesses should point at release payload surfaces, not at private\nbuild-machine state. For Buildchain itself, the natural witness set is the\nrelease passport schema and implementation, KFD-1 gate implementation,\n`dist/site/buildchain-contract.json`, and the npm package payload files that\nexpose the public CLI, reusable workflow/action contracts, and site facts.\nThe final `buildchain.release.json` file should not be used as an ordinary\nbyte-for-byte KFD surface because it contains KFD evidence; instead, the\npassport is audited through release-state SHA, `check-report.json`, and the\ncontract files that generate and verify it.\n\n### KFD-2 release trust passport audit\n\nBuildchain can write a KFD-2 release trust passport audit under the top-level\n`kfd-2` section. The section is generated automatically from KFD-1 and KFD-3\nrelease-gate evidence, and callers may add explicit public release claims with\n`--kfd-2-claim-json`.\n\nEvery public claim must bind:\n\n- declared sources;\n- machine-readable evidence;\n- source/evidence/artifact hashes;\n- artifact coordinates;\n- verification results;\n- audit boundary;\n- responsibility state;\n- residual risk, even when the array is empty.\n\nUnbound public claims fail release passport verification. Claims that are\nmachine-bound but only supported by prose downgrade the KFD-2 audit and produce\na warning, so agents can distinguish \"verified\", \"needs review\", and \"not\nbound to evidence\" without reading release notes.\n\nFor Buildchain's own releases, public release claims are not authored in prose\ninside the workflow. The source registry is\n`packages/core/buildchain-kfd-claims.js`, published as\n`dist/site/kfd-claims.json` and exported as\n`@kungfu-tech/buildchain/buildchain-kfd-claims`. That registry is the\nversion-invariant source of public claims and collaboration surfaces: it does\nnot store the exact release version, promotion SHA, or exact runtime contract\ndigest. Those run-specific facts belong in the release passport and generated\nwitnesses. During Buildchain promotion,\n`scripts/generate-buildchain-kfd-witnesses.mjs` binds the source registry to the\ncurrent source/artifact hashes and generates:\n\n- a KFD-1 self contract-world witness for the packaged docs, schemas, workflows,\n actions, Node exports, and site-consumption facts;\n- one KFD-2 claim JSON per public Buildchain release claim;\n- KFD-3 pre-build and artifact witnesses for the same public collaboration\n surfaces.\n\nThe generated claim set covers Buildchain's KFD release passport support,\nagent-first single source of truth, floating `@v2` contract drift protection,\nsemver GitHub Release evidence publication, channel-preserving release\npropagation, and npm publish evidence/finalization. Buildchain self promotion\npasses those files into `promote-buildchain-ref`; `verifyReleasePassport()` then\nfails closed if any claim is missing source bindings, machine evidence, hashes,\nartifact coordinates, verification result, audit boundary, responsibility, or\nresidual risk.\n\n### KFD-3 collaboration-interface release gate\n\nKFD-3 asks a different release question than KFD-1. KFD-1 proves that named\npayload bytes match one contract world. KFD-3 proves that a product's shipped\nparticipant-facing collaboration/control surface is closed over its declared\ninterface.\n\nFor Buildchain itself, the declared interface starts in\n`packages/core/buildchain-kfd-claims.js`, not in this Markdown file. The\nregistry enumerates public human/agent surfaces across manuals, schema and\nstandard metadata, package exports, site-consumption contracts, workflows, and\nactions. `dist/site/kfd-claims.json` is the packaged machine-readable form used\nby downstream sites and by Buildchain's own release passport. Exact release\nversion/SHA binding is deliberately deferred to the promotion witness, so the\nsource registry can remain stable across semver version-state bumps.\n\nBuildchain also performs a reverse audit before that witness is used. The\ngenerated `dist/site/public-surface-audit.json` enumerates real CLI commands\nfrom `bin/buildchain.mjs`, workflow inputs, action inputs, site pages, and docs\ncommand references, then compares them with the generated registries. Buildchain\nself KFD witnesses include that audit result and classify the collaboration\ninterface as closed-world only when the reverse audit passes. If a public\ncommand, workflow input, action input, or site page is exposed without a\nregistry entry, `pnpm run check` fails before release promotion can produce a\npassport.\n\nThe product remains the fact source. Before build/publish, the product writes a\npre-build witness:\n\n```bash\nkungfu sdk collaboration-interface witness --json \\\n > .buildchain/kfd/kfd-3/collaboration-interface.prebuild.json\n```\n\nThat witness must contain, or point to, the product-owned KFD-3 collaboration\ninterface, registry digest, participants, and declared public shipped surfaces.\nKFD repository self-verification can declare the same facts as grouped machine\nsurfaces: docs, schemas, standards metadata, package exports, and\nsite-consumption contracts.\nAfter the artifact is built, the product also provides artifact-side evidence,\neither as a JSON file or a command:\n\n```bash\nbuildchain collect github-release \\\n --kfd-3-prebuild-witness-json .buildchain/kfd/kfd-3/collaboration-interface.prebuild.json \\\n --kfd-3-artifact-verify-cmd \"kungfu agent verify --json\"\n```\n\nBuildchain imports the KFD-3 metadata from `@kungfu-tech/kfd`, freezes the\npre-build witness digest, ingests the artifact witness, and compares the two\nsets:\n\n- every declared `shipped` public participant-facing surface must appear in the\n artifact witness;\n- every artifact-exposed public participant-facing surface must be declared by\n the pre-build witness;\n- if both witnesses record `collaborationInterface.digest`, the digests must\n match;\n- contradictory, missing, stale, or schema-incomplete evidence fails closed.\n\nThe generated release passport records the result under the KFD-provided\ntop-level key currently named `kfd-3`. The section includes the KFD package\nversion, schema ids/paths, pre-build witness digest, artifact witness digest,\ndeclared/exposed surface counts, missing declared shipped surfaces, and\nunclassified artifact public surfaces. Buildchain also projects the same\ncollaboration-interface evidence into the top-level `kfd-2` audit as a\nmachine-readable `trustProof` object on the generated `kfd-3:*` public claim.\nThat proof carries `releaseStatus`, witness file hashes and canonical hashes,\ndeclared capability verification, reverse audit result and boundary, residual\nrisk, and responsibility state.\n\nThe trust proof makes the strongest claim only when the witnesses justify it:\n`No unclassified reachable surface within the declared audit boundary.` If the\nproduct declares non-exhaustive surfaces, Buildchain keeps the passport\nverifiable but marks the interface `audited` instead of `enforced` and records\nthe residual risk explicitly. Draft or partial KFD-3 declarations are\ndowngraded; missing declared capabilities, undeclared public artifact surfaces,\nor stale collaboration-interface digests fail the proof.\n\nThis makes KFD-3 support usable by readers and agents immediately: they can\ninspect `buildchain.release.json` and know whether the released package\nactually exposes no more and no less than the declared collaboration interface,\ninstead of trusting docs or release notes.\n\n### Floating Buildchain contract lock\n\nKFD-1 protects release payload surfaces. Floating ref contract locks protect the\nconsumer's relationship to Buildchain itself. A consumer can keep\n`.buildchain/contract-lock.json` with the Buildchain floating ref it accepted,\nthe resolved SHA, the contract digest, and the compatibility policy. Each\nBuildchain run reads the actual contract from the checked-out Buildchain ref\nand compares it before heavy build or publish work begins.\n\nCompatible drift, such as optional inputs or extra diagnostics, continues and\ncreates a consumer-local issue for review. Breaking drift fails fast. This means\nconsumers can use `@v2` without silently accepting incompatible changes, while\nBuildchain maintainers can still ship compatible improvements under the same\nmajor floating tag.\n\n`impact.json` can be supplied with `--impact-json`. Production release\npassports (`release/*`) and major publish-gate passports require\n`surfaceImpacts[]`; alpha, local, and legacy passport contexts keep the field\noptional. When `surfaceImpacts[]` is required or supplied, verification fails\nclosed unless each entry has an id, impact, and rationale, and\n`versionImpact.final` matches the highest surface impact. For example, KFD-2\ncontent can remain patch while an additive `registry.kind` field on the\nmachine-consumed KFD registry schema records a minor `kfd-registry-schema`\nsurface impact.\n\nVerify a release passport:\n\n```bash\nbuildchain verify release-passport .buildchain/release-passport/buildchain.release.json\n```\n\nVerify a specific artifact by discovering its detached passport:\n\n```bash\nbuildchain verify artifact ./Kungfu-2.8.0-windows-x64.exe\n```\n\nArtifact verification is subject-centric. Buildchain identifies the subject,\ncomputes or obtains its digest, discovers a detached `buildchain.release.json`,\nverifies that release passport and its evidence, then proves the subject digest\nappears in the passport's artifacts, package set, publish evidence, or artifact\nevidence. The command returns `pass`, `fail`, or `unverifiable`; missing\npassports and digest mismatches fail closed.\n\nFor npm subjects, Buildchain treats the registry as the package digest source:\n`npm:<name>@<version>` resolves `dist.integrity` and matches it against\n`packageSet.main.digest`, `packageSet.platforms[].digest`, and publish evidence.\nUse `--npm-registry <url>` when the package comes from a non-default registry.\n\nDiscovery is ordered and auditable:\n\n1. explicit `--passport`;\n2. sidecar pointer;\n3. embedded/package pointer;\n4. local config or org index;\n5. GitHub Release default from artifact naming/repository/tag hints;\n6. custom locator;\n7. unverifiable with retry guidance.\n\nFor Buildchain-managed GitHub Release lanes, release passport files are\npublished as release assets by default when the upload backend is enabled, so a\nGitHub Release asset URL can discover the sibling `buildchain.release.json`\nwithout a consumer copying YAML resolver logic.\n\nExplain a release to an agent:\n\n```bash\nbuildchain explain release \\\n --passport .buildchain/release-passport/buildchain.release.json \\\n --for agent \\\n --json\n```\n\nThe verifier fails closed when a passport omits artifacts, omits evidence, has\ndigest mismatches, or misses required protocol files.\n\n## Binary Distribution\n\nInitial binary distribution stays lightweight:\n\n- GitHub Release assets.\n- `checksums.txt`.\n- release passport artifacts.\n- a single release evidence bundle.\n- install scripts and Homebrew tap fixtures after the passport path is reliable.\n\nBuildchain publishes platform-specific archives, not loose top-level\nexecutables:\n\n- `buildchain-x86_64-unknown-linux-gnu.tar.gz`\n- `buildchain-aarch64-apple-darwin.tar.gz`\n- `buildchain-x86_64-pc-windows-msvc.zip`\n\nThe executable name inside each archive stays natural for the platform\n(`buildchain` or `buildchain.exe`). Top-level loose executable assets are not\nuploaded, because Linux and macOS would otherwise collide when GitHub Actions\nmatrix artifacts are merged.\n\nHeavy package manager channels such as apt, yum, winget, choco, Scoop, mise, or\nasdf are out of the P0/P1 scope until there is real external demand.\n\nStandalone binaries are a distribution shape, not a second implementation. The\nsource of truth remains the Node/ESM CLI and core library.\n\nThe standalone binary builder imports `@kungfu-tech/buildchain/logging` directly\nand records setup, SEA blob generation, injection, signing, archiving, manifest,\nand evidence phases. The GitHub workflow wraps the same build and passport\nsteps with `buildchain mark`, `buildchain span`,\n`buildchain verify observability-log`, and `buildchain log summary`. Logging is\na hard release gate: missing events, error events, or missing required phases\nfail the job before assets are uploaded. The verified logs are release assets\nand are covered by the release passport digest checks.\n\nSee also [`binary-distribution.md`](binary-distribution.md) for asset naming and\nbundle details, and [`install.md`](install.md) for consumer commands."
1541
+ "markdown": "# Release Passport\n\nBuildchain Release Passport is the core product mechanism: a mature product\nrelease record for artifacts that users or agents depend on.\n\nThe protocol is GitHub-native because it uses protected refs, reviewed\npromotion PRs, exact tags, GitHub Releases, npm Trusted Publishing, and\nmachine-readable evidence. A project can keep its existing build system and use\nBuildchain to make the release record auditable.\n\nRelease-candidate and final passports may also include compact\n`controllerReceipts[]` references. These bind a real reusable-workflow receipt\nto its plan digest, consumer source SHA, and exact Buildchain runtime SHA; they\ndo not infer execution evidence from a green job. See\n[`controller-evidence.md`](controller-evidence.md).\n\n## Contract\n\nThe release passport surface is a welded contract. Additive fields are allowed;\nbreaking semantic changes require a new major line.\n\nIndependent verifiers can pin two package-owned, standalone files without\nscraping this implementation:\n\n- `dist/site/schemas/release-passport-v1.schema.json` is the self-contained\n JSON Schema for the Buildchain-owned envelope;\n- `dist/site/release-passport-check-manifest.json` names the normative checker,\n required and conditional sibling evidence, local-resolution rules,\n Buildchain aggregation fields, canonical KFD subsection schema authorities,\n and forward-compatibility policy.\n\nThe same files are exported as\n`@kungfu-tech/buildchain/site/schemas/release-passport-v1.schema.json` and\n`@kungfu-tech/buildchain/site/release-passport-check-manifest.json`. The schema\nchecks the envelope shape. `buildchain verify release-passport` remains the\nnormative semantic checker: it resolves sibling evidence relative to the\npassport and fails closed on missing evidence, digest drift, or inconsistent\nrelease facts. Buildchain owns envelope aggregation; KFD retains schema and\ncompatibility authority for the `kfd-1`, `kfd-2`, and `kfd-3` subsections.\n\nP0 protocol artifacts:\n\n- `product-mechanism.json`\n- `buildchain.release.json`\n- `artifact-evidence.json`\n- `impact.json`\n- `agent-index.json`\n- `check-report.json`\n- `llms.txt`\n- `buildchain-release-bundle.json`\n- `buildchain-release-bundle.tar.gz`\n\n`buildchain.release.json` is the first file an agent should read. It points to\nartifact evidence, impact, recovery, product mechanism, and agent index facts.\nIt is also the unified release responsibility summary: when publish\ntransactions are used, the same passport records the package set, npm dist-tags,\nrelease source refs, release-state ref, anchor manifest, registry artifact\ndigests, trusted publishing evidence, and transaction result.\n\nAdditive passport sections:\n\n- `release`: public release tag, internal transaction tag, line, channel,\n source SHA, target ref, release SHA, release material SHA, publish tooling\n SHA, and durable release-state ref. Anchored/manual package releases use the\n published package version for the public tag while preserving the internal\n exact transaction tag for Buildchain recovery.\n- `versionImpact`: final patch/minor/major classification, source, and\n rationale.\n- `surfaceImpacts`: per registered surface classification. The final impact is\n the highest entry in this list.\n- `packageSet`: main package, platform packages, package-set order, registry,\n versions, dist-tags, and package digests.\n- `anchorManifest`: anchored/manual version manifest path, digest, and fields.\n- `trustedPublishing`: provider, auth mode, workflow run evidence, and whether\n trusted publishing was enabled.\n- `transaction`: durable Buildchain release transaction id, state, exact tag,\n release SHA, state ref, and state SHA.\n- `surfaceTimestampPolicy`: the common Buildchain surface manifest timestamp\n policy. It records real CI/release generation and publication times,\n reproducibility inputs, source revision or source-date-epoch, and whether\n timestamp fields participate in the release artifact digest.\n- `buildFacts`: module/product build facts that bind Git source digests,\n version sources, lifecycle invocations, platforms, outputs, product\n artifacts, and verification results to the release.\n- `artifacts`: release assets and registry artifacts in one list, each pointing\n back to the evidence file that proves its digest. Registry artifacts retain\n optional built/reused action, content and current-release coordinates,\n platform/contract/parent metadata, and fail-closed verification evidence.\n\nBuildchain's own binary lane also publishes observability artifacts generated by\nthe Buildchain logging API and CLI:\n\n- `buildchain-log-events-<platform>.jsonl`\n- `buildchain-log-summary-<platform>.json`\n- `buildchain-log-events-passport.jsonl`\n- `buildchain-log-summary-passport.json`\n\n`buildchain-release-bundle.tar.gz` is the single evidence bundle for consumers\nthat want one file for offline inspection, mirroring, or site ingestion.\n`buildchain-release-bundle.json` records its digest and the digest of every\nincluded file.\n\n## Runner Policy\n\nProduction binary distribution should use GitHub-hosted runners by default:\n\n- `ubuntu-24.04`\n- `macos-latest`\n- `windows-2022`\n\nThis keeps the public release path easy for other projects to reproduce.\nSelf-hosted runners remain compatibility fixtures: they prove that the protocol\ndoes not depend on GitHub-hosted images, but they are not the default public\ndistribution lane.\n\nThe protocol records runner facts in `artifact-evidence.json`; it does not\nrequire a specific runner class.\n\n## CLI\n\nGenerate a local release passport bundle from release assets:\n\n```bash\nbuildchain collect github-release \\\n --tag v2.2.0 \\\n --repository kungfu-systems/buildchain \\\n --assets-dir dist \\\n --publish-evidence-json .buildchain/release-evidence/v2.2.0/evidence.json \\\n --transaction-json .buildchain/release-state/v2.2.0/state.json \\\n --package-set-json package-set.json \\\n --anchor-manifest-json libnode.release.json \\\n --build-summary-json .buildchain/artifacts/build-summary.json \\\n --build-facts-json .buildchain/facts/native-core.json \\\n --build-facts-json .buildchain/facts/product.json \\\n --platform-manifest-json .buildchain/artifacts/linux-x64/manifest.json \\\n --platform-manifest-json .buildchain/artifacts/darwin-arm64/manifest.json \\\n --platform-manifest-json .buildchain/artifacts/win32-x64/manifest.json \\\n --dist-tag-evidence-json .buildchain/release-evidence/v2.2.0/dist-tag-evidence.json \\\n --kfd-1-witness-json .buildchain/kfd/kfd-1/contract-world.witness.json \\\n --kfd-2-claim-json .buildchain/kfd/kfd-2/release-claims.json \\\n --output-dir .buildchain/release-passport\n```\n\n`packageSet` records the ordered main-plus-platform package set.\n`publish.packages[]` summarizes each published npm package with its version,\ndist-tag, registry, role, platform, and digest, so agents do not need to stitch\nnpm facts back together from the lower-level evidence files.\n`buildSummary`, `platformArtifactManifests`, and `distTagPromotion` preserve the\nbuild and npm dist-tag evidence chain in the same passport. `buildFacts[]`\nrecords first-class module/product build facts, while\n`evidence.buildFacts[]` gives agents compact paths, SHA-256 hashes, contracts,\nids, and digests for quick audit traversal. See\n[`build-facts.md`](build-facts.md) for the fact collection and verification\ncontract.\n\n### KFD-1 contract-world release gate\n\nBuildchain can gate release artifacts with KFD-1 contract-world witnesses. This\nis a structured evidence protocol, not a request for consumers to shell out to\nthe Kungfu SDK. The authority chain is:\n\n1. KFD owns the standard metadata and schema ids in `@kungfu-tech/kfd`.\n2. Buildchain imports that metadata, owns the JSON formatting policy, freezes\n the pre-build witness, and independently verifies post-build artifact bytes.\n3. Consumers only pass declarative witness JSON plus the artifact payloads their\n build already produced.\n\nThis gives agents a concrete answer to \"what changed and can I trust it?\" A\nrelease can include both normal release passport evidence and KFD-1 evidence:\nthe passport proves the release transaction and artifacts are complete, while\nKFD-1 proves selected contract-world surfaces inside those artifacts are the\nbyte-for-byte surfaces the release intended to ship.\n\nThe witness JSON names the contract world, the canonical serialization policy,\nand the release surfaces that must be byte-for-byte verified:\n\n```json\n{\n \"id\": \"kungfu-config\",\n \"standard\": \"kfd-1\",\n \"source\": \"kfd\",\n \"contractWorld\": {\n \"id\": \"kungfu-config\",\n \"kind\": \"schema\",\n \"name\": \"Kungfu config schema\"\n },\n \"canonicalPolicy\": {\n \"format\": \"json\",\n \"encoding\": \"utf-8\",\n \"indent\": 2,\n \"trailingNewline\": true\n },\n \"surfaces\": [\n {\n \"id\": \"kungfu-config-schema\",\n \"artifactPath\": \"Contents/Resources/core/config.schema.json\",\n \"expectedSha256\": \"...\"\n }\n ]\n}\n```\n\n`collect github-release` writes the result under the KFD-provided top-level key\ncurrently named `kfd-1`. Each contract world records the frozen witness digest,\nthe KFD package version, KFD schema ids, the Buildchain formatting policy, and\nthe actual artifact digest observed after the build. Verification fails closed\nwhen the witness is missing required facts, an artifact cannot be found, or a\npost-build digest does not match the frozen witness.\n\nFor the KFD repository itself, the KFD-1 witness can be a self-hosted standard\ncontract witness. In that mode KFD owns the standard-contract facts and\nBuildchain verifies declared source standard metadata, schemas, package\nexports, and site-consumption entrypoints against the packaged artifact. The\npassport records source and artifact hash summaries, schema ids, the\nself-hosting boundary, result, residual risk, and responsibility state for\nsource ownership, artifact verification, and release-passport proof ownership.\n\nGood KFD-1 witnesses should point at release payload surfaces, not at private\nbuild-machine state. For Buildchain itself, the natural witness set is the\nrelease passport schema and implementation, KFD-1 gate implementation,\n`dist/site/buildchain-contract.json`, and the npm package payload files that\nexpose the public CLI, reusable workflow/action contracts, and site facts.\nThe final `buildchain.release.json` file should not be used as an ordinary\nbyte-for-byte KFD surface because it contains KFD evidence; instead, the\npassport is audited through release-state SHA, `check-report.json`, and the\ncontract files that generate and verify it.\n\n### KFD-2 release trust passport audit\n\nBuildchain can write a KFD-2 release trust passport audit under the top-level\n`kfd-2` section. The section is generated automatically from KFD-1 and KFD-3\nrelease-gate evidence, and callers may add explicit public release claims with\n`--kfd-2-claim-json`.\n\nEvery public claim must bind:\n\n- declared sources;\n- machine-readable evidence;\n- source/evidence/artifact hashes;\n- artifact coordinates;\n- verification results;\n- audit boundary;\n- responsibility state;\n- residual risk, even when the array is empty.\n\nUnbound public claims fail release passport verification. Claims that are\nmachine-bound but only supported by prose downgrade the KFD-2 audit and produce\na warning, so agents can distinguish \"verified\", \"needs review\", and \"not\nbound to evidence\" without reading release notes.\n\nFor Buildchain's own releases, public release claims are not authored in prose\ninside the workflow. The source registry is\n`packages/core/buildchain-kfd-claims.js`, published as\n`dist/site/kfd-claims.json` and exported as\n`@kungfu-tech/buildchain/buildchain-kfd-claims`. That registry is the\nversion-invariant source of public claims and collaboration surfaces: it does\nnot store the exact release version, promotion SHA, or exact runtime contract\ndigest. Those run-specific facts belong in the release passport and generated\nwitnesses. During Buildchain promotion,\n`scripts/generate-buildchain-kfd-witnesses.mjs` binds the source registry to the\ncurrent source/artifact hashes and generates:\n\n- a KFD-1 self contract-world witness for the packaged docs, schemas, workflows,\n actions, Node exports, and site-consumption facts;\n- one KFD-2 claim JSON per public Buildchain release claim;\n- KFD-3 pre-build and artifact witnesses for the same public collaboration\n surfaces.\n\nThe generated claim set covers Buildchain's KFD release passport support,\nagent-first single source of truth, floating `@v2` contract drift protection,\nsemver GitHub Release evidence publication, channel-preserving release\npropagation, and npm publish evidence/finalization. Buildchain self promotion\npasses those files into `promote-buildchain-ref`; `verifyReleasePassport()` then\nfails closed if any claim is missing source bindings, machine evidence, hashes,\nartifact coordinates, verification result, audit boundary, responsibility, or\nresidual risk.\n\n### KFD-3 collaboration-interface release gate\n\nKFD-3 asks a different release question than KFD-1. KFD-1 proves that named\npayload bytes match one contract world. KFD-3 proves that a product's shipped\nparticipant-facing collaboration/control surface is closed over its declared\ninterface.\n\nFor Buildchain itself, the declared interface starts in\n`packages/core/buildchain-kfd-claims.js`, not in this Markdown file. The\nregistry enumerates public human/agent surfaces across manuals, schema and\nstandard metadata, package exports, site-consumption contracts, workflows, and\nactions. `dist/site/kfd-claims.json` is the packaged machine-readable form used\nby downstream sites and by Buildchain's own release passport. Exact release\nversion/SHA binding is deliberately deferred to the promotion witness, so the\nsource registry can remain stable across semver version-state bumps.\n\nBuildchain also performs a reverse audit before that witness is used. The\ngenerated `dist/site/public-surface-audit.json` enumerates real CLI commands\nfrom `bin/buildchain.mjs`, workflow inputs, action inputs, site pages, and docs\ncommand references, then compares them with the generated registries. Buildchain\nself KFD witnesses include that audit result and classify the collaboration\ninterface as closed-world only when the reverse audit passes. If a public\ncommand, workflow input, action input, or site page is exposed without a\nregistry entry, `pnpm run check` fails before release promotion can produce a\npassport.\n\nThe product remains the fact source. Before build/publish, the product writes a\npre-build witness:\n\n```bash\nkungfu sdk collaboration-interface witness --json \\\n > .buildchain/kfd/kfd-3/collaboration-interface.prebuild.json\n```\n\nThat witness must contain, or point to, the product-owned KFD-3 collaboration\ninterface, registry digest, participants, and declared public shipped surfaces.\nKFD repository self-verification can declare the same facts as grouped machine\nsurfaces: docs, schemas, standards metadata, package exports, and\nsite-consumption contracts.\nAfter the artifact is built, the product also provides artifact-side evidence,\neither as a JSON file or a command:\n\n```bash\nbuildchain collect github-release \\\n --kfd-3-prebuild-witness-json .buildchain/kfd/kfd-3/collaboration-interface.prebuild.json \\\n --kfd-3-artifact-verify-cmd \"kungfu agent verify --json\"\n```\n\nBuildchain imports the KFD-3 metadata from `@kungfu-tech/kfd`, freezes the\npre-build witness digest, ingests the artifact witness, and compares the two\nsets:\n\n- every declared `shipped` public participant-facing surface must appear in the\n artifact witness;\n- every artifact-exposed public participant-facing surface must be declared by\n the pre-build witness;\n- if both witnesses record `collaborationInterface.digest`, the digests must\n match;\n- contradictory, missing, stale, or schema-incomplete evidence fails closed.\n\nThe generated release passport records the result under the KFD-provided\ntop-level key currently named `kfd-3`. The section includes the KFD package\nversion, schema ids/paths, pre-build witness digest, artifact witness digest,\ndeclared/exposed surface counts, missing declared shipped surfaces, and\nunclassified artifact public surfaces. Buildchain also projects the same\ncollaboration-interface evidence into the top-level `kfd-2` audit as a\nmachine-readable `trustProof` object on the generated `kfd-3:*` public claim.\nThat proof carries `releaseStatus`, witness file hashes and canonical hashes,\ndeclared capability verification, reverse audit result and boundary, residual\nrisk, and responsibility state.\n\nThe trust proof makes the strongest claim only when the witnesses justify it:\n`No unclassified reachable surface within the declared audit boundary.` If the\nproduct declares non-exhaustive surfaces, Buildchain keeps the passport\nverifiable but marks the interface `audited` instead of `enforced` and records\nthe residual risk explicitly. Draft or partial KFD-3 declarations are\ndowngraded; missing declared capabilities, undeclared public artifact surfaces,\nor stale collaboration-interface digests fail the proof.\n\nThis makes KFD-3 support usable by readers and agents immediately: they can\ninspect `buildchain.release.json` and know whether the released package\nactually exposes no more and no less than the declared collaboration interface,\ninstead of trusting docs or release notes.\n\n### Floating Buildchain contract lock\n\nKFD-1 protects release payload surfaces. Floating ref contract locks protect the\nconsumer's relationship to Buildchain itself. A consumer can keep\n`.buildchain/contract-lock.json` with the Buildchain floating ref it accepted,\nthe resolved SHA, the contract digest, and the compatibility policy. Each\nBuildchain run reads the actual contract from the checked-out Buildchain ref\nand compares it before heavy build or publish work begins.\n\nCompatible drift, such as optional inputs or extra diagnostics, continues and\ncreates a consumer-local issue for review. Breaking drift fails fast. This means\nconsumers can use `@v2` without silently accepting incompatible changes, while\nBuildchain maintainers can still ship compatible improvements under the same\nmajor floating tag.\n\n`impact.json` can be supplied with `--impact-json`. Production release\npassports (`release/*`) and major publish-gate passports require\n`surfaceImpacts[]`; alpha, local, and legacy passport contexts keep the field\noptional. When `surfaceImpacts[]` is required or supplied, verification fails\nclosed unless each entry has an id, impact, and rationale, and\n`versionImpact.final` matches the highest surface impact. For example, KFD-2\ncontent can remain patch while an additive `registry.kind` field on the\nmachine-consumed KFD registry schema records a minor `kfd-registry-schema`\nsurface impact.\n\nVerify a release passport:\n\n```bash\nbuildchain verify release-passport .buildchain/release-passport/buildchain.release.json\n```\n\nVerify a specific artifact by discovering its detached passport:\n\n```bash\nbuildchain verify artifact ./Kungfu-2.8.0-windows-x64.exe\n```\n\nArtifact verification is subject-centric. Buildchain identifies the subject,\ncomputes or obtains its digest, discovers a detached `buildchain.release.json`,\nverifies that release passport and its evidence, then proves the subject digest\nappears in the passport's artifacts, package set, publish evidence, or artifact\nevidence. The command returns `pass`, `fail`, or `unverifiable`; missing\npassports and digest mismatches fail closed.\n\nFor npm subjects, Buildchain treats the registry as the package digest source:\n`npm:<name>@<version>` resolves `dist.integrity` and matches it against\n`packageSet.main.digest`, `packageSet.platforms[].digest`, and publish evidence.\nUse `--npm-registry <url>` when the package comes from a non-default registry.\n\nDiscovery is ordered and auditable:\n\n1. explicit `--passport`;\n2. sidecar pointer;\n3. embedded/package pointer;\n4. local config or org index;\n5. GitHub Release default from artifact naming/repository/tag hints;\n6. custom locator;\n7. unverifiable with retry guidance.\n\nFor Buildchain-managed GitHub Release lanes, release passport files are\npublished as release assets by default when the upload backend is enabled, so a\nGitHub Release asset URL can discover the sibling `buildchain.release.json`\nwithout a consumer copying YAML resolver logic.\n\nExplain a release to an agent:\n\n```bash\nbuildchain explain release \\\n --passport .buildchain/release-passport/buildchain.release.json \\\n --for agent \\\n --json\n```\n\nThe verifier fails closed when a passport omits artifacts, omits evidence, has\ndigest mismatches, or misses required protocol files.\n\n## Binary Distribution\n\nInitial binary distribution stays lightweight:\n\n- GitHub Release assets.\n- `checksums.txt`.\n- release passport artifacts.\n- a single release evidence bundle.\n- install scripts and Homebrew tap fixtures after the passport path is reliable.\n\nBuildchain publishes platform-specific archives, not loose top-level\nexecutables:\n\n- `buildchain-x86_64-unknown-linux-gnu.tar.gz`\n- `buildchain-aarch64-apple-darwin.tar.gz`\n- `buildchain-x86_64-pc-windows-msvc.zip`\n\nThe executable name inside each archive stays natural for the platform\n(`buildchain` or `buildchain.exe`). Top-level loose executable assets are not\nuploaded, because Linux and macOS would otherwise collide when GitHub Actions\nmatrix artifacts are merged.\n\nHeavy package manager channels such as apt, yum, winget, choco, Scoop, mise, or\nasdf are out of the P0/P1 scope until there is real external demand.\n\nStandalone binaries are a distribution shape, not a second implementation. The\nsource of truth remains the Node/ESM CLI and core library.\n\nThe standalone binary builder imports `@kungfu-tech/buildchain/logging` directly\nand records setup, SEA blob generation, injection, signing, archiving, manifest,\nand evidence phases. The GitHub workflow wraps the same build and passport\nsteps with `buildchain mark`, `buildchain span`,\n`buildchain verify observability-log`, and `buildchain log summary`. Logging is\na hard release gate: missing events, error events, or missing required phases\nfail the job before assets are uploaded. The verified logs are release assets\nand are covered by the release passport digest checks.\n\nSee also [`binary-distribution.md`](binary-distribution.md) for asset naming and\nbundle details, and [`install.md`](install.md) for consumer commands."
1542
1542
  },
1543
1543
  {
1544
1544
  "id": "manual:release-propagation",
@@ -1552,7 +1552,7 @@
1552
1552
  ],
1553
1553
  "maturity": "preview",
1554
1554
  "sourcePath": "docs/release-propagation.md",
1555
- "digest": "sha256:d5877075eb41a3d41e531549da113756d29d6f34c91e3b68b8ce650753d5ca1d",
1555
+ "digest": "sha256:fc2b743e3d76c4f90cdd8c6560cf9d619ad25d74c15c074be96db7bcb6cc2a29",
1556
1556
  "headings": [
1557
1557
  {
1558
1558
  "level": 1,
@@ -1585,7 +1585,7 @@
1585
1585
  "anchor": "kfd-to-site-libkungfu-dev"
1586
1586
  }
1587
1587
  ],
1588
- "markdown": "# Release Propagation\n\nRelease propagation lets a finalized upstream release open a downstream update\nPR using the upstream release passport as the audit source. It is for product\nchains such as:\n\n```text\nkfd -> site-libkungfu-dev\nA -> B -> C\n```\n\nThe downstream repository receives an exact lock, not a floating dist-tag. A\nsite or app can then consume the upstream package, site bundle, or release\npassport as its single source of truth without hand-copying release facts.\n\n## Contract\n\nThe propagation graph is declarative JSON:\n\n```json\n{\n \"schemaVersion\": 1,\n \"contract\": \"kungfu-buildchain-release-propagation-graph\",\n \"nodes\": [\n {\n \"id\": \"kfd\",\n \"repository\": \"kungfu-systems/kfd\",\n \"package\": \"@kungfu-tech/kfd\"\n },\n {\n \"id\": \"site-libkungfu-dev\",\n \"repository\": \"kungfu-systems/site-libkungfu-dev\",\n \"lockPath\": \"buildchain.upstreams/kfd.release.json\",\n \"baseRef\": \"dev/v2/v2.7\"\n }\n ],\n \"edges\": [\n {\n \"id\": \"kfd-to-site\",\n \"from\": \"kfd\",\n \"to\": \"site-libkungfu-dev\",\n \"channelPolicy\": \"preserve\"\n }\n ]\n}\n```\n\n`channelPolicy: \"preserve\"` is the default and maps:\n\n```text\nalpha -> alpha\nrelease -> release\n```\n\nCross-channel mapping is allowed only when an edge declares\n`channelPolicy: \"explicit\"` and a `channelMap`. Buildchain rejects cycles so a\nchain can fan out or continue as `A -> B -> C`, but cannot loop back into an\nalready visited release line.\n\n## Upstream Release Envelope\n\nThe upstream release envelope is the post-finalization fact set:\n\n```json\n{\n \"repository\": \"kungfu-systems/kfd\",\n \"channel\": \"alpha\",\n \"tag\": \"v1.4.0-alpha.3\",\n \"sourceSha\": \"1111111111111111111111111111111111111111\",\n \"package\": {\n \"name\": \"@kungfu-tech/kfd\",\n \"version\": \"1.4.0-alpha.3\",\n \"integrity\": \"sha512-...\"\n },\n \"releasePassport\": {\n \"url\": \"https://github.com/kungfu-systems/kfd/releases/download/v1.4.0-alpha.3/buildchain.release.json\",\n \"sha256\": \"2222222222222222222222222222222222222222222222222222222222222222\"\n },\n \"siteBundle\": {\n \"manifestSha256\": \"3333333333333333333333333333333333333333333333333333333333333333\"\n }\n}\n```\n\nThe package version and integrity must be exact. Downstream build logic should\ninstall that version directly, not resolve `alpha` or `latest` again.\n\nPublication repositories can propagate immutable publication archive evidence\nwithout npm package facts. The upstream envelope then includes\n`publicationArtifact`:\n\n```json\n{\n \"repository\": \"kungfu-systems/paper-observer-declared-timelines\",\n \"channel\": \"alpha\",\n \"tag\": \"v0.1.0-alpha.1\",\n \"sourceSha\": \"4444444444444444444444444444444444444444\",\n \"releasePassport\": {\n \"url\": \"https://github.com/kungfu-systems/paper-observer-declared-timelines/releases/download/v0.1.0-alpha.1/buildchain.release.json\",\n \"sha256\": \"5555555555555555555555555555555555555555555555555555555555555555\"\n },\n \"publicationArtifact\": {\n \"id\": \"observer-declared-timelines\",\n \"kind\": \"paper\",\n \"version\": \"0.1.0-alpha.1\",\n \"canonicalUrl\": \"https://papers.libkungfu.dev/observer-declared-timelines/\",\n \"latestUrl\": \"https://papers.libkungfu.dev/observer-declared-timelines/latest/\",\n \"latestEvidenceUrl\": \"https://papers.libkungfu.dev/observer-declared-timelines/latest/buildchain.release.json\",\n \"immutableVersionUrl\": \"https://papers.libkungfu.dev/archive/observer-declared-timelines/v0.1.0-alpha.1/\",\n \"registry\": {\n \"url\": \"https://github.com/kungfu-systems/paper-observer-declared-timelines/releases/download/v0.1.0-alpha.1/publication-registry.json\",\n \"sha256\": \"6666666666666666666666666666666666666666666666666666666666666666\"\n },\n \"manifest\": {\n \"url\": \"https://github.com/kungfu-systems/paper-observer-declared-timelines/releases/download/v0.1.0-alpha.1/publication-artifact.json\",\n \"sha256\": \"7777777777777777777777777777777777777777777777777777777777777777\"\n },\n \"passport\": {\n \"url\": \"https://github.com/kungfu-systems/paper-observer-declared-timelines/releases/download/v0.1.0-alpha.1/publication-artifact-passport.json\",\n \"sha256\": \"8888888888888888888888888888888888888888888888888888888888888888\"\n },\n \"primaryArtifact\": {\n \"path\": \"_build/main.pdf\",\n \"url\": \"https://papers.libkungfu.dev/archive/observer-declared-timelines/v0.1.0-alpha.1/main.pdf\",\n \"sha256\": \"9999999999999999999999999999999999999999999999999999999999999999\"\n }\n }\n}\n```\n\nThis lets a site repository render the latest reader page and historical\nversion index from release facts while keeping old PDFs, source bundles,\nmanifests, and passports immutable.\n\n## CLI\n\nGenerate a propagation plan:\n\n```bash\nbuildchain release-propagation plan \\\n --graph buildchain.release-propagation.json \\\n --upstream-release .buildchain/upstream-release.json \\\n --output .buildchain/release-propagation-plan.json \\\n --json\n```\n\nWrite the downstream lock:\n\n```bash\nbuildchain release-propagation write-lock \\\n --plan .buildchain/release-propagation-plan.json \\\n --target site-libkungfu-dev \\\n --cwd downstream-checkout \\\n --json\n```\n\nThe written lock has contract\n`kungfu-buildchain-release-propagation-lock` and records:\n\n- upstream repository, channel, exact tag, source SHA;\n- optional npm package name, exact version, and sha512 integrity;\n- optional publication artifact canonical/latest/immutable URLs, registry,\n manifest, passport, source bundle, and primary artifact digests;\n- release passport URL and SHA-256;\n- optional site bundle manifest SHA-256;\n- downstream repository, channel, base ref, lock path;\n- edge id and channel policy.\n\n## Reusable Workflow\n\nUpstream repositories can call\n`.github/workflows/release-propagation.yml@v2` after release finalization:\n\n```yaml\njobs:\n propagate-site:\n uses: kungfu-systems/buildchain/.github/workflows/release-propagation.yml@v2\n with:\n buildchain-ref: v2\n graph-json: ${{ needs.release.outputs.propagation-graph-json }}\n upstream-release-json: ${{ needs.release.outputs.upstream-release-json }}\n downstream-target: site-libkungfu-dev\n downstream-repository: kungfu-systems/site-libkungfu-dev\n downstream-base-ref: dev/v2/v2.7\n dry-run: false\n secrets:\n propagation-token: ${{ secrets.BUILDCHAIN_PROMOTION_TOKEN }}\n```\n\nThe downstream branch name may be reused across upstream releases. Before\nreplacing an existing managed branch, the workflow reads its exact remote SHA\nand pushes with an explicit `--force-with-lease=<ref>:<sha>`. A surviving branch\nfrom a merged PR is therefore reconciled without manual deletion, while a\nconcurrent writer makes the lease fail closed. The controller receipt includes a\n`propagation-branch-reconciliation` evidence file recording the branch, observed\nremote SHA, pushed SHA, lease mode, and the deterministically created or updated\nopen PR.\n\nThe workflow checks out the Buildchain runtime selected by\n`buildchain-repository` and `buildchain-ref` into `.buildchain/runtime`, invokes\nthat runtime for the propagation plan and lock write, then checks out the\ndownstream repository, writes the exact lock, and opens or updates a PR. It does\nnot publish the downstream release directly. The downstream repository keeps its\nnormal Buildchain governance: the PR updates source-of-truth facts, then\ndownstream alpha or release publication runs through its own protected channel.\nThe workflow stages the declared lock path before checking the index, so the\nfirst propagation creates a PR even when the lock did not previously exist; a\nbyte-identical rerun is an explicit successful no-op.\nFor unreleased runtime validation, keep the caller's reusable workflow reference\non `@v2` and pass a temporary train ref through `buildchain-ref`.\n\n## kfd to site-libkungfu-dev\n\nFor `kfd -> site-libkungfu-dev`, the graph should preserve channels:\n\n- a `kfd` alpha release produces a downstream alpha lock and downstream alpha\n publication consumes the exact `@kungfu-tech/kfd@...-alpha.N` package;\n- a `kfd` stable release produces a downstream release lock and downstream\n stable publication consumes the exact stable package.\n\nThis keeps the site synchronized to the package truth without allowing the site\nto drift onto a floating npm dist-tag."
1588
+ "markdown": "# Release Propagation\n\nRelease propagation lets a finalized upstream release open a downstream update\nPR using the upstream release passport as the audit source. It is for product\nchains such as:\n\n```text\nkfd -> site-libkungfu-dev\nA -> B -> C\n```\n\nThe downstream repository receives an exact lock, not a floating dist-tag. A\nsite or app can then consume the upstream package, site bundle, or release\npassport as its single source of truth without hand-copying release facts.\n\n## Contract\n\nThe propagation graph is declarative JSON:\n\n```json\n{\n \"schemaVersion\": 1,\n \"contract\": \"kungfu-buildchain-release-propagation-graph\",\n \"nodes\": [\n {\n \"id\": \"kfd\",\n \"repository\": \"kungfu-systems/kfd\",\n \"package\": \"@kungfu-tech/kfd\"\n },\n {\n \"id\": \"site-libkungfu-dev\",\n \"repository\": \"kungfu-systems/site-libkungfu-dev\",\n \"lockPath\": \"buildchain.upstreams/kfd.release.json\",\n \"baseRef\": \"dev/v2/v2.7\"\n }\n ],\n \"edges\": [\n {\n \"id\": \"kfd-to-site\",\n \"from\": \"kfd\",\n \"to\": \"site-libkungfu-dev\",\n \"channelPolicy\": \"preserve\"\n }\n ]\n}\n```\n\n`channelPolicy: \"preserve\"` is the default and maps:\n\n```text\nalpha -> alpha\nrelease -> release\n```\n\nCross-channel mapping is allowed only when an edge declares\n`channelPolicy: \"explicit\"` and a `channelMap`. Buildchain rejects cycles so a\nchain can fan out or continue as `A -> B -> C`, but cannot loop back into an\nalready visited release line.\n\n## Upstream Release Envelope\n\nThe upstream release envelope is the post-finalization fact set:\n\n```json\n{\n \"repository\": \"kungfu-systems/kfd\",\n \"channel\": \"alpha\",\n \"tag\": \"v1.4.0-alpha.3\",\n \"sourceSha\": \"1111111111111111111111111111111111111111\",\n \"package\": {\n \"name\": \"@kungfu-tech/kfd\",\n \"version\": \"1.4.0-alpha.3\",\n \"integrity\": \"sha512-...\"\n },\n \"releasePassport\": {\n \"url\": \"https://github.com/kungfu-systems/kfd/releases/download/v1.4.0-alpha.3/buildchain.release.json\",\n \"sha256\": \"2222222222222222222222222222222222222222222222222222222222222222\"\n },\n \"siteBundle\": {\n \"manifestSha256\": \"3333333333333333333333333333333333333333333333333333333333333333\"\n }\n}\n```\n\nThe package version and integrity must be exact. Downstream build logic should\ninstall that version directly, not resolve `alpha` or `latest` again.\n\nPublication repositories can propagate immutable publication archive evidence\nwithout npm package facts. The upstream envelope then includes\n`publicationArtifact`:\n\n```json\n{\n \"repository\": \"kungfu-systems/paper-observer-declared-timelines\",\n \"channel\": \"alpha\",\n \"tag\": \"v0.1.0-alpha.1\",\n \"sourceSha\": \"4444444444444444444444444444444444444444\",\n \"releasePassport\": {\n \"url\": \"https://github.com/kungfu-systems/paper-observer-declared-timelines/releases/download/v0.1.0-alpha.1/buildchain.release.json\",\n \"sha256\": \"5555555555555555555555555555555555555555555555555555555555555555\"\n },\n \"publicationArtifact\": {\n \"id\": \"observer-declared-timelines\",\n \"kind\": \"paper\",\n \"version\": \"0.1.0-alpha.1\",\n \"canonicalUrl\": \"https://papers.libkungfu.dev/observer-declared-timelines/\",\n \"latestUrl\": \"https://papers.libkungfu.dev/observer-declared-timelines/latest/\",\n \"latestEvidenceUrl\": \"https://papers.libkungfu.dev/observer-declared-timelines/latest/buildchain.release.json\",\n \"immutableVersionUrl\": \"https://papers.libkungfu.dev/archive/observer-declared-timelines/v0.1.0-alpha.1/\",\n \"registry\": {\n \"url\": \"https://github.com/kungfu-systems/paper-observer-declared-timelines/releases/download/v0.1.0-alpha.1/publication-registry.json\",\n \"sha256\": \"6666666666666666666666666666666666666666666666666666666666666666\"\n },\n \"manifest\": {\n \"url\": \"https://github.com/kungfu-systems/paper-observer-declared-timelines/releases/download/v0.1.0-alpha.1/publication-artifact.json\",\n \"sha256\": \"7777777777777777777777777777777777777777777777777777777777777777\"\n },\n \"passport\": {\n \"url\": \"https://github.com/kungfu-systems/paper-observer-declared-timelines/releases/download/v0.1.0-alpha.1/publication-artifact-passport.json\",\n \"sha256\": \"8888888888888888888888888888888888888888888888888888888888888888\"\n },\n \"primaryArtifact\": {\n \"path\": \"_build/main.pdf\",\n \"url\": \"https://papers.libkungfu.dev/archive/observer-declared-timelines/v0.1.0-alpha.1/main.pdf\",\n \"sha256\": \"9999999999999999999999999999999999999999999999999999999999999999\"\n }\n }\n}\n```\n\nThis lets a site repository render the latest reader page and historical\nversion index from release facts while keeping old PDFs, source bundles,\nmanifests, and passports immutable.\n\n## CLI\n\nGenerate a propagation plan:\n\n```bash\nbuildchain release-propagation plan \\\n --graph buildchain.release-propagation.json \\\n --upstream-release .buildchain/upstream-release.json \\\n --output .buildchain/release-propagation-plan.json \\\n --json\n```\n\nWrite the downstream lock:\n\n```bash\nbuildchain release-propagation write-lock \\\n --plan .buildchain/release-propagation-plan.json \\\n --target site-libkungfu-dev \\\n --cwd downstream-checkout \\\n --json\n```\n\nThe written lock has contract\n`kungfu-buildchain-release-propagation-lock` and records:\n\n- upstream repository, channel, exact tag, source SHA;\n- optional npm package name, exact version, and sha512 integrity;\n- optional publication artifact canonical/latest/immutable URLs, registry,\n manifest, passport, source bundle, and primary artifact digests;\n- release passport URL and SHA-256;\n- optional site bundle manifest SHA-256;\n- downstream repository, channel, base ref, lock path;\n- edge id and channel policy.\n\n## Reusable Workflow\n\nUpstream repositories can call\n`.github/workflows/release-propagation.yml@v2` after release finalization:\n\n```yaml\njobs:\n propagate-site:\n uses: kungfu-systems/buildchain/.github/workflows/release-propagation.yml@v2\n with:\n buildchain-ref: v2\n graph-json: ${{ needs.release.outputs.propagation-graph-json }}\n upstream-release-json: ${{ needs.release.outputs.upstream-release-json }}\n downstream-target: site-libkungfu-dev\n downstream-repository: kungfu-systems/site-libkungfu-dev\n downstream-base-ref: dev/v2/v2.7\n downstream-prepare-command: pnpm install --frozen-lockfile --ignore-scripts\n downstream-verify-command: pnpm run check\n dry-run: false\n secrets:\n propagation-token: ${{ secrets.BUILDCHAIN_PROMOTION_TOKEN }}\n```\n\nThe downstream branch name may be reused across upstream releases. Before\nreplacing an existing managed branch, the workflow reads its exact remote SHA\nand pushes with an explicit `--force-with-lease=<ref>:<sha>`. A surviving branch\nfrom a merged PR is therefore reconciled without manual deletion, while a\nconcurrent writer makes the lease fail closed. The controller receipt includes a\n`propagation-branch-reconciliation` evidence file recording the branch, observed\nremote SHA, pushed SHA, lease mode, and the deterministically created or updated\nopen PR.\n\nThe workflow checks out the Buildchain runtime selected by\n`buildchain-repository` and `buildchain-ref` into `.buildchain/runtime`, invokes\nthat runtime for the propagation plan and lock write, then checks out the\ndownstream repository and writes the exact lock. A consumer that must pin the\nexact upstream package or regenerate deterministic files declares\n`downstream-prepare-command`. The command receives\n`BUILDCHAIN_UPSTREAM_PACKAGE_NAME`, `BUILDCHAIN_UPSTREAM_PACKAGE_VERSION`, and\n`BUILDCHAIN_UPSTREAM_RELEASE_LOCK`. After preparation, Buildchain refreshes an\nexisting `<!-- buildchain:badges:start -->` README block by default. Consumers\ncan disable that step with `refresh-managed-readme-badges: false`.\n\n`downstream-verify-command` runs against the final tree before any commit or\npush, so consumers can use the same check as their PR workflow. Preparation,\nbadge refresh, and verification failures all fail closed. The workflow stages\nthe complete deterministic result, signs the propagation commit with DCO, and\nthen opens or updates the PR. It does not publish the downstream release\ndirectly. The downstream repository keeps its normal Buildchain governance: the\nPR updates source-of-truth facts, then downstream alpha or release publication\nruns through its own protected channel. A byte-identical rerun is an explicit\nsuccessful no-op.\nFor unreleased runtime validation, keep the caller's reusable workflow reference\non `@v2` and pass a temporary train ref through `buildchain-ref`.\n\n## kfd to site-libkungfu-dev\n\nFor `kfd -> site-libkungfu-dev`, the graph should preserve channels:\n\n- a `kfd` alpha release produces a downstream alpha lock and downstream alpha\n publication consumes the exact `@kungfu-tech/kfd@...-alpha.N` package;\n- a `kfd` stable release produces a downstream release lock and downstream\n stable publication consumes the exact stable package.\n\nThis keeps the site synchronized to the package truth without allowing the site\nto drift onto a floating npm dist-tag."
1589
1589
  },
1590
1590
  {
1591
1591
  "id": "manual:reusable-build-surface",
@@ -2504,7 +2504,7 @@
2504
2504
  "path": "docs/release-passport.md",
2505
2505
  "plane": "verify",
2506
2506
  "exists": true,
2507
- "digest": "sha256:2421e3e9f2dd892971bea5deb605492dfec38f3a83e539229442b55380bebe25"
2507
+ "digest": "sha256:0029014ffab7d7228a12d8b92326b78cf6757a41f481b661c5997e2cef06d3cc"
2508
2508
  },
2509
2509
  {
2510
2510
  "id": "controller-evidence",
@@ -2536,7 +2536,7 @@
2536
2536
  "path": "docs/release-propagation.md",
2537
2537
  "plane": "use",
2538
2538
  "exists": true,
2539
- "digest": "sha256:d5877075eb41a3d41e531549da113756d29d6f34c91e3b68b8ce650753d5ca1d"
2539
+ "digest": "sha256:fc2b743e3d76c4f90cdd8c6560cf9d619ad25d74c15c074be96db7bcb6cc2a29"
2540
2540
  },
2541
2541
  {
2542
2542
  "id": "readme-badges",
@@ -2724,7 +2724,9 @@
2724
2724
  "releasePassport": {
2725
2725
  "entrypoint": "buildchain.release.json",
2726
2726
  "bundle": "buildchain-release-bundle.tar.gz",
2727
- "contract": "kungfu-buildchain-release-passport"
2727
+ "contract": "kungfu-buildchain-release-passport",
2728
+ "schema": "schemas/release-passport-v1.schema.json",
2729
+ "checkManifest": "release-passport-check-manifest.json"
2728
2730
  },
2729
2731
  "releasePropagation": {
2730
2732
  "graphContract": "kungfu-buildchain-release-propagation-graph",
@@ -50,7 +50,7 @@
50
50
  "manualCount": 4,
51
51
  "pageCount": 4,
52
52
  "cliCommandCount": 21,
53
- "nodeApiCount": 6,
53
+ "nodeApiCount": 7,
54
54
  "workflowCount": 2,
55
55
  "actionCount": 1
56
56
  },
@@ -1683,6 +1683,10 @@
1683
1683
  "classification": "included",
1684
1684
  "source": "workflow-call-input"
1685
1685
  },
1686
+ "downstream-prepare-command": {
1687
+ "classification": "digest-only",
1688
+ "source": "workflow-call-input"
1689
+ },
1686
1690
  "downstream-repository": {
1687
1691
  "classification": "included",
1688
1692
  "source": "workflow-call-input"
@@ -1691,6 +1695,10 @@
1691
1695
  "classification": "included",
1692
1696
  "source": "workflow-call-input"
1693
1697
  },
1698
+ "downstream-verify-command": {
1699
+ "classification": "digest-only",
1700
+ "source": "workflow-call-input"
1701
+ },
1694
1702
  "dry-run": {
1695
1703
  "classification": "included",
1696
1704
  "source": "workflow-call-input"
@@ -1715,6 +1723,10 @@
1715
1723
  "classification": "redacted",
1716
1724
  "source": "workflow-call-secret"
1717
1725
  },
1726
+ "refresh-managed-readme-badges": {
1727
+ "classification": "included",
1728
+ "source": "workflow-call-input"
1729
+ },
1718
1730
  "source-node": {
1719
1731
  "classification": "included",
1720
1732
  "source": "workflow-call-input"
@@ -1758,8 +1770,8 @@
1758
1770
  "controller-receipt"
1759
1771
  ]
1760
1772
  },
1761
- "digest": "sha256:9b9f9a2320c4349903d72ee46e329211b5538ed5ebebaa93559df4eafb835997"
1773
+ "digest": "sha256:ede9eba43b87cf19330d5f8203a1585bf066aa9affc9cac0f43230ac76b8580d"
1762
1774
  }
1763
1775
  ],
1764
- "digest": "sha256:266928038838e26ba1350c70d78290723ddb2fd209b66ab1afab776d948a379b"
1776
+ "digest": "sha256:2c6a3a4dce27e0d76baae1c9aeb4d3428866fe8b4c4022a8c582b054dace02fd"
1765
1777
  }
@@ -21,13 +21,13 @@
21
21
  "contract": "kungfu-buildchain-public-surface-reverse-audit",
22
22
  "path": "dist/site/public-surface-audit.json",
23
23
  "status": "passed",
24
- "sha256": "3d9e43510266b900fe450253fbb8aac72953c7128a797154150eb301ef71ed6a",
24
+ "sha256": "056a3d5e87f0813bbddb47cf4f3c8db43458b23bcf9fbe4b3d0ca8b80c38bbdc",
25
25
  "summary": {
26
26
  "cliCommandCount": 83,
27
27
  "workflowCount": 48,
28
28
  "actionCount": 4,
29
29
  "sitePageCount": 50,
30
- "docCommandRefCount": 257,
30
+ "docCommandRefCount": 258,
31
31
  "failureCount": 0
32
32
  },
33
33
  "auditBoundary": {
@@ -225,13 +225,13 @@
225
225
  "contract": "kungfu-buildchain-public-surface-reverse-audit",
226
226
  "path": "dist/site/public-surface-audit.json",
227
227
  "status": "passed",
228
- "sha256": "3d9e43510266b900fe450253fbb8aac72953c7128a797154150eb301ef71ed6a",
228
+ "sha256": "056a3d5e87f0813bbddb47cf4f3c8db43458b23bcf9fbe4b3d0ca8b80c38bbdc",
229
229
  "summary": {
230
230
  "cliCommandCount": 83,
231
231
  "workflowCount": 48,
232
232
  "actionCount": 4,
233
233
  "sitePageCount": 50,
234
- "docCommandRefCount": 257,
234
+ "docCommandRefCount": 258,
235
235
  "failureCount": 0
236
236
  },
237
237
  "auditBoundary": {
@@ -1303,6 +1303,18 @@
1303
1303
  "public": true,
1304
1304
  "packageExport": "./release-passport"
1305
1305
  },
1306
+ {
1307
+ "id": "export:./release-passport-contract",
1308
+ "name": "@kungfu-tech/buildchain/release-passport-contract",
1309
+ "kind": "package-export",
1310
+ "sourcePath": "packages/core/release-passport-contract.js",
1311
+ "evidencePath": "packages/core/release-passport-contract.js",
1312
+ "availability": "shipped",
1313
+ "visibility": "public",
1314
+ "participantFacing": true,
1315
+ "public": true,
1316
+ "packageExport": "./release-passport-contract"
1317
+ },
1306
1318
  {
1307
1319
  "id": "export:./release-propagation",
1308
1320
  "name": "@kungfu-tech/buildchain/release-propagation",
@@ -3707,19 +3719,22 @@
3707
3719
  "visibility": "public",
3708
3720
  "participantFacing": true,
3709
3721
  "public": true,
3710
- "inputCount": 13,
3722
+ "inputCount": 16,
3711
3723
  "inputs": [
3712
3724
  "buildchain-ref",
3713
3725
  "buildchain-repository",
3714
3726
  "downstream-base-ref",
3715
3727
  "downstream-branch",
3728
+ "downstream-prepare-command",
3716
3729
  "downstream-repository",
3717
3730
  "downstream-target",
3731
+ "downstream-verify-command",
3718
3732
  "dry-run",
3719
3733
  "graph-json",
3720
3734
  "lock-path",
3721
3735
  "pr-body",
3722
3736
  "pr-title",
3737
+ "refresh-managed-readme-badges",
3723
3738
  "source-node",
3724
3739
  "upstream-release-json"
3725
3740
  ],
@@ -4702,6 +4717,6 @@
4702
4717
  }
4703
4718
  }
4704
4719
  ],
4705
- "publicSurfaceCount": 304
4720
+ "publicSurfaceCount": 305
4706
4721
  }
4707
4722
  }