@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
@@ -0,0 +1,313 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://kfd.libkungfu.dev/schemas/kfd-2/trust-assessment.schema.json",
4
+ "title": "KFD-2 trust assessment",
5
+ "type": "object",
6
+ "required": [
7
+ "schemaVersion",
8
+ "contract",
9
+ "standard",
10
+ "assessedClaims",
11
+ "result",
12
+ "assessments",
13
+ "responsibility"
14
+ ],
15
+ "properties": {
16
+ "schemaVersion": {
17
+ "const": 1
18
+ },
19
+ "contract": {
20
+ "const": "kfd-2-trust-assessment"
21
+ },
22
+ "standard": {
23
+ "const": "kfd-2"
24
+ },
25
+ "assessedClaims": {
26
+ "type": "object",
27
+ "required": [
28
+ "schemaId",
29
+ "digest"
30
+ ],
31
+ "properties": {
32
+ "schemaId": {
33
+ "const": "https://kfd.libkungfu.dev/schemas/kfd-2/trust-claims.schema.json"
34
+ },
35
+ "path": {
36
+ "type": "string",
37
+ "minLength": 1
38
+ },
39
+ "digest": {
40
+ "type": "string",
41
+ "minLength": 1
42
+ }
43
+ },
44
+ "additionalProperties": true
45
+ },
46
+ "result": {
47
+ "enum": [
48
+ "pass",
49
+ "fail",
50
+ "warning",
51
+ "unverifiable"
52
+ ]
53
+ },
54
+ "assessments": {
55
+ "type": "array",
56
+ "minItems": 1,
57
+ "items": {
58
+ "$ref": "#/$defs/claimAssessment"
59
+ }
60
+ },
61
+ "unboundClaims": {
62
+ "type": "array",
63
+ "items": {
64
+ "type": "string",
65
+ "minLength": 1
66
+ }
67
+ },
68
+ "downgradeReasons": {
69
+ "type": "array",
70
+ "items": {
71
+ "$ref": "https://kfd.libkungfu.dev/schemas/kfd-2/trust-taxonomy.schema.json#/$defs/downgradeReason"
72
+ }
73
+ },
74
+ "responsibility": {
75
+ "$ref": "#/$defs/responsibilityState"
76
+ },
77
+ "projection": {
78
+ "$ref": "#/$defs/projection"
79
+ },
80
+ "schemaEvolution": {
81
+ "$ref": "#/$defs/schemaEvolution"
82
+ }
83
+ },
84
+ "additionalProperties": true,
85
+ "$defs": {
86
+ "claimAssessment": {
87
+ "type": "object",
88
+ "required": [
89
+ "id",
90
+ "claimId",
91
+ "subject",
92
+ "result",
93
+ "facts",
94
+ "evidence",
95
+ "auditBoundary",
96
+ "responsibility"
97
+ ],
98
+ "properties": {
99
+ "id": {
100
+ "type": "string",
101
+ "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$"
102
+ },
103
+ "claimId": {
104
+ "type": "string",
105
+ "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$"
106
+ },
107
+ "subject": {
108
+ "$ref": "#/$defs/claimSubject"
109
+ },
110
+ "result": {
111
+ "enum": [
112
+ "pass",
113
+ "fail",
114
+ "warning",
115
+ "unverifiable"
116
+ ]
117
+ },
118
+ "facts": {
119
+ "type": "array",
120
+ "items": {
121
+ "$ref": "#/$defs/evidenceResult"
122
+ }
123
+ },
124
+ "evidence": {
125
+ "type": "array",
126
+ "items": {
127
+ "$ref": "#/$defs/evidenceResult"
128
+ }
129
+ },
130
+ "auditBoundary": {
131
+ "$ref": "#/$defs/auditBoundary"
132
+ },
133
+ "responsibility": {
134
+ "$ref": "#/$defs/responsibilityState"
135
+ },
136
+ "residualRisk": {
137
+ "type": "array",
138
+ "items": {
139
+ "$ref": "https://kfd.libkungfu.dev/schemas/kfd-2/trust-taxonomy.schema.json#/$defs/residualRisk"
140
+ }
141
+ }
142
+ },
143
+ "additionalProperties": true
144
+ },
145
+ "claimSubject": {
146
+ "type": "object",
147
+ "required": [
148
+ "kind",
149
+ "id"
150
+ ],
151
+ "properties": {
152
+ "kind": {
153
+ "enum": [
154
+ "kfd-standard",
155
+ "contract-world",
156
+ "collaboration-interface",
157
+ "observer-perspective",
158
+ "release",
159
+ "artifact",
160
+ "config",
161
+ "api",
162
+ "abi",
163
+ "gui-surface",
164
+ "runtime-fact",
165
+ "documentation",
166
+ "other"
167
+ ]
168
+ },
169
+ "id": {
170
+ "type": "string",
171
+ "minLength": 1
172
+ },
173
+ "standard": {
174
+ "type": "string",
175
+ "pattern": "^kfd-[1-9][0-9]*$"
176
+ },
177
+ "description": {
178
+ "type": "string",
179
+ "minLength": 1
180
+ }
181
+ },
182
+ "additionalProperties": true
183
+ },
184
+ "evidenceResult": {
185
+ "type": "object",
186
+ "required": [
187
+ "type",
188
+ "result",
189
+ "machineProvability"
190
+ ],
191
+ "properties": {
192
+ "type": {
193
+ "type": "string",
194
+ "minLength": 1
195
+ },
196
+ "result": {
197
+ "enum": [
198
+ "pass",
199
+ "fail",
200
+ "warning",
201
+ "unverifiable"
202
+ ]
203
+ },
204
+ "machineProvability": {
205
+ "$ref": "https://kfd.libkungfu.dev/schemas/kfd-2/trust-taxonomy.schema.json#/$defs/machineProvability"
206
+ },
207
+ "digest": {
208
+ "type": "string",
209
+ "minLength": 1
210
+ },
211
+ "path": {
212
+ "type": "string",
213
+ "minLength": 1
214
+ },
215
+ "description": {
216
+ "type": "string",
217
+ "minLength": 1
218
+ }
219
+ },
220
+ "additionalProperties": true
221
+ },
222
+ "auditBoundary": {
223
+ "type": "object",
224
+ "required": [
225
+ "scope",
226
+ "enumerability"
227
+ ],
228
+ "properties": {
229
+ "scope": {
230
+ "type": "string",
231
+ "minLength": 1
232
+ },
233
+ "enumerability": {
234
+ "enum": [
235
+ "closed-world",
236
+ "declared-open",
237
+ "sampled",
238
+ "manual"
239
+ ]
240
+ }
241
+ },
242
+ "additionalProperties": true
243
+ },
244
+ "responsibilityState": {
245
+ "type": "object",
246
+ "required": [
247
+ "owner",
248
+ "sourceOwner",
249
+ "verificationOwner",
250
+ "decisionOwner"
251
+ ],
252
+ "properties": {
253
+ "owner": {
254
+ "type": "string",
255
+ "minLength": 1
256
+ },
257
+ "sourceOwner": {
258
+ "type": "string",
259
+ "minLength": 1
260
+ },
261
+ "verificationOwner": {
262
+ "type": "string",
263
+ "minLength": 1
264
+ },
265
+ "decisionOwner": {
266
+ "type": "string",
267
+ "minLength": 1
268
+ },
269
+ "escalation": {
270
+ "type": "string",
271
+ "minLength": 1
272
+ }
273
+ },
274
+ "additionalProperties": true
275
+ },
276
+ "projection": {
277
+ "type": "object",
278
+ "required": [
279
+ "kind"
280
+ ],
281
+ "properties": {
282
+ "kind": {
283
+ "enum": [
284
+ "generic",
285
+ "release",
286
+ "package",
287
+ "site",
288
+ "runtime",
289
+ "other"
290
+ ]
291
+ },
292
+ "description": {
293
+ "type": "string",
294
+ "minLength": 1
295
+ }
296
+ },
297
+ "additionalProperties": true
298
+ },
299
+ "schemaEvolution": {
300
+ "type": "object",
301
+ "required": [
302
+ "compatibilityRule"
303
+ ],
304
+ "properties": {
305
+ "compatibilityRule": {
306
+ "type": "string",
307
+ "minLength": 1
308
+ }
309
+ },
310
+ "additionalProperties": true
311
+ }
312
+ }
313
+ }
@@ -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
+ }