@kungfu-tech/kfd 1.0.0-alpha.14 → 1.0.0-alpha.15
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.
- package/.buildchain/kfd-1/contract-world.witness.json +16 -16
- package/.buildchain/kfd-2/public-release-trust.claim.json +14 -14
- package/.buildchain/kfd-3/collaboration-interface.artifact.json +21 -21
- package/.buildchain/kfd-3/collaboration-interface.prebuild.json +7 -7
- package/README.md +8 -0
- package/kfd.release.json +1 -1
- package/package.json +4 -1
- package/release-impact.json +9 -3
- package/scripts/check.mjs +647 -0
- package/scripts/npm-publish-transaction.mjs +220 -0
- package/scripts/update-kfd-1-witness.mjs +24 -0
- package/scripts/update-kfd-2-claim.mjs +82 -0
- package/scripts/update-kfd-3-witness.mjs +227 -0
- package/scripts/update-site-bundle.mjs +293 -0
- package/site/kfd-site.json +109 -2
|
@@ -0,0 +1,293 @@
|
|
|
1
|
+
import { readFileSync, writeFileSync } from "node:fs";
|
|
2
|
+
import { pathToFileURL } from "node:url";
|
|
3
|
+
|
|
4
|
+
const README_PATH = "README.md";
|
|
5
|
+
const REGISTRY_PATH = "registry.json";
|
|
6
|
+
const SITE_BUNDLE_PATH = "site/kfd-site.json";
|
|
7
|
+
|
|
8
|
+
const normalizeLines = (value) => String(value || "").replace(/\r\n/g, "\n").trim();
|
|
9
|
+
|
|
10
|
+
const paragraphBlocks = (markdown) => normalizeLines(markdown)
|
|
11
|
+
.split(/\n{2,}/)
|
|
12
|
+
.map((block) => block.replace(/\n/g, " ").trim())
|
|
13
|
+
.filter(Boolean);
|
|
14
|
+
|
|
15
|
+
const stripInlineCode = (value) => String(value || "").replace(/`([^`]+)`/g, "$1");
|
|
16
|
+
|
|
17
|
+
const parseReadme = (markdown) => {
|
|
18
|
+
const content = normalizeLines(markdown);
|
|
19
|
+
const titleMatch = content.match(/^#\s+(.+)$/m);
|
|
20
|
+
if (!titleMatch) throw new Error("README.md must start with an H1 title");
|
|
21
|
+
|
|
22
|
+
const sections = {};
|
|
23
|
+
const headingPattern = /^##\s+(.+)$/gm;
|
|
24
|
+
const headings = [];
|
|
25
|
+
let match;
|
|
26
|
+
while ((match = headingPattern.exec(content))) {
|
|
27
|
+
headings.push({ title: match[1], index: match.index, bodyStart: headingPattern.lastIndex });
|
|
28
|
+
}
|
|
29
|
+
for (let index = 0; index < headings.length; index += 1) {
|
|
30
|
+
const current = headings[index];
|
|
31
|
+
const next = headings[index + 1];
|
|
32
|
+
sections[current.title] = content.slice(current.bodyStart, next ? next.index : content.length).trim();
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
const intro = content.slice(titleMatch[0].length, headings[0]?.index ?? content.length).trim();
|
|
36
|
+
return {
|
|
37
|
+
title: titleMatch[1].trim(),
|
|
38
|
+
intro,
|
|
39
|
+
sections,
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
const introLead = (intro) => {
|
|
44
|
+
const blocks = paragraphBlocks(intro);
|
|
45
|
+
return {
|
|
46
|
+
lead: blocks[0] || "",
|
|
47
|
+
decisionKinds: blocks.find((block) => block.startsWith("KFDs can be ")) || "",
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
const parseFoundationTriad = (markdown) => {
|
|
52
|
+
const code = markdown.match(/```text\n([\s\S]*?)\n```/);
|
|
53
|
+
if (!code) throw new Error("Foundation triad must include a text code block");
|
|
54
|
+
const before = markdown.slice(0, code.index).trim();
|
|
55
|
+
const after = markdown.slice((code.index ?? 0) + code[0].length).trim();
|
|
56
|
+
const commitments = code[1].split("\n").map((line) => {
|
|
57
|
+
const item = line.match(/^(KFD-[0-9]+):\s+(.+)$/);
|
|
58
|
+
if (!item) throw new Error(`invalid foundation triad line: ${line}`);
|
|
59
|
+
return { id: item[1], text: item[2] };
|
|
60
|
+
});
|
|
61
|
+
return {
|
|
62
|
+
heading: "Foundation triad",
|
|
63
|
+
intro: paragraphBlocks(before)[0] || "",
|
|
64
|
+
commitments,
|
|
65
|
+
summary: paragraphBlocks(after)[0] || "",
|
|
66
|
+
};
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
const parseMarkdownTable = (markdown) => {
|
|
70
|
+
const rows = markdown.split("\n").filter((line) => line.trim().startsWith("|"));
|
|
71
|
+
if (rows.length < 3) return [];
|
|
72
|
+
return rows.slice(2).map((row) => row.trim().replace(/^\||\|$/g, "").split("|").map((cell) => stripInlineCode(cell.trim())))
|
|
73
|
+
.filter((cells) => cells.length >= 4)
|
|
74
|
+
.map(([layer, decision, readerQuestion, commitment]) => ({
|
|
75
|
+
layer,
|
|
76
|
+
decision,
|
|
77
|
+
readerQuestion,
|
|
78
|
+
commitment,
|
|
79
|
+
}));
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
const parseFoundationModel = (markdown) => {
|
|
83
|
+
const chainMatch = markdown.match(/```text\n([\s\S]*?)\n```/);
|
|
84
|
+
if (!chainMatch) throw new Error("Foundation model must include the chain text code block");
|
|
85
|
+
const beforeChain = markdown.slice(0, chainMatch.index).trim();
|
|
86
|
+
const afterChain = markdown.slice((chainMatch.index ?? 0) + chainMatch[0].length).trim();
|
|
87
|
+
return {
|
|
88
|
+
heading: "Foundation model",
|
|
89
|
+
intro: paragraphBlocks(beforeChain)[0] || "",
|
|
90
|
+
layers: parseMarkdownTable(beforeChain),
|
|
91
|
+
chain: chainMatch[1].trim(),
|
|
92
|
+
explanation: paragraphBlocks(afterChain),
|
|
93
|
+
};
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
const parseProductProofPath = (markdown) => ({
|
|
97
|
+
heading: "Product proof path",
|
|
98
|
+
body: paragraphBlocks(markdown)[0] || "",
|
|
99
|
+
});
|
|
100
|
+
|
|
101
|
+
const section = ({ id, sourceHeading, title, markdown, role, priority, presentation, firstScreen = false }) => ({
|
|
102
|
+
id,
|
|
103
|
+
sourcePath: README_PATH,
|
|
104
|
+
sourceHeading,
|
|
105
|
+
title,
|
|
106
|
+
renderRole: role,
|
|
107
|
+
homepagePriority: priority,
|
|
108
|
+
defaultPresentation: presentation,
|
|
109
|
+
includeInFirstScreen: firstScreen,
|
|
110
|
+
markdown: normalizeLines(markdown),
|
|
111
|
+
});
|
|
112
|
+
|
|
113
|
+
export const buildSiteBundle = ({ readmeText, registry }) => {
|
|
114
|
+
const readme = parseReadme(readmeText);
|
|
115
|
+
const { lead, decisionKinds } = introLead(readme.intro);
|
|
116
|
+
const foundationTriad = parseFoundationTriad(readme.sections["Foundation triad"] || "");
|
|
117
|
+
const foundationModel = parseFoundationModel(readme.sections["Foundation model"] || "");
|
|
118
|
+
const productProofPath = parseProductProofPath(readme.sections["Product proof path"] || "");
|
|
119
|
+
const entries = registry.entries || [];
|
|
120
|
+
|
|
121
|
+
const homepageSections = [
|
|
122
|
+
section({
|
|
123
|
+
id: "foundation-triad",
|
|
124
|
+
sourceHeading: "Foundation triad",
|
|
125
|
+
title: "Foundation triad",
|
|
126
|
+
markdown: readme.sections["Foundation triad"],
|
|
127
|
+
role: "first-screen",
|
|
128
|
+
priority: 10,
|
|
129
|
+
presentation: "triad-cards",
|
|
130
|
+
firstScreen: true,
|
|
131
|
+
}),
|
|
132
|
+
section({
|
|
133
|
+
id: "foundation-model",
|
|
134
|
+
sourceHeading: "Foundation model",
|
|
135
|
+
title: "Foundation model",
|
|
136
|
+
markdown: readme.sections["Foundation model"],
|
|
137
|
+
role: "primary",
|
|
138
|
+
priority: 20,
|
|
139
|
+
presentation: "layered-model",
|
|
140
|
+
firstScreen: true,
|
|
141
|
+
}),
|
|
142
|
+
section({
|
|
143
|
+
id: "product-proof-path",
|
|
144
|
+
sourceHeading: "Product proof path",
|
|
145
|
+
title: "Product proof path",
|
|
146
|
+
markdown: readme.sections["Product proof path"],
|
|
147
|
+
role: "primary",
|
|
148
|
+
priority: 30,
|
|
149
|
+
presentation: "proof-path",
|
|
150
|
+
}),
|
|
151
|
+
section({
|
|
152
|
+
id: "agent-quickstart",
|
|
153
|
+
sourceHeading: "Agent Quickstart",
|
|
154
|
+
title: "Agent Quickstart",
|
|
155
|
+
markdown: readme.sections["Agent Quickstart"],
|
|
156
|
+
role: "support",
|
|
157
|
+
priority: 40,
|
|
158
|
+
presentation: "ordered-steps",
|
|
159
|
+
}),
|
|
160
|
+
section({
|
|
161
|
+
id: "decision-metadata",
|
|
162
|
+
sourceHeading: "Decision metadata",
|
|
163
|
+
title: "Decision metadata",
|
|
164
|
+
markdown: readme.sections["Decision metadata"],
|
|
165
|
+
role: "support",
|
|
166
|
+
priority: 50,
|
|
167
|
+
presentation: "fact-source",
|
|
168
|
+
}),
|
|
169
|
+
section({
|
|
170
|
+
id: "homepage-content-contract",
|
|
171
|
+
sourceHeading: "Homepage content contract",
|
|
172
|
+
title: "Homepage content contract",
|
|
173
|
+
markdown: readme.sections["Homepage content contract"],
|
|
174
|
+
role: "renderer-contract",
|
|
175
|
+
priority: 90,
|
|
176
|
+
presentation: "developer-note",
|
|
177
|
+
}),
|
|
178
|
+
];
|
|
179
|
+
|
|
180
|
+
return {
|
|
181
|
+
schemaVersion: 1,
|
|
182
|
+
contract: "kfd-site-bundle",
|
|
183
|
+
source: {
|
|
184
|
+
package: "@kungfu-tech/kfd",
|
|
185
|
+
homepageTextSource: README_PATH,
|
|
186
|
+
registry: REGISTRY_PATH,
|
|
187
|
+
decisionsDir: "decisions",
|
|
188
|
+
},
|
|
189
|
+
routes: {
|
|
190
|
+
home: "/",
|
|
191
|
+
decisionPattern: "/{number}",
|
|
192
|
+
llms: "/llms.txt",
|
|
193
|
+
manifest: "/manifest.json",
|
|
194
|
+
},
|
|
195
|
+
homepage: {
|
|
196
|
+
title: readme.title,
|
|
197
|
+
lead,
|
|
198
|
+
decisionKinds,
|
|
199
|
+
foundationTriad,
|
|
200
|
+
foundationModel,
|
|
201
|
+
productProofPath,
|
|
202
|
+
currentDecisions: {
|
|
203
|
+
heading: "Current decisions",
|
|
204
|
+
source: REGISTRY_PATH,
|
|
205
|
+
},
|
|
206
|
+
sections: homepageSections,
|
|
207
|
+
displayPlan: {
|
|
208
|
+
firstScreen: {
|
|
209
|
+
include: ["title", "lead", "foundation-triad", "foundation-model.chain"],
|
|
210
|
+
maxPrimarySections: 2,
|
|
211
|
+
note: "The first viewport should establish KFD identity and the three-decision worldview without showing renderer or developer contract text.",
|
|
212
|
+
},
|
|
213
|
+
primary: ["foundation-triad", "foundation-model", "product-proof-path"],
|
|
214
|
+
support: ["agent-quickstart", "decision-metadata"],
|
|
215
|
+
rendererContract: ["homepage-content-contract"],
|
|
216
|
+
currentDecisions: {
|
|
217
|
+
source: REGISTRY_PATH,
|
|
218
|
+
placement: "after-primary",
|
|
219
|
+
ids: entries.map((entry) => entry.id),
|
|
220
|
+
},
|
|
221
|
+
},
|
|
222
|
+
},
|
|
223
|
+
decisionPages: {
|
|
224
|
+
source: REGISTRY_PATH,
|
|
225
|
+
bodySource: "registry.entries[].path",
|
|
226
|
+
stableUrlField: "url",
|
|
227
|
+
metadata: {
|
|
228
|
+
licenseBoundary: {
|
|
229
|
+
license: "Apache-2.0",
|
|
230
|
+
licenseFile: "LICENSE",
|
|
231
|
+
officialStatusAndTrademarks: "TRADEMARKS.md",
|
|
232
|
+
summary: "Apache-2.0 covers repository contents; it does not grant KFD/Kungfu trademarks, official status, certification status, or endorsement.",
|
|
233
|
+
},
|
|
234
|
+
publicFactSource: {
|
|
235
|
+
kind: "git-repository",
|
|
236
|
+
host: "github",
|
|
237
|
+
repository: "kungfu-systems/kfd",
|
|
238
|
+
url: "https://github.com/kungfu-systems/kfd",
|
|
239
|
+
loadBearingCoordinate: "commit-addressed repository contents",
|
|
240
|
+
stableRenderedIndex: "https://kfd.libkungfu.dev",
|
|
241
|
+
canonicalPaths: [
|
|
242
|
+
"decisions/kfd-N.md",
|
|
243
|
+
REGISTRY_PATH,
|
|
244
|
+
"standards.json",
|
|
245
|
+
],
|
|
246
|
+
projectionSurfaces: [
|
|
247
|
+
"https://kfd.libkungfu.dev/N",
|
|
248
|
+
"npm:@kungfu-tech/kfd",
|
|
249
|
+
"Buildchain release passports",
|
|
250
|
+
],
|
|
251
|
+
extensionRequestNote: "GitHub issues are extension request paths; KFD facts are created only by committed repository contents.",
|
|
252
|
+
},
|
|
253
|
+
},
|
|
254
|
+
},
|
|
255
|
+
renderingBoundary: {
|
|
256
|
+
ownedByKfd: [
|
|
257
|
+
"homepage title and text",
|
|
258
|
+
"homepage section projection from README.md",
|
|
259
|
+
"foundation triad commitments",
|
|
260
|
+
"foundation model layers and chain",
|
|
261
|
+
"product proof path text",
|
|
262
|
+
"agent quickstart text",
|
|
263
|
+
"decision metadata",
|
|
264
|
+
"decision metadata fact source",
|
|
265
|
+
"license and official-status boundary",
|
|
266
|
+
"decision markdown bodies",
|
|
267
|
+
],
|
|
268
|
+
ownedBySite: [
|
|
269
|
+
"HTML structure",
|
|
270
|
+
"CSS",
|
|
271
|
+
"responsive layout",
|
|
272
|
+
"navigation layout",
|
|
273
|
+
"visual assets",
|
|
274
|
+
"decorative images",
|
|
275
|
+
"markdown-to-HTML renderer",
|
|
276
|
+
"section presentation and progressive disclosure within KFD displayPlan constraints",
|
|
277
|
+
],
|
|
278
|
+
},
|
|
279
|
+
};
|
|
280
|
+
};
|
|
281
|
+
|
|
282
|
+
export const readInputs = () => ({
|
|
283
|
+
readmeText: readFileSync(README_PATH, "utf8"),
|
|
284
|
+
registry: JSON.parse(readFileSync(REGISTRY_PATH, "utf8")),
|
|
285
|
+
});
|
|
286
|
+
|
|
287
|
+
export const generatedSiteBundle = () => buildSiteBundle(readInputs());
|
|
288
|
+
|
|
289
|
+
if (process.argv[1] && import.meta.url === pathToFileURL(process.argv[1]).href) {
|
|
290
|
+
const bundle = generatedSiteBundle();
|
|
291
|
+
writeFileSync(SITE_BUNDLE_PATH, `${JSON.stringify(bundle, null, 2)}\n`);
|
|
292
|
+
console.log(`updated ${SITE_BUNDLE_PATH}`);
|
|
293
|
+
}
|
package/site/kfd-site.json
CHANGED
|
@@ -62,7 +62,10 @@
|
|
|
62
62
|
"chain": "non-drifting facts -> inspectable trust -> transparent cooperation",
|
|
63
63
|
"explanation": [
|
|
64
64
|
"This is why KFDs are not only internal governance text. KFD-1 gives the foundation model its first layer by making fact sources operational: a fact-bearing contract world must be declared, inspectable, and unable to drift invisibly. KFD-2 then defines how trust can stand on those facts. KFD-3 defines how humans and agents can cooperate once facts and trust are visible.",
|
|
65
|
-
"Real-world agent work turns ordinary work into a dense system of products, files, repositories, traces, policies, humans, and agents. In that world, complexity cannot be made safe by hidden state or forced compliance. It has to be compressed through non-drifting facts, inspectable trust, and voluntary cooperation. The goal is not to force increasingly capable participants into compliance through stronger pressure. It is to give humans and agents a shared worldview for adapting to a more complex world."
|
|
65
|
+
"Real-world agent work turns ordinary work into a dense system of products, files, repositories, traces, policies, humans, and agents. In that world, complexity cannot be made safe by hidden state or forced compliance. It has to be compressed through non-drifting facts, inspectable trust, and voluntary cooperation. The goal is not to force increasingly capable participants into compliance through stronger pressure. It is to give humans and agents a shared worldview for adapting to a more complex world.",
|
|
66
|
+
"This also changes what a product interface means. Agent-facing CLI, API, documentation, envelopes, and local fact surfaces are not secondary integration channels after the human GUI. They are first-class interfaces for intelligent participants that may use the system more frequently than humans do. A control plane in this model is a shared work environment for humans and agents, not only a human dashboard over agent activity.",
|
|
67
|
+
"This model used to be expensive to practice. Stable facts require engineering, iteration, and disciplined evidence paths, so older systems often survived by leaning on cheaper substitutes such as authority, habit, reputation, or intuition. Agents change both sides of that equation: they make the world more complex, and they also provide more intelligence for building fact-bearing systems. KFD is part of that bootstrap: the worldview is forged through the same transparent and inspectable mechanisms it asks products to provide.",
|
|
68
|
+
"This README states the architecture; KFD-1, KFD-2, and KFD-3 provide the detailed rules."
|
|
66
69
|
]
|
|
67
70
|
},
|
|
68
71
|
"productProofPath": {
|
|
@@ -72,6 +75,107 @@
|
|
|
72
75
|
"currentDecisions": {
|
|
73
76
|
"heading": "Current decisions",
|
|
74
77
|
"source": "registry.json"
|
|
78
|
+
},
|
|
79
|
+
"sections": [
|
|
80
|
+
{
|
|
81
|
+
"id": "foundation-triad",
|
|
82
|
+
"sourcePath": "README.md",
|
|
83
|
+
"sourceHeading": "Foundation triad",
|
|
84
|
+
"title": "Foundation triad",
|
|
85
|
+
"renderRole": "first-screen",
|
|
86
|
+
"homepagePriority": 10,
|
|
87
|
+
"defaultPresentation": "triad-cards",
|
|
88
|
+
"includeInFirstScreen": true,
|
|
89
|
+
"markdown": "The first three KFDs form the public foundation for kungfu-systems:\n\n```text\nKFD-1: facts must not drift.\nKFD-2: trust must start from facts.\nKFD-3: cooperation must start from transparent value.\n```\n\nTogether they define the load-bearing path for Kungfu products: make facts\nnon-drifting, make trust inspectable from those facts, and let humans and\nagents cooperate through visible value rather than hidden pressure."
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
"id": "foundation-model",
|
|
93
|
+
"sourcePath": "README.md",
|
|
94
|
+
"sourceHeading": "Foundation model",
|
|
95
|
+
"title": "Foundation model",
|
|
96
|
+
"renderRole": "primary",
|
|
97
|
+
"homepagePriority": 20,
|
|
98
|
+
"defaultPresentation": "layered-model",
|
|
99
|
+
"includeInFirstScreen": true,
|
|
100
|
+
"markdown": "The triad is intentionally ordered. It is a compact model for surviving and\nevolving in complex systems, especially in a world where agents can observe,\nact, delegate, and remember across many surfaces.\n\n| Layer | Decision | Reader question | Commitment |\n|---|---|---|---|\n| 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. |\n| 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. |\n| Participant-to-participant cooperation | KFD-3 | How should peer intelligent participants cooperate? | Cooperation starts from transparent value, stable choice, and explainable constraints, not pressure. |\n\nIn short:\n\n```text\nnon-drifting facts -> inspectable trust -> transparent cooperation\n```\n\nThis is why KFDs are not only internal governance text. KFD-1 gives the\nfoundation model its first layer by making fact sources operational: a\nfact-bearing contract world must be declared, inspectable, and unable to drift\ninvisibly. KFD-2 then defines how trust can stand on those facts. KFD-3\ndefines how humans and agents can cooperate once facts and trust are visible.\n\nReal-world agent work turns ordinary work into a dense system of products,\nfiles, repositories, traces, policies, humans, and agents. In that world,\ncomplexity cannot be made safe by hidden state or forced compliance. It has to\nbe compressed through non-drifting facts, inspectable trust, and voluntary\ncooperation. The goal is not to force increasingly capable participants into\ncompliance through stronger pressure. It is to give humans and agents a shared\nworldview for adapting to a more complex world.\n\nThis also changes what a product interface means. Agent-facing CLI, API,\ndocumentation, envelopes, and local fact surfaces are not secondary integration\nchannels after the human GUI. They are first-class interfaces for intelligent\nparticipants that may use the system more frequently than humans do. A control\nplane in this model is a shared work environment for humans and agents, not\nonly a human dashboard over agent activity.\n\nThis model used to be expensive to practice. Stable facts require engineering,\niteration, and disciplined evidence paths, so older systems often survived by\nleaning on cheaper substitutes such as authority, habit, reputation, or\nintuition. Agents change both sides of that equation: they make the world more\ncomplex, and they also provide more intelligence for building fact-bearing\nsystems. KFD is part of that bootstrap: the worldview is forged through the same\ntransparent and inspectable mechanisms it asks products to provide.\n\nThis README states the architecture; KFD-1, KFD-2, and KFD-3 provide the\ndetailed rules."
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
"id": "product-proof-path",
|
|
104
|
+
"sourcePath": "README.md",
|
|
105
|
+
"sourceHeading": "Product proof path",
|
|
106
|
+
"title": "Product proof path",
|
|
107
|
+
"renderRole": "primary",
|
|
108
|
+
"homepagePriority": 30,
|
|
109
|
+
"defaultPresentation": "proof-path",
|
|
110
|
+
"includeInFirstScreen": false,
|
|
111
|
+
"markdown": "KFDs are not a detached manifesto, but they are not a demand that readers adopt\na Kungfu product before understanding the decisions. A philosophy becomes\nload-bearing only when it can be seen in a concrete case. The first concrete\ncase is this package itself: `standards.json`, `schemas/`, `docs/`,\n`site/kfd-site.json`, and `scripts/check.mjs` show how KFD-1, KFD-2, and KFD-3\nare expressed as consumable interfaces for both humans and agents. For the\nbroader product case, use the main Kungfu product entrypoint\n(`https://kungfu.tech`) for product philosophy, and Buildchain\n(`https://buildchain.libkungfu.dev`) for release and provenance\naccountability. This registry states the commitments; this package and those\nentrypoints show how the commitments are meant to be borne in practice.\n\nRendered index: `https://kfd.libkungfu.dev` (stable machine path per entry,\ne.g. `https://kfd.libkungfu.dev/1`). This repository publishes\n`@kungfu-tech/kfd` — the decision texts plus a machine-readable\n`registry.json` — which the site consumes as its single fact source.\n\nMachine consumers that need KFD-owned standard identity should read\n`standards.json`. It is the versioned metadata surface for stable standard\nkeys, document routes and SHA-256 digests, schema IDs, KFD-owned concept names,\nand machine-interface contract versions. In Node or TypeScript projects, import\nit as:\n\n```js\nimport standards from \"@kungfu-tech/kfd/standards.json\" with { type: \"json\" };\n```"
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
"id": "agent-quickstart",
|
|
115
|
+
"sourcePath": "README.md",
|
|
116
|
+
"sourceHeading": "Agent Quickstart",
|
|
117
|
+
"title": "Agent Quickstart",
|
|
118
|
+
"renderRole": "support",
|
|
119
|
+
"homepagePriority": 40,
|
|
120
|
+
"defaultPresentation": "ordered-steps",
|
|
121
|
+
"includeInFirstScreen": false,
|
|
122
|
+
"markdown": "Agents consuming this package should start from the same sources as humans:\n\n1. Read this README for the foundation model and package map.\n2. Read `standards.json` for canonical KFD numbers, schema IDs, concept names,\n and interface contracts.\n3. Use `site/kfd-site.json` decision metadata or the KFD-3 collaboration\n interface fact-source metadata to identify the public KFD fact source.\n4. Use `schemas/kfd-2/trust-taxonomy.schema.json` for KFD-2 residual-risk and\n trust-downgrade values. Unknown taxonomy values are invalid.\n5. Use `schemas/kfd-3/collaboration-interface.schema.json` and\n `schemas/kfd-3/witness.schema.json` to inspect collaboration interfaces.\n6. If a needed KFD-2 taxonomy value is missing, open a KFD GitHub issue rather\n than inventing a local value:\n `https://github.com/kungfu-systems/kfd/issues/new?title=KFD-2%20trust%20taxonomy%20extension%20request`.\n\nKFD package semver is only the distribution version. KFD-owned machine\ninterfaces carry their own `schemaVersion` and `contract` fields. Compatible\nadditions may keep the same interface version; semantic changes, required-field\nchanges, verification meaning changes, or responsibility-boundary changes must\nuse a new interface version or contract.\n\nKFD-2 publishes trust-taxonomy, release-claims, and release-trust-passport\nschemas under `schemas/kfd-2/`. These schemas let Buildchain and other release\nsystems audit whether public release claims are bound to source facts,\nevidence, hashes, audit boundaries, residual risk, and responsibility state. See\n[`docs/kfd-2-release-trust.md`](docs/kfd-2-release-trust.md).\n\nKFD-3 also publishes a general collaboration-interface schema and witness\nschema under `schemas/kfd-3/`. These schemas are for participant-facing product\ninterfaces, not only agent APIs. A product such as Kungfu may implement an\nagent-first profile, but that profile remains a product-specific realization of\nKFD-3. The KFD-owned boundary is the standard vocabulary, schema IDs, and\nclosed-world evidence shape. See\n[`docs/kfd-3-collaboration-interface.md`](docs/kfd-3-collaboration-interface.md)."
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
"id": "decision-metadata",
|
|
126
|
+
"sourcePath": "README.md",
|
|
127
|
+
"sourceHeading": "Decision metadata",
|
|
128
|
+
"title": "Decision metadata",
|
|
129
|
+
"renderRole": "support",
|
|
130
|
+
"homepagePriority": 50,
|
|
131
|
+
"defaultPresentation": "fact-source",
|
|
132
|
+
"includeInFirstScreen": false,
|
|
133
|
+
"markdown": "Every rendered decision page should make the KFD fact source explicit. The\npublic KFD fact source is the GitHub-hosted `kungfu-systems/kfd` git\nrepository. GitHub is the current canonical coordination and hosting surface;\nthe load-bearing facts are the commit-addressed repository contents.\n\nDecision metadata should expose:\n\n- Public fact source: `https://github.com/kungfu-systems/kfd`\n- Load-bearing coordinate: commit-addressed repository contents.\n- Canonical paths: `decisions/kfd-N.md`, `registry.json`, `standards.json`.\n- Stable rendered index: `https://kfd.libkungfu.dev`.\n- Rendered URL: `https://kfd.libkungfu.dev/N`.\n\nRendered pages, npm package contents, Buildchain release passports, and\n`kfd.libkungfu.dev` are projections or evidence surfaces. A GitHub issue is an\nextension request path, not a KFD fact by itself; it becomes part of the KFD\nfact source only after the resulting change is committed to the repository."
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
"id": "homepage-content-contract",
|
|
137
|
+
"sourcePath": "README.md",
|
|
138
|
+
"sourceHeading": "Homepage content contract",
|
|
139
|
+
"title": "Homepage content contract",
|
|
140
|
+
"renderRole": "renderer-contract",
|
|
141
|
+
"homepagePriority": 90,
|
|
142
|
+
"defaultPresentation": "developer-note",
|
|
143
|
+
"includeInFirstScreen": false,
|
|
144
|
+
"markdown": "This README is also the homepage text source for `https://kfd.libkungfu.dev`.\nWhen `site-libkungfu-dev` consumes the `@kungfu-tech/kfd` npm package to render\nthe KFD site, it should treat this file as the canonical homepage copy, not as\nan implementation note to paraphrase in the site repository.\n\nThe first screen should be derived from this README:\n\n- Page identity: the top-level heading.\n- Lead: the opening paragraph that defines KFD as the organization-wide\n decision registry.\n- Foundation signal: the `Foundation triad` section, especially the three\n one-line commitments.\n- First-screen explanation: the beginning of `Foundation model`, ending at the\n `non-drifting facts -> inspectable trust -> transparent cooperation` chain.\n\nDecision cards, detail links, and machine paths should come from\n`registry.json`. The machine-readable site bundle lives at `site/kfd-site.json`\nand gives renderers stable fields for the homepage, foundation model, product\nproof path, decision routes, and rendering boundary. A site renderer may adapt\nlayout, navigation, typography, and visual assets, but it should not maintain\nseparate homepage wording that can drift from this package.\n\n`site/kfd-site.json` is generated from this README by\n`scripts/update-site-bundle.mjs`. The generated bundle exposes both compatible\ntop-level homepage fields and ordered `homepage.sections` entries. The\n`homepage.displayPlan` tells renderers which sections belong in the first\nscreen, primary narrative, support area, and renderer-contract area. Site\nrepositories should consume that bundle instead of parsing this README\nthemselves."
|
|
145
|
+
}
|
|
146
|
+
],
|
|
147
|
+
"displayPlan": {
|
|
148
|
+
"firstScreen": {
|
|
149
|
+
"include": [
|
|
150
|
+
"title",
|
|
151
|
+
"lead",
|
|
152
|
+
"foundation-triad",
|
|
153
|
+
"foundation-model.chain"
|
|
154
|
+
],
|
|
155
|
+
"maxPrimarySections": 2,
|
|
156
|
+
"note": "The first viewport should establish KFD identity and the three-decision worldview without showing renderer or developer contract text."
|
|
157
|
+
},
|
|
158
|
+
"primary": [
|
|
159
|
+
"foundation-triad",
|
|
160
|
+
"foundation-model",
|
|
161
|
+
"product-proof-path"
|
|
162
|
+
],
|
|
163
|
+
"support": [
|
|
164
|
+
"agent-quickstart",
|
|
165
|
+
"decision-metadata"
|
|
166
|
+
],
|
|
167
|
+
"rendererContract": [
|
|
168
|
+
"homepage-content-contract"
|
|
169
|
+
],
|
|
170
|
+
"currentDecisions": {
|
|
171
|
+
"source": "registry.json",
|
|
172
|
+
"placement": "after-primary",
|
|
173
|
+
"ids": [
|
|
174
|
+
"KFD-1",
|
|
175
|
+
"KFD-2",
|
|
176
|
+
"KFD-3"
|
|
177
|
+
]
|
|
178
|
+
}
|
|
75
179
|
}
|
|
76
180
|
},
|
|
77
181
|
"decisionPages": {
|
|
@@ -109,9 +213,11 @@
|
|
|
109
213
|
"renderingBoundary": {
|
|
110
214
|
"ownedByKfd": [
|
|
111
215
|
"homepage title and text",
|
|
216
|
+
"homepage section projection from README.md",
|
|
112
217
|
"foundation triad commitments",
|
|
113
218
|
"foundation model layers and chain",
|
|
114
219
|
"product proof path text",
|
|
220
|
+
"agent quickstart text",
|
|
115
221
|
"decision metadata",
|
|
116
222
|
"decision metadata fact source",
|
|
117
223
|
"license and official-status boundary",
|
|
@@ -124,7 +230,8 @@
|
|
|
124
230
|
"navigation layout",
|
|
125
231
|
"visual assets",
|
|
126
232
|
"decorative images",
|
|
127
|
-
"markdown-to-HTML renderer"
|
|
233
|
+
"markdown-to-HTML renderer",
|
|
234
|
+
"section presentation and progressive disclosure within KFD displayPlan constraints"
|
|
128
235
|
]
|
|
129
236
|
}
|
|
130
237
|
}
|