@kungfu-tech/kfd 1.0.0-alpha.19 → 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 (37) hide show
  1. package/.buildchain/kfd-1/contract-world.witness.json +579 -91
  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 +30 -18
  5. package/.buildchain/kfd-3/collaboration-interface.artifact.json +242 -57
  6. package/.buildchain/kfd-3/collaboration-interface.json +99 -1
  7. package/.buildchain/kfd-3/collaboration-interface.prebuild.json +261 -32
  8. package/README.md +18 -13
  9. package/buildchain.contract-lock.json +5 -5
  10. package/decisions/{kfd-1.md → KFD-1.md} +40 -12
  11. package/decisions/{kfd-2.md → KFD-2.md} +37 -4
  12. package/decisions/{kfd-3.md → KFD-3.md} +17 -1
  13. package/docs/KFD-1-usage.md +37 -0
  14. package/docs/KFD-2-usage.md +123 -0
  15. package/docs/{kfd-3-collaboration-interface.md → KFD-3-usage.md} +21 -0
  16. package/docs/KFD-4-usage.md +31 -0
  17. package/docs/MAP.md +13 -7
  18. package/kfd.release.json +1 -1
  19. package/package.json +3 -1
  20. package/registry.json +4 -4
  21. package/release-impact.json +41 -5
  22. package/schemas/kfd-1/contract-world.schema.json +67 -4
  23. package/schemas/kfd-1/witness.schema.json +113 -0
  24. package/schemas/kfd-2/trust-assessment.schema.json +313 -0
  25. package/schemas/kfd-2/trust-claims.schema.json +334 -0
  26. package/schemas/kfd-3/collaboration-interface.schema.json +60 -0
  27. package/schemas/kfd-3/witness.schema.json +8 -0
  28. package/schemas/kfd-standards.schema.json +124 -0
  29. package/scripts/check.mjs +256 -12
  30. package/scripts/update-kfd-1-witness.mjs +17 -6
  31. package/scripts/update-kfd-2-claim.mjs +226 -5
  32. package/scripts/update-kfd-3-witness.mjs +35 -3
  33. package/scripts/update-site-bundle.mjs +32 -2
  34. package/site/kfd-site.json +67 -4
  35. package/standards.json +634 -11
  36. package/docs/kfd-2-release-trust.md +0 -78
  37. /package/decisions/{kfd-4.md → KFD-4.md} +0 -0
@@ -0,0 +1,334 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://kfd.libkungfu.dev/schemas/kfd-2/trust-claims.schema.json",
4
+ "title": "KFD-2 trust claims",
5
+ "type": "object",
6
+ "required": [
7
+ "schemaVersion",
8
+ "contract",
9
+ "standard",
10
+ "claims"
11
+ ],
12
+ "properties": {
13
+ "schemaVersion": {
14
+ "const": 1
15
+ },
16
+ "contract": {
17
+ "const": "kfd-2-trust-claims"
18
+ },
19
+ "standard": {
20
+ "const": "kfd-2"
21
+ },
22
+ "claims": {
23
+ "type": "array",
24
+ "minItems": 1,
25
+ "items": {
26
+ "$ref": "#/$defs/claim"
27
+ }
28
+ },
29
+ "projection": {
30
+ "$ref": "#/$defs/projection"
31
+ },
32
+ "schemaEvolution": {
33
+ "$ref": "#/$defs/schemaEvolution"
34
+ }
35
+ },
36
+ "additionalProperties": true,
37
+ "$defs": {
38
+ "claim": {
39
+ "type": "object",
40
+ "required": [
41
+ "id",
42
+ "statement",
43
+ "subject",
44
+ "facts",
45
+ "evidence",
46
+ "auditBoundary",
47
+ "responsibility",
48
+ "status"
49
+ ],
50
+ "properties": {
51
+ "id": {
52
+ "type": "string",
53
+ "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$"
54
+ },
55
+ "statement": {
56
+ "type": "string",
57
+ "minLength": 1
58
+ },
59
+ "subject": {
60
+ "$ref": "#/$defs/claimSubject"
61
+ },
62
+ "facts": {
63
+ "type": "array",
64
+ "minItems": 1,
65
+ "items": {
66
+ "$ref": "#/$defs/artifactPointer"
67
+ }
68
+ },
69
+ "evidence": {
70
+ "type": "array",
71
+ "minItems": 1,
72
+ "items": {
73
+ "$ref": "#/$defs/evidenceBinding"
74
+ }
75
+ },
76
+ "verification": {
77
+ "$ref": "#/$defs/verification"
78
+ },
79
+ "auditBoundary": {
80
+ "$ref": "#/$defs/auditBoundary"
81
+ },
82
+ "residualRisk": {
83
+ "type": "array",
84
+ "items": {
85
+ "$ref": "https://kfd.libkungfu.dev/schemas/kfd-2/trust-taxonomy.schema.json#/$defs/residualRisk"
86
+ }
87
+ },
88
+ "responsibility": {
89
+ "$ref": "#/$defs/responsibilityState"
90
+ },
91
+ "status": {
92
+ "enum": [
93
+ "declared",
94
+ "audited",
95
+ "enforced",
96
+ "not-applicable"
97
+ ]
98
+ }
99
+ },
100
+ "additionalProperties": true
101
+ },
102
+ "claimSubject": {
103
+ "type": "object",
104
+ "required": [
105
+ "kind",
106
+ "id"
107
+ ],
108
+ "properties": {
109
+ "kind": {
110
+ "enum": [
111
+ "kfd-standard",
112
+ "contract-world",
113
+ "collaboration-interface",
114
+ "observer-perspective",
115
+ "release",
116
+ "artifact",
117
+ "config",
118
+ "api",
119
+ "abi",
120
+ "gui-surface",
121
+ "runtime-fact",
122
+ "documentation",
123
+ "other"
124
+ ]
125
+ },
126
+ "id": {
127
+ "type": "string",
128
+ "minLength": 1
129
+ },
130
+ "standard": {
131
+ "type": "string",
132
+ "pattern": "^kfd-[1-9][0-9]*$"
133
+ },
134
+ "description": {
135
+ "type": "string",
136
+ "minLength": 1
137
+ }
138
+ },
139
+ "additionalProperties": true
140
+ },
141
+ "artifactPointer": {
142
+ "type": "object",
143
+ "required": [
144
+ "kind"
145
+ ],
146
+ "properties": {
147
+ "kind": {
148
+ "enum": [
149
+ "file",
150
+ "schema",
151
+ "package-export",
152
+ "artifact",
153
+ "command",
154
+ "witness",
155
+ "passport",
156
+ "url",
157
+ "other"
158
+ ]
159
+ },
160
+ "path": {
161
+ "type": "string",
162
+ "minLength": 1
163
+ },
164
+ "specifier": {
165
+ "type": "string",
166
+ "minLength": 1
167
+ },
168
+ "url": {
169
+ "type": "string",
170
+ "format": "uri"
171
+ },
172
+ "schemaId": {
173
+ "type": "string",
174
+ "format": "uri"
175
+ },
176
+ "sha256": {
177
+ "type": "string",
178
+ "pattern": "^[0-9a-f]{64}$"
179
+ },
180
+ "digest": {
181
+ "type": "string",
182
+ "minLength": 1
183
+ }
184
+ },
185
+ "additionalProperties": true
186
+ },
187
+ "evidenceBinding": {
188
+ "type": "object",
189
+ "required": [
190
+ "type",
191
+ "machineProvability"
192
+ ],
193
+ "properties": {
194
+ "type": {
195
+ "enum": [
196
+ "file",
197
+ "schema",
198
+ "package-export",
199
+ "artifact",
200
+ "hash",
201
+ "command-result",
202
+ "witness",
203
+ "passport-section",
204
+ "url",
205
+ "manual-review",
206
+ "other"
207
+ ]
208
+ },
209
+ "pointer": {
210
+ "$ref": "#/$defs/artifactPointer"
211
+ },
212
+ "machineProvability": {
213
+ "$ref": "https://kfd.libkungfu.dev/schemas/kfd-2/trust-taxonomy.schema.json#/$defs/machineProvability"
214
+ },
215
+ "description": {
216
+ "type": "string",
217
+ "minLength": 1
218
+ }
219
+ },
220
+ "additionalProperties": true
221
+ },
222
+ "verification": {
223
+ "type": "object",
224
+ "properties": {
225
+ "command": {
226
+ "type": "string",
227
+ "minLength": 1
228
+ },
229
+ "resultRef": {
230
+ "$ref": "#/$defs/artifactPointer"
231
+ },
232
+ "expectedResult": {
233
+ "enum": [
234
+ "pass",
235
+ "fail",
236
+ "warning",
237
+ "unverifiable"
238
+ ]
239
+ }
240
+ },
241
+ "additionalProperties": true
242
+ },
243
+ "auditBoundary": {
244
+ "type": "object",
245
+ "required": [
246
+ "scope",
247
+ "enumerability"
248
+ ],
249
+ "properties": {
250
+ "scope": {
251
+ "type": "string",
252
+ "minLength": 1
253
+ },
254
+ "enumerability": {
255
+ "enum": [
256
+ "closed-world",
257
+ "declared-open",
258
+ "sampled",
259
+ "manual"
260
+ ]
261
+ }
262
+ },
263
+ "additionalProperties": true
264
+ },
265
+ "responsibilityState": {
266
+ "type": "object",
267
+ "required": [
268
+ "owner",
269
+ "sourceOwner",
270
+ "verificationOwner",
271
+ "decisionOwner"
272
+ ],
273
+ "properties": {
274
+ "owner": {
275
+ "type": "string",
276
+ "minLength": 1
277
+ },
278
+ "sourceOwner": {
279
+ "type": "string",
280
+ "minLength": 1
281
+ },
282
+ "verificationOwner": {
283
+ "type": "string",
284
+ "minLength": 1
285
+ },
286
+ "decisionOwner": {
287
+ "type": "string",
288
+ "minLength": 1
289
+ },
290
+ "escalation": {
291
+ "type": "string",
292
+ "minLength": 1
293
+ }
294
+ },
295
+ "additionalProperties": true
296
+ },
297
+ "projection": {
298
+ "type": "object",
299
+ "required": [
300
+ "kind"
301
+ ],
302
+ "properties": {
303
+ "kind": {
304
+ "enum": [
305
+ "generic",
306
+ "release",
307
+ "package",
308
+ "site",
309
+ "runtime",
310
+ "other"
311
+ ]
312
+ },
313
+ "description": {
314
+ "type": "string",
315
+ "minLength": 1
316
+ }
317
+ },
318
+ "additionalProperties": true
319
+ },
320
+ "schemaEvolution": {
321
+ "type": "object",
322
+ "required": [
323
+ "compatibilityRule"
324
+ ],
325
+ "properties": {
326
+ "compatibilityRule": {
327
+ "type": "string",
328
+ "minLength": 1
329
+ }
330
+ },
331
+ "additionalProperties": true
332
+ }
333
+ }
334
+ }
@@ -12,6 +12,7 @@
12
12
  "participants",
13
13
  "minimalEntrypoints",
14
14
  "surfaces",
15
+ "valueEvidence",
15
16
  "transparentConstraints",
16
17
  "choicePaths",
17
18
  "closure"
@@ -78,6 +79,13 @@
78
79
  "$ref": "#/$defs/surface"
79
80
  }
80
81
  },
82
+ "valueEvidence": {
83
+ "type": "array",
84
+ "minItems": 1,
85
+ "items": {
86
+ "$ref": "#/$defs/valueEvidence"
87
+ }
88
+ },
81
89
  "transparentConstraints": {
82
90
  "type": "array",
83
91
  "items": {
@@ -337,6 +345,58 @@
337
345
  },
338
346
  "additionalProperties": true
339
347
  },
348
+ "valueEvidence": {
349
+ "type": "object",
350
+ "required": [
351
+ "id",
352
+ "claim",
353
+ "participants",
354
+ "facts",
355
+ "evidence"
356
+ ],
357
+ "properties": {
358
+ "id": {
359
+ "type": "string",
360
+ "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$"
361
+ },
362
+ "claim": {
363
+ "type": "string",
364
+ "minLength": 1
365
+ },
366
+ "participants": {
367
+ "type": "array",
368
+ "minItems": 1,
369
+ "items": {
370
+ "type": "string",
371
+ "minLength": 1
372
+ }
373
+ },
374
+ "facts": {
375
+ "type": "array",
376
+ "minItems": 1,
377
+ "items": {
378
+ "$ref": "#/$defs/artifactPointer"
379
+ }
380
+ },
381
+ "evidence": {
382
+ "type": "array",
383
+ "minItems": 1,
384
+ "items": {
385
+ "$ref": "#/$defs/artifactPointer"
386
+ }
387
+ },
388
+ "trustAssessment": {
389
+ "$ref": "#/$defs/artifactPointer"
390
+ },
391
+ "residualRisk": {
392
+ "type": "array",
393
+ "items": {
394
+ "$ref": "https://kfd.libkungfu.dev/schemas/kfd-2/trust-taxonomy.schema.json#/$defs/residualRisk"
395
+ }
396
+ }
397
+ },
398
+ "additionalProperties": true
399
+ },
340
400
  "transparentConstraint": {
341
401
  "type": "object",
342
402
  "required": [
@@ -47,6 +47,7 @@
47
47
  "required": [
48
48
  "minimalEntrypoints",
49
49
  "discoverability",
50
+ "valueEvidence",
50
51
  "transparentConstraints",
51
52
  "choicePaths"
52
53
  ],
@@ -64,6 +65,13 @@
64
65
  "$ref": "#/$defs/artifactPointer"
65
66
  }
66
67
  },
68
+ "valueEvidence": {
69
+ "type": "array",
70
+ "minItems": 1,
71
+ "items": {
72
+ "$ref": "#/$defs/artifactPointer"
73
+ }
74
+ },
67
75
  "transparentConstraints": {
68
76
  "type": "array",
69
77
  "items": {
@@ -231,6 +231,130 @@
231
231
  "additionalProperties": {
232
232
  "type": "string"
233
233
  }
234
+ },
235
+ "surfaceRegister": {
236
+ "$ref": "#/$defs/surfaceRegister"
237
+ }
238
+ },
239
+ "additionalProperties": false
240
+ },
241
+ "surfaceClass": {
242
+ "enum": [
243
+ "integration-time",
244
+ "cross-time"
245
+ ]
246
+ },
247
+ "compatibilityImpact": {
248
+ "enum": [
249
+ "breaking",
250
+ "additive",
251
+ "none",
252
+ "unclassifiable"
253
+ ]
254
+ },
255
+ "impactProjection": {
256
+ "type": "object",
257
+ "required": [
258
+ "breaking",
259
+ "additive",
260
+ "none",
261
+ "unclassifiable"
262
+ ],
263
+ "properties": {
264
+ "breaking": {
265
+ "type": "string",
266
+ "minLength": 1
267
+ },
268
+ "additive": {
269
+ "type": "string",
270
+ "minLength": 1
271
+ },
272
+ "none": {
273
+ "type": "string",
274
+ "minLength": 1
275
+ },
276
+ "unclassifiable": {
277
+ "type": "string",
278
+ "minLength": 1
279
+ }
280
+ },
281
+ "additionalProperties": false
282
+ },
283
+ "registeredSurface": {
284
+ "type": "object",
285
+ "required": [
286
+ "id",
287
+ "class",
288
+ "description",
289
+ "sourcePath",
290
+ "impactProjection"
291
+ ],
292
+ "properties": {
293
+ "id": {
294
+ "type": "string",
295
+ "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$"
296
+ },
297
+ "class": {
298
+ "$ref": "#/$defs/surfaceClass"
299
+ },
300
+ "classes": {
301
+ "type": "array",
302
+ "items": {
303
+ "$ref": "#/$defs/surfaceClass"
304
+ },
305
+ "uniqueItems": true,
306
+ "minItems": 1
307
+ },
308
+ "description": {
309
+ "type": "string",
310
+ "minLength": 1
311
+ },
312
+ "sourcePath": {
313
+ "type": "string",
314
+ "minLength": 1
315
+ },
316
+ "weldRationale": {
317
+ "type": "string",
318
+ "minLength": 1
319
+ },
320
+ "impactProjection": {
321
+ "$ref": "#/$defs/impactProjection"
322
+ }
323
+ },
324
+ "additionalProperties": false
325
+ },
326
+ "surfaceRegister": {
327
+ "type": "object",
328
+ "required": [
329
+ "factSource",
330
+ "surfaceClasses",
331
+ "compatibilityImpactClasses",
332
+ "surfaces"
333
+ ],
334
+ "properties": {
335
+ "factSource": {
336
+ "type": "string",
337
+ "minLength": 1
338
+ },
339
+ "surfaceClasses": {
340
+ "type": "array",
341
+ "items": {
342
+ "$ref": "#/$defs/surfaceClass"
343
+ },
344
+ "uniqueItems": true
345
+ },
346
+ "compatibilityImpactClasses": {
347
+ "type": "array",
348
+ "items": {
349
+ "$ref": "#/$defs/compatibilityImpact"
350
+ },
351
+ "uniqueItems": true
352
+ },
353
+ "surfaces": {
354
+ "type": "array",
355
+ "items": {
356
+ "$ref": "#/$defs/registeredSurface"
357
+ }
234
358
  }
235
359
  },
236
360
  "additionalProperties": false