@aikdna/kdna-core 0.7.2 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,346 +0,0 @@
1
- {
2
- "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$id": "https://aikdna.com/schema/kdna-manifest-v1rc.json",
4
- "title": "KDNA Domain Manifest (kdna.json)",
5
- "description": "Canonical JSON Schema for the kdna.json manifest inside a .kdna asset internal domain tree or dev source workspace. This is the single source of truth: CLI, Registry, Studio, and compatible loaders MUST validate against this schema.",
6
-
7
- "type": "object",
8
- "required": [
9
- "format",
10
- "format_version",
11
- "spec_version",
12
- "name",
13
- "version",
14
- "judgment_version",
15
- "description",
16
- "author",
17
- "license",
18
- "status",
19
- "quality_badge",
20
- "access",
21
- "languages",
22
- "default_language"
23
- ],
24
- "properties": {
25
-
26
- "format": {
27
- "type": "string",
28
- "const": "kdna",
29
- "description": "KDNA container format marker."
30
- },
31
-
32
- "format_version": {
33
- "type": "string",
34
- "const": "1.0",
35
- "description": "KDNA container manifest format version."
36
- },
37
-
38
- "spec_version": {
39
- "type": "string",
40
- "description": "KDNA SPEC version this asset conforms to. Required.",
41
- "examples": ["1.0-rc"]
42
- },
43
-
44
- "name": {
45
- "type": "string",
46
- "pattern": "^@[a-z][a-z0-9-]*/[a-z][a-z0-9_]*$",
47
- "description": "Scoped domain identifier. Format: @scope/name. scope matches the GitHub org. name uses snake_case.",
48
- "examples": ["@aikdna/writing", "@aikdna/agent_safety"]
49
- },
50
-
51
- "version": {
52
- "type": "string",
53
- "description": "Semantic version (MAJOR.MINOR.PATCH) of the domain asset. Tracks packaging and metadata changes. Independent of judgment_version.",
54
- "examples": ["0.7.2"]
55
- },
56
-
57
- "judgment_version": {
58
- "type": "string",
59
- "description": "Version of the domain's judgment content (axioms, ontology, misunderstandings). MUST be incremented when any judgment-relevant content changes. Uses YYYY.MM format or semver.",
60
- "examples": ["2026.05"]
61
- },
62
-
63
- "domain_id": {
64
- "type": "string",
65
- "pattern": "^[a-z][a-z0-9_]*$",
66
- "description": "Stable semantic domain slug generated by the Studio-compatible authoring pipeline."
67
- },
68
-
69
- "registry_name": {
70
- "type": "string",
71
- "pattern": "^@[a-z][a-z0-9-]*/[a-z][a-z0-9_]*$",
72
- "description": "Scoped registry distribution name for this asset."
73
- },
74
-
75
- "asset_uid": {
76
- "type": "string",
77
- "description": "Unique identifier for this exported .kdna asset instance. uuidv7 is recommended."
78
- },
79
-
80
- "project_uid": {
81
- "type": "string",
82
- "description": "Stable identifier for the Studio project that produced this asset. uuidv7 is recommended."
83
- },
84
-
85
- "build_id": {
86
- "type": "string",
87
- "pattern": "^build_[A-Za-z0-9_.:-]+$",
88
- "description": "Unique identifier for the Studio compile/export run."
89
- },
90
-
91
- "content_digest": {
92
- "type": "string",
93
- "pattern": "^sha256[-:][0-9a-f]{64}$",
94
- "description": "Canonical SHA-256 digest of the internal content tree, excluding self-referential digest and signature fields."
95
- },
96
-
97
- "description": {
98
- "type": "string",
99
- "minLength": 20,
100
- "description": "What judgment this domain improves. One sentence that answers: what does loading this domain change about how an agent thinks?"
101
- },
102
-
103
- "core_insight": {
104
- "type": "string",
105
- "minLength": 10,
106
- "description": "Optional. The single most important cognitive shift this domain creates. Used for display in Compare Mode and registry previews."
107
- },
108
-
109
- "author": {
110
- "type": "object",
111
- "required": ["name", "id"],
112
- "properties": {
113
- "name": { "type": "string", "description": "Author display name." },
114
- "id": { "type": "string", "description": "Author identifier (e.g., GitHub handle or email prefix)." },
115
- "pubkey": {
116
- "type": "string",
117
- "pattern": "^ed25519:[0-9a-f]{64}$",
118
- "description": "Ed25519 public key for signature verification. Required for signed domains."
119
- },
120
- "public_key_pem": {
121
- "type": "string",
122
- "description": "PEM-encoded Ed25519 public key used by verifiers."
123
- }
124
- }
125
- },
126
-
127
- "license": {
128
- "type": "object",
129
- "required": ["type"],
130
- "properties": {
131
- "type": {
132
- "type": "string",
133
- "description": "License identifier. CC-BY-4.0 for open domains, KCL-1.0 for commercial/pro domains.",
134
- "examples": ["CC-BY-4.0", "KCL-1.0", "MIT"]
135
- },
136
- "url": {
137
- "type": "string",
138
- "format": "uri",
139
- "description": "URL to the full license text."
140
- }
141
- }
142
- },
143
-
144
- "status": {
145
- "type": "string",
146
- "enum": ["draft", "experimental", "stable", "deprecated", "staging"],
147
- "description": "Domain maturity level. draft = early work in progress. experimental = complete but not yet proven in practice. stable = structure frozen, content mature. deprecated = superseded by another domain. staging = non-public pre-release (for pro/commercial domains)."
148
- },
149
-
150
- "quality_badge": {
151
- "type": "string",
152
- "enum": ["untested", "tested", "validated", "expert_reviewed", "production_ready"],
153
- "description": "Evidence level for judgment quality. untested = schema validation only. tested = >= 10 eval cases with manual verification. validated = >= 30 eval cases with automated scoring and raw outputs. expert_reviewed = validated evidence plus external domain expert review. production_ready = expert_reviewed evidence plus real-world deployment evidence."
154
- },
155
-
156
- "access": {
157
- "type": "string",
158
- "enum": ["open", "licensed", "runtime"],
159
- "description": "Distribution mode. open = plaintext, freely available. licensed = encrypted, requires local license. runtime = not distributed, server-side API only."
160
- },
161
-
162
- "languages": {
163
- "type": "array",
164
- "items": { "type": "string" },
165
- "description": "All languages this domain supports (ISO 639-1 codes).",
166
- "examples": [["en", "zh-CN"]]
167
- },
168
-
169
- "default_language": {
170
- "type": "string",
171
- "description": "Default language for agent loading when none specified."
172
- },
173
-
174
- "i18n_level": {
175
- "type": "string",
176
- "enum": ["L0", "L1", "L2", "L3"],
177
- "description": "Internationalization maturity. L0 = single language only. L1 = basic translation of axioms. L2 = full bilingual (en + zh-CN minimum). L3 = multi-language with locale-aware content."
178
- },
179
-
180
- "keywords": {
181
- "type": "array",
182
- "items": { "type": "string" },
183
- "description": "Discovery keywords for search and categorization."
184
- },
185
-
186
- "file_count": {
187
- "type": "integer",
188
- "minimum": 2,
189
- "maximum": 6,
190
- "description": "Number of standard KDNA JSON entries in the asset internal tree or dev source workspace (excluding kdna.json). Minimum 2 (Core + Patterns). Maximum 6."
191
- },
192
-
193
- "risk_level": {
194
- "type": "string",
195
- "enum": ["R0", "R1", "R2", "R3"],
196
- "description": "Risk level for the domain. R0 = low risk (writing style, aesthetics). R1 = medium-low (product decisions, management). R2 = medium (safety, finance, legal). R3 = high (security strategy, code execution). Determines load warnings and certification requirements."
197
- },
198
-
199
- "privacy_level": {
200
- "type": "string",
201
- "enum": ["public", "private", "sensitive", "regulated"],
202
- "description": "Privacy classification. Proposed for v1.1; optional in v1.0."
203
- },
204
-
205
- "asset_type": {
206
- "type": "string",
207
- "enum": [
208
- "domain_judgment",
209
- "personal_judgment",
210
- "organization_standard",
211
- "team_policy",
212
- "creator_style",
213
- "risk_guard"
214
- ],
215
- "description": "Judgment asset category. Proposed for v1.1; optional in v1.0."
216
- },
217
-
218
- "fitness_for_purpose": {
219
- "type": "object",
220
- "description": "Applicability boundary for runtime policy and human review.",
221
- "properties": {
222
- "intended_use": { "type": "array", "items": { "type": "string" } },
223
- "not_for": { "type": "array", "items": { "type": "string" } },
224
- "requires_human_review_when": { "type": "array", "items": { "type": "string" } },
225
- "known_failure_modes": { "type": "array", "items": { "type": "string" } }
226
- },
227
- "additionalProperties": false
228
- },
229
-
230
- "authoring": {
231
- "type": "object",
232
- "description": "Studio-compatible authoring provenance. Required for trusted quality claims.",
233
- "required": ["created_by"],
234
- "properties": {
235
- "created_by": {
236
- "type": "string",
237
- "enum": [
238
- "kdna-studio",
239
- "kdna-studio-cli",
240
- "kdna-studio-sdk",
241
- "third-party-studio-compatible",
242
- "manual-dev-source"
243
- ]
244
- },
245
- "authoring_tool": { "type": "string" },
246
- "authoring_tool_version": { "type": "string" },
247
- "compiler": { "type": "string" },
248
- "compiler_version": { "type": "string" },
249
- "asset_uid": { "type": "string" },
250
- "project_uid": { "type": "string" },
251
- "build_id": {
252
- "type": "string",
253
- "pattern": "^build_[A-Za-z0-9_.:-]+$"
254
- },
255
- "domain_id": {
256
- "type": "string",
257
- "pattern": "^[a-z][a-z0-9_]*$"
258
- },
259
- "registry_name": {
260
- "type": "string",
261
- "pattern": "^@[a-z][a-z0-9-]*/[a-z][a-z0-9_]*$"
262
- },
263
- "content_digest": {
264
- "type": "string",
265
- "pattern": "^sha256[-:][0-9a-f]{64}$"
266
- },
267
- "studio_project_digest": {
268
- "type": "string",
269
- "pattern": "^sha256[-:][0-9a-f]{64}$"
270
- },
271
- "human_lock_required": { "type": "boolean" },
272
- "human_lock_count": { "type": "integer", "minimum": 0 },
273
- "ai_assisted": { "type": "boolean" },
274
- "human_confirmed": { "type": "boolean" },
275
- "compiled_at": { "type": "string", "format": "date-time" }
276
- },
277
- "additionalProperties": false
278
- },
279
-
280
- "signature": {
281
- "type": "string",
282
- "pattern": "^ed25519:[0-9a-f]{128}$",
283
- "description": "Ed25519 signature over the canonical payload. Required for domains with quality_badge >= tested."
284
- },
285
-
286
- "created": {
287
- "type": "string",
288
- "format": "date",
289
- "description": "ISO date of first creation."
290
- },
291
-
292
- "updated": {
293
- "type": "string",
294
- "format": "date",
295
- "description": "ISO date of last modification."
296
- },
297
-
298
- "replaced_by": {
299
- "type": "string",
300
- "description": "Required when status is deprecated. The name of the successor domain."
301
- }
302
- },
303
-
304
- "allOf": [
305
- {
306
- "if": { "properties": { "status": { "const": "deprecated" } } },
307
- "then": { "required": ["replaced_by"] }
308
- },
309
- {
310
- "if": {
311
- "properties": {
312
- "quality_badge": { "enum": ["tested", "validated", "expert_reviewed", "production_ready"] }
313
- }
314
- },
315
- "then": {
316
- "required": ["signature", "authoring"],
317
- "properties": {
318
- "author": { "required": ["pubkey"] },
319
- "authoring": {
320
- "required": [
321
- "compiler",
322
- "compiler_version",
323
- "compiled_at",
324
- "human_confirmed",
325
- "human_lock_count"
326
- ],
327
- "properties": {
328
- "created_by": {
329
- "enum": [
330
- "kdna-studio",
331
- "kdna-studio-cli",
332
- "kdna-studio-sdk",
333
- "third-party-studio-compatible"
334
- ]
335
- },
336
- "human_confirmed": { "const": true },
337
- "human_lock_count": { "minimum": 1 }
338
- }
339
- }
340
- }
341
- }
342
- }
343
- ],
344
-
345
- "additionalProperties": false
346
- }