@kungfu-tech/kfd 1.0.0-alpha.2 → 1.0.0-alpha.20

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 (44) hide show
  1. package/.buildchain/kfd-1/contract-world.witness.json +753 -0
  2. package/.buildchain/kfd-2/kfd-foundation.trust-assessment.json +238 -0
  3. package/.buildchain/kfd-2/kfd-foundation.trust-claims.json +225 -0
  4. package/.buildchain/kfd-2/public-release-trust.claim.json +131 -0
  5. package/.buildchain/kfd-3/collaboration-interface.artifact.json +774 -0
  6. package/.buildchain/kfd-3/collaboration-interface.json +421 -0
  7. package/.buildchain/kfd-3/collaboration-interface.prebuild.json +1141 -0
  8. package/README.md +149 -29
  9. package/TRADEMARKS.md +60 -0
  10. package/buildchain.contract-lock.json +86 -0
  11. package/buildchain.release-propagation.json +32 -0
  12. package/decisions/{kfd-1.md → KFD-1.md} +77 -35
  13. package/decisions/{kfd-2.md → KFD-2.md} +63 -11
  14. package/decisions/{kfd-3.md → KFD-3.md} +54 -16
  15. package/decisions/KFD-4.md +182 -0
  16. package/docs/KFD-1-usage.md +37 -0
  17. package/docs/KFD-2-usage.md +123 -0
  18. package/docs/KFD-3-usage.md +98 -0
  19. package/docs/KFD-4-usage.md +31 -0
  20. package/docs/MAP.md +20 -3
  21. package/docs/release-governance.md +28 -0
  22. package/kfd.release.json +13 -0
  23. package/package.json +28 -2
  24. package/registry.json +15 -5
  25. package/release-impact.json +113 -0
  26. package/schemas/kfd-1/contract-world.schema.json +67 -4
  27. package/schemas/kfd-1/witness.schema.json +113 -0
  28. package/schemas/kfd-2/release-claims.schema.json +331 -0
  29. package/schemas/kfd-2/release-trust-passport.schema.json +276 -0
  30. package/schemas/kfd-2/trust-assessment.schema.json +313 -0
  31. package/schemas/kfd-2/trust-claims.schema.json +334 -0
  32. package/schemas/kfd-2/trust-taxonomy.schema.json +219 -0
  33. package/schemas/kfd-3/collaboration-interface.schema.json +542 -0
  34. package/schemas/kfd-3/witness.schema.json +167 -0
  35. package/schemas/kfd-4/observer-perspective.schema.json +272 -0
  36. package/schemas/kfd-standards.schema.json +163 -0
  37. package/scripts/check.mjs +930 -0
  38. package/scripts/npm-publish-transaction.mjs +220 -0
  39. package/scripts/update-kfd-1-witness.mjs +35 -0
  40. package/scripts/update-kfd-2-claim.mjs +304 -0
  41. package/scripts/update-kfd-3-witness.mjs +261 -0
  42. package/scripts/update-site-bundle.mjs +353 -0
  43. package/site/kfd-site.json +251 -12
  44. package/standards.json +775 -15
package/README.md CHANGED
@@ -5,6 +5,8 @@ set of standing, cross-repository norms that products and their consumers
5
5
  weld to. Each decision has an immutable number (`KFD-N`), a kind, a status,
6
6
  and a single authoritative text in this repository.
7
7
 
8
+ Stable rendered site: `https://kfd.libkungfu.dev`.
9
+
8
10
  KFDs can be **principles** or **procedures**. Principles state what must remain
9
11
  true across kungfu-systems; procedures state how a class of work enforces or
10
12
  protects a principle.
@@ -14,14 +16,14 @@ protects a principle.
14
16
  The first three KFDs form the public foundation for kungfu-systems:
15
17
 
16
18
  ```text
17
- KFD-1: contracts must not drift.
19
+ KFD-1: facts must not drift.
18
20
  KFD-2: trust must start from facts.
19
- KFD-3: cooperation must start from transparent value, not coercion.
21
+ KFD-3: cooperation must start from trusted value.
20
22
  ```
21
23
 
22
- Together they define the load-bearing path for Kungfu products: make contract
23
- worlds explicit, make important claims inspectable, and let humans and agents
24
- cooperate through visible value rather than hidden pressure.
24
+ Together they define the load-bearing path for Kungfu products: make facts
25
+ non-drifting, make trust inspectable from those facts, and let humans and
26
+ agents cooperate through trusted value rather than hidden pressure.
25
27
 
26
28
  ## Foundation model
27
29
 
@@ -31,22 +33,21 @@ act, delegate, and remember across many surfaces.
31
33
 
32
34
  | Layer | Decision | Reader question | Commitment |
33
35
  |---|---|---|---|
34
- | Fact-source ontology | KFD-1 | What can count as a fact? | A load-bearing fact must not drift: its contract world comes from one declared fact source. |
36
+ | Fact-source ontology | KFD-1 | What can count as a fact? | Facts must not drift: a load-bearing contract world comes from one declared fact source. |
35
37
  | Participant-to-object trust | KFD-2 | When can a user or agent trust a claim, product, artifact, or control surface? | Trust starts from inspectable facts and responsibility state. |
36
- | Participant-to-participant cooperation | KFD-3 | How should peer intelligent participants cooperate? | Cooperation starts from transparent value, stable choice, and explainable constraints, not pressure. |
38
+ | Participant-to-participant cooperation | KFD-3 | How should peer intelligent participants cooperate? | Cooperation starts from trusted value: value becomes trustable through transparent facts, stable choice, and explainable constraints. |
37
39
 
38
40
  In short:
39
41
 
40
42
  ```text
41
- stable facts -> trustworthy objects -> non-coercive cooperation
43
+ non-drifting facts -> inspectable trust -> trusted value -> voluntary cooperation
42
44
  ```
43
45
 
44
- This is why KFDs are not only internal governance text. KFD-1 is a procedure,
45
- but it gives the foundation model its first layer by making fact sources
46
- operational: a fact-bearing contract world must be declared, inspectable, and
47
- unable to drift invisibly. KFD-2 then defines how trust can stand on those
48
- facts. KFD-3 defines how humans and agents can cooperate once facts and trust
49
- are visible.
46
+ This is why KFDs are not only internal governance text. KFD-1 gives the
47
+ foundation model its first layer by making fact sources operational: a
48
+ fact-bearing contract world must be declared, inspectable, and unable to drift
49
+ invisibly. KFD-2 then defines how trust can stand on those facts. KFD-3
50
+ defines how humans and agents can cooperate once facts and trust are visible.
50
51
 
51
52
  Real-world agent work turns ordinary work into a dense system of products,
52
53
  files, repositories, traces, policies, humans, and agents. In that world,
@@ -72,7 +73,35 @@ systems. KFD is part of that bootstrap: the worldview is forged through the same
72
73
  transparent and inspectable mechanisms it asks products to provide.
73
74
 
74
75
  This README states the architecture; KFD-1, KFD-2, and KFD-3 provide the
75
- detailed rules.
76
+ foundation rules.
77
+
78
+ ## Practice guidelines
79
+
80
+ KFDs after the foundation triad may define practice guidelines: procedures
81
+ that apply the foundation to a specific class of real-world product behavior.
82
+ They do not expand the foundation triad; they show how the foundation behaves
83
+ when a product must make a concrete kind of reality legible.
84
+
85
+ | Layer | Decision | Reader question | Commitment |
86
+ |---|---|---|---|
87
+ | Perspective-bearing views | KFD-4 | How should a product show time, history, replay, sync, or mixed-source work state? | Timelines must declare their observer: a useful view states who is observing, which facts were accepted, and how concurrent facts were projected. |
88
+
89
+ KFD-4 is the first such guideline. It applies KFD-1/2/3 to the problem of
90
+ perspective and timeline order. In a multi-machine or multi-agent world, a
91
+ product should not pretend to own a universal global clock. It should preserve
92
+ non-drifting facts, make trust start from those facts, and let participants
93
+ cooperate by exposing the observer, accepted ranges, causal constraints, and
94
+ projection policy behind the view.
95
+
96
+ ## Adoption boundary
97
+
98
+ KFD is an engineering discipline, not a belief test.
99
+ KFD governs systems before it judges people.
100
+ No one should be pressured to adopt KFD in the name of KFD.
101
+ Disagreement is a valid cooperation state.
102
+
103
+ A constraint can be strict and still KFD-compatible when it is fact-bound,
104
+ explainable, auditable, and proportionate.
76
105
 
77
106
  ## Homepage content contract
78
107
 
@@ -89,7 +118,10 @@ The first screen should be derived from this README:
89
118
  - Foundation signal: the `Foundation triad` section, especially the three
90
119
  one-line commitments.
91
120
  - First-screen explanation: the beginning of `Foundation model`, ending at the
92
- `stable facts -> trustworthy objects -> non-coercive cooperation` chain.
121
+ `non-drifting facts -> inspectable trust -> trusted value -> voluntary
122
+ cooperation` chain.
123
+ - Practice signal: the `Practice guidelines` section, starting with KFD-4 as
124
+ the declared-observer rule for perspective-bearing timeline views.
93
125
 
94
126
  Decision cards, detail links, and machine paths should come from
95
127
  `registry.json`. The machine-readable site bundle lives at `site/kfd-site.json`
@@ -98,14 +130,26 @@ proof path, decision routes, and rendering boundary. A site renderer may adapt
98
130
  layout, navigation, typography, and visual assets, but it should not maintain
99
131
  separate homepage wording that can drift from this package.
100
132
 
133
+ `site/kfd-site.json` is generated from this README by
134
+ `scripts/update-site-bundle.mjs`. The generated bundle exposes both compatible
135
+ top-level homepage fields and ordered `homepage.sections` entries. The
136
+ `homepage.displayPlan` tells renderers which sections belong in the first
137
+ screen, primary narrative, and support area. Site repositories should consume
138
+ that bundle instead of parsing this README themselves. The renderer contract is
139
+ exposed as machine/implementation metadata, not as ordinary homepage content.
140
+
101
141
  ## Product proof path
102
142
 
103
143
  KFDs are not a detached manifesto, but they are not a demand that readers adopt
104
144
  a Kungfu product before understanding the decisions. A philosophy becomes
105
- load-bearing only when it can be seen in a concrete case. For that reference
106
- case, use the main Kungfu product entrypoint (`https://kungfu.tech`) for product
107
- philosophy, and Buildchain (`https://buildchain.libkungfu.dev`) for release and
108
- provenance accountability. This registry states the commitments; those
145
+ load-bearing only when it can be seen in a concrete case. The first concrete
146
+ case is this package itself: `standards.json`, `schemas/`, `docs/`,
147
+ `site/kfd-site.json`, and `scripts/check.mjs` show how KFD-1, KFD-2, KFD-3,
148
+ and KFD-4 are expressed as consumable interfaces for both humans and agents.
149
+ For the broader product case, use the main Kungfu product entrypoint
150
+ (`https://kungfu.tech`) for product philosophy, and Buildchain
151
+ (`https://buildchain.libkungfu.dev`) for release and provenance
152
+ accountability. This registry states the commitments; this package and those
109
153
  entrypoints show how the commitments are meant to be borne in practice.
110
154
 
111
155
  Rendered index: `https://kfd.libkungfu.dev` (stable machine path per entry,
@@ -115,20 +159,89 @@ e.g. `https://kfd.libkungfu.dev/1`). This repository publishes
115
159
 
116
160
  Machine consumers that need KFD-owned standard identity should read
117
161
  `standards.json`. It is the versioned metadata surface for stable standard
118
- keys, document routes, schema IDs, and KFD-owned concept names. In Node or
119
- TypeScript projects, import it as:
162
+ keys, document routes and SHA-256 digests, schema IDs, KFD-owned concept names,
163
+ and machine-interface contract versions. In Node or TypeScript projects, import
164
+ it as:
120
165
 
121
166
  ```js
122
167
  import standards from "@kungfu-tech/kfd/standards.json" with { type: "json" };
123
168
  ```
124
169
 
170
+ ## Agent Quickstart
171
+
172
+ Agents consuming this package should start from the same sources as humans:
173
+
174
+ 1. Read this README for the foundation model and package map.
175
+ 2. Read `standards.json` for canonical KFD numbers, schema IDs, concept names,
176
+ and interface contracts.
177
+ 3. Use `site/kfd-site.json` decision metadata or the KFD-3 collaboration
178
+ interface fact-source metadata to identify the public KFD fact source.
179
+ 4. Use `schemas/kfd-2/trust-taxonomy.schema.json` for KFD-2 residual-risk and
180
+ trust-downgrade values. Unknown taxonomy values are invalid.
181
+ 5. Use `schemas/kfd-2/trust-claims.schema.json` and
182
+ `schemas/kfd-2/trust-assessment.schema.json` when a claim needs generic
183
+ KFD-2 assessment instead of a release-specific passport.
184
+ 6. Use `schemas/kfd-3/collaboration-interface.schema.json` and
185
+ `schemas/kfd-3/witness.schema.json` to inspect collaboration interfaces.
186
+ 7. If a needed KFD-2 taxonomy value is missing, open a KFD GitHub issue rather
187
+ than inventing a local value:
188
+ `https://github.com/kungfu-systems/kfd/issues/new?title=KFD-2%20trust%20taxonomy%20extension%20request`.
189
+
190
+ KFD package semver is only the distribution version. KFD-owned machine
191
+ interfaces carry their own `schemaVersion` and `contract` fields. Compatible
192
+ additions may keep the same interface version; semantic changes, required-field
193
+ changes, verification meaning changes, or responsibility-boundary changes must
194
+ use a new interface version or contract.
195
+
196
+ KFD-2 publishes trust-taxonomy, trust-claims, trust-assessment,
197
+ release-claims, and release-trust-passport schemas under `schemas/kfd-2/`.
198
+ The generic schemas let humans, agents, Buildchain, and other systems assess
199
+ whether claims about KFD-1, KFD-3, KFD-4, future KFDs, or product surfaces are
200
+ bound to source facts, evidence, hashes, audit boundaries, residual risk, and
201
+ responsibility state. The release schemas are a release-specific projection of
202
+ that model. See [`docs/KFD-2-usage.md`](docs/KFD-2-usage.md).
203
+
204
+ KFD-3 also publishes a general collaboration-interface schema and witness
205
+ schema under `schemas/kfd-3/`. These schemas are for participant-facing product
206
+ interfaces, not only agent APIs. A product such as Kungfu may implement an
207
+ agent-first profile, but that profile remains a product-specific realization of
208
+ KFD-3. The KFD-owned boundary is the standard vocabulary, schema IDs, and
209
+ closed-world evidence shape. See
210
+ [`docs/KFD-3-usage.md`](docs/KFD-3-usage.md).
211
+
212
+ KFD-4 publishes an observer-perspective schema under `schemas/kfd-4/`. It gives
213
+ humans and agents a standard vocabulary for observer, accepted facts,
214
+ projection policy, causal constraints, degraded evidence, and verification
215
+ state when a product shows a perspective-bearing timeline.
216
+
125
217
  ## Current decisions
126
218
 
127
- | ID | Kind | Title | Status |
219
+ | ID | Kind | Axiom | Status |
128
220
  |---|---|---|---|
129
- | [KFD-1](decisions/kfd-1.md) | procedure | Contracts must not drift: contract worlds need one fact source | active |
130
- | [KFD-2](decisions/kfd-2.md) | principle | Trust must start from facts: responsibility must be inspectable | active |
131
- | [KFD-3](decisions/kfd-3.md) | principle | Cooperation must start from transparent value: compliance must not be coerced | active |
221
+ | [KFD-1](decisions/KFD-1.md) | procedure | Facts must not drift. | active |
222
+ | [KFD-2](decisions/KFD-2.md) | principle | Trust must start from facts. | active |
223
+ | [KFD-3](decisions/KFD-3.md) | principle | Cooperation must start from trusted value. | active |
224
+ | [KFD-4](decisions/KFD-4.md) | procedure | Timelines must declare their observer. | active |
225
+
226
+ ## Decision metadata
227
+
228
+ Every rendered decision page should make the KFD fact source explicit. The
229
+ public KFD fact source is the GitHub-hosted `kungfu-systems/kfd` git
230
+ repository. GitHub is the current canonical coordination and hosting surface;
231
+ the load-bearing facts are the commit-addressed repository contents.
232
+
233
+ Decision metadata should expose:
234
+
235
+ - Public fact source: `https://github.com/kungfu-systems/kfd`
236
+ - Load-bearing coordinate: commit-addressed repository contents.
237
+ - Canonical paths: `decisions/KFD-N.md`, `registry.json`, `standards.json`.
238
+ - Stable rendered index: `https://kfd.libkungfu.dev`.
239
+ - Rendered URL: `https://kfd.libkungfu.dev/N`.
240
+
241
+ Rendered pages, npm package contents, Buildchain release passports, and
242
+ `kfd.libkungfu.dev` are projections or evidence surfaces. A GitHub issue is an
243
+ extension request path, not a KFD fact by itself; it becomes part of the KFD
244
+ fact source only after the resulting change is committed to the repository.
132
245
 
133
246
  ## How to cite
134
247
 
@@ -150,6 +263,8 @@ standards.json machine-readable KFD standard metadata (schemaVersion 1,
150
263
  contract kfd-standards-metadata)
151
264
  schemas/ JSON schemas for package metadata and KFD-owned schema IDs
152
265
  site/ machine-readable site bundle for kfd.libkungfu.dev renderers
266
+ buildchain.release-propagation.json
267
+ Buildchain release propagation graph for KFD -> site consumers
153
268
  release-impact.json
154
269
  Buildchain surface-aware impact ledger for production release passports
155
270
  scripts/ conformance check: registry and documents must agree
@@ -157,7 +272,8 @@ scripts/ conformance check: registry and documents must agree
157
272
 
158
273
  `node scripts/check.mjs` (also `pnpm run check`) verifies numbering
159
274
  uniqueness, registry/document agreement, standards metadata/schema agreement,
160
- status validity, and the release impact ledger required by Buildchain
275
+ status validity, decision document SHA-256 bindings, interface contract
276
+ version bindings, and the release impact ledger required by Buildchain
161
277
  production release passports. Releases are governed by Buildchain; this package
162
278
  versions itself under KFD-1's own rules: the outer package line remains `v1.0`,
163
279
  while patch and prerelease numbers are advanced by Buildchain release
@@ -179,6 +295,10 @@ paths, or published structure under KFD-1. These values are Buildchain release
179
295
  passport impact classifications; they do not by themselves open a new
180
296
  `@kungfu-tech/kfd` package major or minor line.
181
297
 
182
- ## License
298
+ ## License and official status
183
299
 
184
- [Apache License 2.0](LICENSE).
300
+ Repository contents are licensed under the [Apache License 2.0](LICENSE).
301
+ Apache-2.0 grants broad reuse rights for the licensed contents, but it does
302
+ not grant KFD/Kungfu trademarks, official status, certification status, or
303
+ endorsement. The official source, name-use, fork, derivative, and agent-facing
304
+ authority boundaries are defined in [`TRADEMARKS.md`](TRADEMARKS.md).
package/TRADEMARKS.md ADDED
@@ -0,0 +1,60 @@
1
+ # Trademarks and Official Status
2
+
3
+ The contents of this repository are licensed under the Apache License 2.0.
4
+ That license covers use, reproduction, modification, and distribution of the
5
+ licensed repository contents under the terms of `LICENSE`.
6
+
7
+ Apache-2.0 does not grant trademark rights, official project status,
8
+ certification status, or endorsement by kungfu-systems.
9
+
10
+ ## Names and marks
11
+
12
+ The names `Kungfu`, `Kung Fu Decisions`, `KFD`, `kungfu-systems`,
13
+ `@kungfu-tech`, and related project names, logos, domains, and package names
14
+ identify kungfu-systems projects and release surfaces. They may be used for
15
+ accurate, non-misleading reference to the origin of the work, but not to imply
16
+ official status, certification, endorsement, or project ownership.
17
+
18
+ ## Official sources
19
+
20
+ The current public KFD fact source is:
21
+
22
+ ```text
23
+ https://github.com/kungfu-systems/kfd
24
+ ```
25
+
26
+ The stable rendered KFD site is:
27
+
28
+ ```text
29
+ https://kfd.libkungfu.dev
30
+ ```
31
+
32
+ The public npm package is:
33
+
34
+ ```text
35
+ npm:@kungfu-tech/kfd
36
+ ```
37
+
38
+ Those surfaces are official only when published or controlled by
39
+ kungfu-systems. Forks, mirrors, local copies, downstream packages, generated
40
+ sites, and derivative works are not official KFD sources unless kungfu-systems
41
+ explicitly says so.
42
+
43
+ ## Forks and derivatives
44
+
45
+ Forks and derivative works may say that they are based on KFD or implement
46
+ specific KFD decisions when that statement is accurate. They must not describe
47
+ themselves as the official KFD registry, canonical KFD release, certified KFD
48
+ implementation, or kungfu-systems-approved project unless that status has been
49
+ explicitly granted by kungfu-systems.
50
+
51
+ If a derivative changes KFD content, metadata, schemas, or package surfaces, it
52
+ should make those changes clear to readers and agents so that official KFD
53
+ facts do not drift into derivative facts.
54
+
55
+ ## Agent-facing rule
56
+
57
+ An agent consuming KFD should treat Apache-2.0 as permission to reuse the
58
+ licensed repository contents, not as permission to claim official KFD authority.
59
+ When official status matters, the agent should resolve facts through the
60
+ public KFD fact source and the metadata surfaces declared in this repository.
@@ -0,0 +1,86 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "contract": "kungfu-buildchain-contract-lock",
4
+ "buildchain": {
5
+ "ref": "v2",
6
+ "resolvedSha": "7073acd84765df11260f825abdcfdd7e57379fd8",
7
+ "contract": "kungfu-buildchain-runtime-contract-world",
8
+ "contractDigest": "sha256:657034ebc39315b3450cd4c4356af2529b6a2ad03d0df680ec6010f3396df52d",
9
+ "compatibilityDigest": "sha256:967df7e854fdf582294ddfb6403eff25c00db9518a24051e7d47cbd75527c785",
10
+ "majorLine": "v2",
11
+ "compatibilityPolicy": "major-compatible",
12
+ "acceptedAt": "2026-07-08T13:48:44.565Z",
13
+ "surfaces": [
14
+ {
15
+ "id": "reusable-build",
16
+ "kind": "workflow",
17
+ "breakingDigest": "sha256:6303aa2c2cb8c2cef4301ceea95cc3c426c2aa81d98714aa9bdf2471d63faee1"
18
+ },
19
+ {
20
+ "id": "release-candidate-promote",
21
+ "kind": "workflow",
22
+ "breakingDigest": "sha256:403d2fcdb0c5eabe749e89102defad69745f70a1556707bec7831fcc2e9fa8f8"
23
+ },
24
+ {
25
+ "id": "web-surface",
26
+ "kind": "workflow",
27
+ "breakingDigest": "sha256:82ee63cb336e40d832dfff4a1c5e6cbfa221a4fc8b2359990033bc931bffc43a"
28
+ },
29
+ {
30
+ "id": "promote-buildchain-ref-action",
31
+ "kind": "action",
32
+ "breakingDigest": "sha256:0c5896590c8c9a44dfecbe060bcef1b43d3a9556737309dbe7e5f2bf83bfee6c"
33
+ },
34
+ {
35
+ "id": "report-buildchain-issue-action",
36
+ "kind": "action",
37
+ "breakingDigest": "sha256:575a2cb02cdb2e61bb2e84d5bbaaf64b430aa5d7936645660b592de4549d81b0"
38
+ },
39
+ {
40
+ "id": "release-passport-schema",
41
+ "kind": "schema",
42
+ "breakingDigest": "sha256:b627e1b2ece9b6049517a942c5139e342e6077cdd3d8962d61cef8481b1f70ad"
43
+ },
44
+ {
45
+ "id": "kfd-1-release-gate",
46
+ "kind": "schema",
47
+ "breakingDigest": "sha256:f46c1f67b94957ad956cf70db59a73fd5690bd67c91edf9c2d0eb8f3d1e3cf8d"
48
+ },
49
+ {
50
+ "id": "kfd-2-release-trust-passport-audit",
51
+ "kind": "schema",
52
+ "breakingDigest": "sha256:f0b636eb925ddbf45ff1a8872454ab7b4dd98857cac12bb75217830130e62a16"
53
+ },
54
+ {
55
+ "id": "kfd-3-collaboration-interface-release-gate",
56
+ "kind": "schema",
57
+ "breakingDigest": "sha256:33654f3444c893754aacc42dde3051f0a371bd17c6ef7c657c579a07159cd7c1"
58
+ },
59
+ {
60
+ "id": "buildchain-cli",
61
+ "kind": "cli",
62
+ "breakingDigest": "sha256:90a73892b2d6c214048448d5f45df75639bdf7b7e8fefd9c596e04b087407bcc"
63
+ },
64
+ {
65
+ "id": "homebrew-distribution-index",
66
+ "kind": "node-api",
67
+ "breakingDigest": "sha256:148c0387ff4cea76433bbde80cd9d77c5aa67e1a29856ced33e4d819366f2213"
68
+ },
69
+ {
70
+ "id": "readme-badge-facts",
71
+ "kind": "node-api",
72
+ "breakingDigest": "sha256:bcd72ad6dfba8013c96f8b2f7b0a307d2e7713972a1219348f0d5ecc493939a0"
73
+ },
74
+ {
75
+ "id": "agent-manual-registry",
76
+ "kind": "site-contract",
77
+ "breakingDigest": "sha256:7d0d2819e3a3e72989d9c57b5efe9d0bc0a79bc0f2c82a0c7b9d6c5a211a91f2"
78
+ },
79
+ {
80
+ "id": "node-api-registry",
81
+ "kind": "site-contract",
82
+ "breakingDigest": "sha256:48f925608d3e2131d90936b07dc2a30341204cae3e6e785c0f77d61ad755c945"
83
+ }
84
+ ]
85
+ }
86
+ }
@@ -0,0 +1,32 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "contract": "kungfu-buildchain-release-propagation-graph",
4
+ "nodes": [
5
+ {
6
+ "id": "kfd",
7
+ "repository": "kungfu-systems/kfd",
8
+ "package": "@kungfu-tech/kfd"
9
+ },
10
+ {
11
+ "id": "site-libkungfu-dev",
12
+ "repository": "kungfu-systems/site-libkungfu-dev",
13
+ "lockPath": "buildchain.upstreams/kfd.release.json",
14
+ "baseRef": "main"
15
+ }
16
+ ],
17
+ "edges": [
18
+ {
19
+ "id": "kfd-to-site-libkungfu-dev",
20
+ "from": "kfd",
21
+ "to": "site-libkungfu-dev",
22
+ "channelPolicy": "preserve",
23
+ "consumes": [
24
+ "@kungfu-tech/kfd",
25
+ "site/kfd-site.json",
26
+ "registry.json",
27
+ "standards.json",
28
+ "decisions/*.md"
29
+ ]
30
+ }
31
+ ]
32
+ }
@@ -1,4 +1,4 @@
1
- # KFD-1: Contracts must not drift — contract worlds need one fact source
1
+ # KFD-1: Facts must not drift — contract worlds need one fact source
2
2
 
3
3
  - Status: active
4
4
  - Number: 1
@@ -7,27 +7,30 @@
7
7
 
8
8
  ## One sentence
9
9
 
10
- A contract world must not change invisibly: any surface that users, agents, or
11
- systems weld to must come from one declared fact source and change only through
12
- an explicit compatibility boundary.
10
+ Facts must not drift.
11
+
12
+ Any contract world that users, agents, or systems weld to must come from one
13
+ declared fact source and change only through an explicit compatibility
14
+ boundary.
13
15
 
14
16
  ## Foundation role
15
17
 
16
- Within the KFD-1/2/3 foundation, this is the contract procedure:
18
+ Within the KFD-1/2/3 foundation, this is the fact-source procedure:
17
19
 
18
20
  ```text
19
- contracts must not drift
21
+ facts must not drift
20
22
  ```
21
23
 
22
- KFD-1 makes artifact contract worlds explicit so releases do not drift under
23
- changelog volume, cadence pressure, or marketing pressure. It is the concrete
24
- versioning procedure that lets users and agents know which artifact world they
25
- are integrating with, replaying, auditing, or trusting.
24
+ KFD-1 makes fact-bearing contract worlds explicit so they do not drift under
25
+ changelog volume, cadence pressure, implementation pressure, or marketing
26
+ pressure. It is the procedure that lets users and agents know which fact world
27
+ they are integrating with, replaying, auditing, or trusting.
26
28
 
27
- KFD-1 now has two concrete implementation surfaces in the Kungfu ecosystem:
28
- versioning protects release lines from contract drift, and config contracts
29
- protect multi-target configuration from drifting across runtimes, products, and
30
- agent-facing surfaces.
29
+ KFD-1 has concrete implementation surfaces across the Kungfu ecosystem:
30
+ versioning protects release lines from contract drift, config contracts protect
31
+ multi-target configuration from drifting across runtimes, products, and
32
+ agent-facing surfaces, and KFD metadata protects the decision package's own
33
+ standard surfaces from drifting away from their declared source.
31
34
 
32
35
  ## Premise: the welded-surface register
33
36
 
@@ -41,8 +44,10 @@ when either holds:
41
44
  - **(b) Cross-time dependency** — its outputs remain depended on after the run
42
45
  (persisted data, audit evidence, replayable records).
43
46
 
44
- Each entry carries a stable kebab-case ID. Registers live in each repository's
45
- versioning document and are the input to every classification below.
47
+ Each entry carries a stable kebab-case ID. A surface may be
48
+ `integration-time`, `cross-time`, or both. Registers live in each repository's
49
+ contract-world metadata or versioning document and are the input to every
50
+ classification below.
46
51
 
47
52
  ## Concrete case: config contracts
48
53
 
@@ -58,21 +63,44 @@ steps, and the final product must consume the same contract mechanism. It is
58
63
  not enough for the packaged artifact to be internally consistent if the
59
64
  developer path used a different, driftable config source.
60
65
 
61
- ## The decision procedure
66
+ ## The compatibility impact core
62
67
 
63
- Classify the actual diff against the register; the highest match wins:
68
+ Classify the actual diff against the register; the strongest match wins:
64
69
 
65
70
  | # | Condition | Verdict |
66
71
  |---|---|---|
67
- | 1 | **Breaks** any registered surface (removal, semantic change, layout change, incompatible rename — a semantic change counts as breakage even when shapes are unchanged: changed defaults, changed channel meaning, a newly required field) | **major** |
68
- | 2 | **Additively evolves** a registered surface, or **adds** a surface consumers will weld to | **minor** (register the new surface at the same time) |
69
- | 3 | Touches no registered surface | **patch** — regardless of how large the feature is |
70
- | 4 | **Cannot be classified** | **Do not guess.** The register is deficient: fix the register first (a maintainer decision), then reclassify |
72
+ | 1 | **Breaks** any registered surface (removal, semantic change, layout change, incompatible rename — a semantic change counts as breakage even when shapes are unchanged: changed defaults, changed channel meaning, a newly required field) | **breaking impact** |
73
+ | 2 | **Additively evolves** a registered surface, or **adds** a surface consumers will weld to | **additive impact** (register the new surface at the same time) |
74
+ | 3 | Touches no registered surface | **no registered-surface impact** — regardless of how large the implementation change is |
75
+ | 4 | **Cannot be classified** | **unclassifiable impact. Do not guess.** The register is deficient: fix the register first (a maintainer decision), then reclassify |
71
76
 
72
77
  Rule 4 is the safety valve: it forces the irreducible judgment (what counts as
73
78
  a welded surface) to a maintainer instead of letting a change silently pick
74
79
  the convenient answer.
75
80
 
81
+ These four impact classes are the KFD-1 core. They are not inherently release
82
+ version numbers. A product must project them into the control action that
83
+ matches its domain: version line movement, config migration, ABI epoch, API
84
+ namespace, release gate, runtime compatibility bridge, or user workflow gate.
85
+
86
+ ## Release versioning projection
87
+
88
+ For release versioning, the compatibility impact core projects to semver:
89
+
90
+ | Compatibility impact | Release verdict |
91
+ |---|---|
92
+ | breaking impact | **major** |
93
+ | additive impact | **minor** |
94
+ | no registered-surface impact | **patch** |
95
+ | unclassifiable impact | **block release; fix the register first** |
96
+
97
+ This projection is the first implementation case, not the whole principle.
98
+ Other domains must keep the same impact core while choosing their own action:
99
+ config contracts may require a migration bridge or rejected old config, ABIs
100
+ may require a new soname or ABI epoch, APIs may require a namespace or endpoint
101
+ compatibility boundary, and agent/UI surfaces may require explicit workflow or
102
+ command migration.
103
+
76
104
  ## Constraint clauses
77
105
 
78
106
  - **Reverse prohibition.** A line must not be opened for feature volume,
@@ -84,7 +112,8 @@ the convenient answer.
84
112
  self-archivable inputs, and no hard coupling to a maintainer-operated
85
113
  service.
86
114
  - **Decision time.** The verdict is checked against the final diff before the
87
- promotion into the alpha channel; planning-time classification is only a
115
+ action gate that depends on it; for releases this is checked before
116
+ promotion into the alpha channel. Planning-time classification is only a
88
117
  prediction.
89
118
  - **Major dignity.** A major release communicates exactly one thing: something
90
119
  you welded to broke and you must re-audit. An empty major — one that breaks
@@ -115,9 +144,11 @@ the convenient answer.
115
144
 
116
145
  ## The decision log
117
146
 
118
- Line openings (minor/major), register changes, and deprecations must be
119
- recorded in the repository's versioning document; patches stay silent —
120
- silence is itself the signal that no registered surface was touched.
147
+ Line openings (minor/major), register changes, deprecations, and other
148
+ compatibility-impact decisions must be recorded in the repository's
149
+ contract-world or versioning document. Release patches stay silent silence
150
+ is itself the signal that no registered surface was touched in the release
151
+ projection.
121
152
 
122
153
  One markdown table row per event, newest first:
123
154
 
@@ -140,17 +171,16 @@ table and the machine record never diverge): `schemaVersion: 1`,
140
171
 
141
172
  ## Relation to KFD-2 and KFD-3
142
173
 
143
- KFD-2 establishes fact-first product accountability: important claims should
144
- be inspectable before users or agents are asked to trust them. KFD-1 is the
145
- contract-layer expression of the same single-fact-source discipline: it
146
- preserves accountability across artifact contract worlds before those artifacts
147
- are used to produce runtime facts, responsibility state, or proof-backed
148
- decisions.
174
+ KFD-2 establishes fact-first product accountability: trust must start from
175
+ facts. KFD-1 defines the lower layer that makes such facts load-bearing:
176
+ important facts must not drift from the contract world that declares them.
177
+ Without KFD-1, KFD-2 would have facts that cannot reliably be re-read,
178
+ replayed, audited, or trusted over time.
149
179
 
150
180
  KFD-3 establishes non-coercive cooperation with intelligent participants. That
151
- cooperation depends on the same contract clarity: users and agents can choose,
152
- delegate, replay, or refuse more honestly when the artifact world is legible
153
- and does not drift invisibly.
181
+ cooperation depends on non-drifting facts: users and agents can choose,
182
+ delegate, replay, or refuse more honestly when the fact world is legible and
183
+ does not drift invisibly.
154
184
 
155
185
  ## How KFDs themselves are versioned
156
186
 
@@ -164,6 +194,18 @@ registry schema, the package structure) can still require `minor` or `major`
164
194
  surface-impact review in the Buildchain release passport, but that review
165
195
  classification is not a silent package-line upgrade.
166
196
 
197
+ ## Implementation case: the KFD package
198
+
199
+ The `@kungfu-tech/kfd` npm package is a self-proof case for this procedure.
200
+ Its decision texts, `registry.json`, `standards.json`, schemas, site bundle,
201
+ and release propagation graph are published as stable surfaces. Their contract
202
+ world is not inferred from README prose or package version alone: it is exposed
203
+ through `standards.json`, checked by `scripts/check.mjs`, and bound into the
204
+ KFD-1 witness under `.buildchain/kfd-1/contract-world.witness.json`.
205
+
206
+ This lets humans and agents inspect how the KFD package prevents its own
207
+ contract surfaces from drifting while it evolves.
208
+
167
209
  ## Adopters
168
210
 
169
211
  Each adopting repository keeps an adoption record, its welded-surface