@aikdna/kdna-core 0.3.0 → 0.5.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.
@@ -0,0 +1,342 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "title": "KDNA_Patterns",
4
+ "type": "object",
5
+ "required": [
6
+ "meta",
7
+ "terminology",
8
+ "misunderstandings",
9
+ "self_check"
10
+ ],
11
+ "properties": {
12
+ "meta": {
13
+ "type": "object",
14
+ "required": [
15
+ "version",
16
+ "domain",
17
+ "created",
18
+ "purpose",
19
+ "load_condition"
20
+ ],
21
+ "properties": {
22
+ "version": {
23
+ "type": "string"
24
+ },
25
+ "domain": {
26
+ "type": "string",
27
+ "pattern": "^[a-z][a-z0-9_]*$"
28
+ },
29
+ "created": {
30
+ "type": "string"
31
+ },
32
+ "purpose": {
33
+ "type": "string"
34
+ },
35
+ "load_condition": {
36
+ "type": "string"
37
+ }
38
+ },
39
+ "additionalProperties": true
40
+ },
41
+ "terminology": {
42
+ "type": "object",
43
+ "minProperties": 1,
44
+ "properties": {
45
+ "standard_terms": {
46
+ "type": "array",
47
+ "items": {
48
+ "type": "object",
49
+ "required": [
50
+ "term",
51
+ "definition"
52
+ ],
53
+ "properties": {
54
+ "term": {
55
+ "type": "string"
56
+ },
57
+ "definition": {
58
+ "type": "string"
59
+ },
60
+ "applies_when": {
61
+ "type": "array",
62
+ "items": {
63
+ "type": "string"
64
+ }
65
+ },
66
+ "does_not_apply_when": {
67
+ "type": "array",
68
+ "items": {
69
+ "type": "string"
70
+ }
71
+ }
72
+ },
73
+ "additionalProperties": true
74
+ }
75
+ },
76
+ "preferred_terms": {
77
+ "type": "array",
78
+ "items": {
79
+ "type": "object",
80
+ "required": [
81
+ "term",
82
+ "definition"
83
+ ],
84
+ "properties": {
85
+ "term": {
86
+ "type": "string"
87
+ },
88
+ "definition": {
89
+ "type": "string"
90
+ },
91
+ "applies_when": {
92
+ "type": "array",
93
+ "items": {
94
+ "type": "string"
95
+ }
96
+ },
97
+ "does_not_apply_when": {
98
+ "type": "array",
99
+ "items": {
100
+ "type": "string"
101
+ }
102
+ }
103
+ },
104
+ "additionalProperties": true
105
+ }
106
+ },
107
+ "banned_terms": {
108
+ "type": "array",
109
+ "items": {
110
+ "type": "object",
111
+ "required": [
112
+ "term",
113
+ "why",
114
+ "replace_with"
115
+ ],
116
+ "properties": {
117
+ "term": {
118
+ "type": "string"
119
+ },
120
+ "why": {
121
+ "type": "string"
122
+ },
123
+ "replace_with": {
124
+ "type": "string"
125
+ },
126
+ "applies_when": {
127
+ "type": "array",
128
+ "items": {
129
+ "type": "string"
130
+ }
131
+ },
132
+ "does_not_apply_when": {
133
+ "type": "array",
134
+ "items": {
135
+ "type": "string"
136
+ }
137
+ }
138
+ },
139
+ "additionalProperties": true
140
+ }
141
+ }
142
+ },
143
+ "additionalProperties": true
144
+ },
145
+ "aesthetic_preferences": {
146
+ "type": "array",
147
+ "items": {
148
+ "type": "object",
149
+ "required": [
150
+ "prefer",
151
+ "avoid"
152
+ ],
153
+ "properties": {
154
+ "prefer": {
155
+ "type": "string"
156
+ },
157
+ "avoid": {
158
+ "type": "string"
159
+ },
160
+ "signals_good": {
161
+ "type": "array",
162
+ "items": { "type": "string" }
163
+ },
164
+ "signals_bad": {
165
+ "type": "array",
166
+ "items": { "type": "string" }
167
+ }
168
+ },
169
+ "additionalProperties": true
170
+ }
171
+ },
172
+ "boundaries": {
173
+ "type": "array",
174
+ "items": {
175
+ "type": "object",
176
+ "required": [
177
+ "rule",
178
+ "why"
179
+ ],
180
+ "properties": {
181
+ "rule": {
182
+ "type": "string"
183
+ },
184
+ "why": {
185
+ "type": "string"
186
+ },
187
+ "must_not_do": {
188
+ "type": "array",
189
+ "items": { "type": "string" }
190
+ },
191
+ "acceptable_exception": {
192
+ "type": "array",
193
+ "items": { "type": "string" }
194
+ }
195
+ },
196
+ "additionalProperties": true
197
+ }
198
+ },
199
+ "risk_model": {
200
+ "type": "object",
201
+ "properties": {
202
+ "highest_risk_errors": {
203
+ "type": "array",
204
+ "items": {
205
+ "type": "string"
206
+ }
207
+ },
208
+ "acceptable_errors": {
209
+ "type": "array",
210
+ "items": {
211
+ "type": "string"
212
+ }
213
+ },
214
+ "must_block_when": {
215
+ "type": "array",
216
+ "items": { "type": "string" }
217
+ },
218
+ "warn_when": {
219
+ "type": "array",
220
+ "items": { "type": "string" }
221
+ }
222
+ },
223
+ "additionalProperties": true
224
+ },
225
+ "misunderstandings": {
226
+ "type": "array",
227
+ "items": {
228
+ "type": "object",
229
+ "required": [
230
+ "id",
231
+ "wrong",
232
+ "correct",
233
+ "key_distinction",
234
+ "why",
235
+ "applies_when",
236
+ "does_not_apply_when",
237
+ "failure_risk",
238
+ "confidence"
239
+ ],
240
+ "properties": {
241
+ "id": {
242
+ "type": "string"
243
+ },
244
+ "wrong": {
245
+ "type": "string"
246
+ },
247
+ "correct": {
248
+ "type": "string"
249
+ },
250
+ "key_distinction": {
251
+ "type": "string"
252
+ },
253
+ "why": {
254
+ "type": "string"
255
+ },
256
+ "confidence": {
257
+ "type": "string"
258
+ },
259
+ "evidence_type": {
260
+ "type": "array",
261
+ "items": {
262
+ "type": "string"
263
+ }
264
+ },
265
+ "applies_when": {
266
+ "type": "array",
267
+ "items": {
268
+ "type": "string"
269
+ }
270
+ },
271
+ "does_not_apply_when": {
272
+ "type": "array",
273
+ "items": {
274
+ "type": "string"
275
+ }
276
+ },
277
+ "failure_risk": {
278
+ "type": "string"
279
+ }
280
+ },
281
+ "additionalProperties": true
282
+ }
283
+ },
284
+ "self_check": {
285
+ "type": "array",
286
+ "items": {
287
+ "anyOf": [
288
+ {
289
+ "type": "string"
290
+ },
291
+ {
292
+ "type": "object",
293
+ "required": [
294
+ "question"
295
+ ],
296
+ "properties": {
297
+ "question": {
298
+ "type": "string"
299
+ },
300
+ "applies_when": {
301
+ "type": "array",
302
+ "items": {
303
+ "type": "string"
304
+ }
305
+ }
306
+ },
307
+ "additionalProperties": true
308
+ }
309
+ ]
310
+ }
311
+ },
312
+ "counterexamples": {
313
+ "type": "array",
314
+ "items": {
315
+ "type": "object",
316
+ "required": [
317
+ "bad_example",
318
+ "why_bad"
319
+ ],
320
+ "properties": {
321
+ "bad_example": {
322
+ "type": "string"
323
+ },
324
+ "why_bad": {
325
+ "type": "string"
326
+ },
327
+ "violated_axioms": {
328
+ "type": "array",
329
+ "items": {
330
+ "type": "string"
331
+ }
332
+ },
333
+ "better_direction": {
334
+ "type": "string"
335
+ }
336
+ },
337
+ "additionalProperties": true
338
+ }
339
+ }
340
+ },
341
+ "additionalProperties": true
342
+ }
@@ -32,6 +32,7 @@
32
32
  }
33
33
  },
34
34
  "scenes": {
35
+ "description": "Deprecated since v1.0-rc. Use scenarios (canonical) instead. Kept for backward compatibility.",
35
36
  "type": "array",
36
37
  "items": {
37
38
  "type": "object",
@@ -41,7 +42,7 @@
41
42
  "name": { "type": "string" },
42
43
  "trigger_signal": {
43
44
  "type": "string",
44
- "description": "Deprecated: use trigger_signals (array) instead. Kept for backward compatibility."
45
+ "description": "Deprecated since v1.0-rc. Use trigger_signals (array) instead. Kept for backward compatibility."
45
46
  },
46
47
  "trigger_signals": {
47
48
  "type": "array",
@@ -0,0 +1,101 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "title": "KDNA_Scenarios (Strict)",
4
+ "type": "object",
5
+ "required": ["meta", "scenarios"],
6
+ "properties": {
7
+ "meta": {
8
+ "type": "object",
9
+ "required": [
10
+ "version",
11
+ "domain",
12
+ "created",
13
+ "purpose",
14
+ "load_condition"
15
+ ],
16
+ "properties": {
17
+ "version": { "type": "string" },
18
+ "domain": {
19
+ "type": "string",
20
+ "pattern": "^[a-z][a-z0-9_]*$"
21
+ },
22
+ "created": { "type": "string" },
23
+ "purpose": { "type": "string" },
24
+ "load_condition": { "type": "string" }
25
+ },
26
+ "additionalProperties": true
27
+ },
28
+ "scenarios": {
29
+ "type": "array",
30
+ "items": {
31
+ "type": "object",
32
+ "required": ["id", "name", "trigger_signals"],
33
+ "properties": {
34
+ "id": { "type": "string" },
35
+ "name": { "type": "string" },
36
+ "trigger_signals": {
37
+ "type": "array",
38
+ "items": { "type": "string" },
39
+ "description": "Signals that trigger this scenario."
40
+ },
41
+ "negative_signals": {
42
+ "type": "array",
43
+ "items": { "type": "string" },
44
+ "description": "Signals that explicitly exclude this scenario."
45
+ },
46
+ "classification_rule": {
47
+ "type": "string",
48
+ "description": "Rule for classifying input into this scenario."
49
+ },
50
+ "risk_level": {
51
+ "type": "string",
52
+ "description": "Risk level associated with this scenario."
53
+ },
54
+ "expected_judgment_shift": {
55
+ "type": "string",
56
+ "description": "How judgment should shift when this scenario is detected."
57
+ },
58
+ "sub_scenarios": {
59
+ "type": "array",
60
+ "items": {
61
+ "type": "object",
62
+ "required": ["id", "trap_belief", "action_template", "expected_result"],
63
+ "properties": {
64
+ "id": { "type": "string" },
65
+ "trap_belief": { "type": "string" },
66
+ "three_questions": {
67
+ "type": "object",
68
+ "required": ["belief", "state", "need"],
69
+ "properties": {
70
+ "belief": { "type": "string" },
71
+ "state": { "type": "string" },
72
+ "need": { "type": "string" }
73
+ }
74
+ },
75
+ "action_template": {
76
+ "type": "array",
77
+ "items": { "type": "string" }
78
+ },
79
+ "replace": {
80
+ "type": "array",
81
+ "items": {
82
+ "type": "object",
83
+ "required": ["avoid", "use"],
84
+ "properties": {
85
+ "avoid": { "type": "string" },
86
+ "use": { "type": "string" }
87
+ }
88
+ }
89
+ },
90
+ "expected_result": { "type": "string" }
91
+ },
92
+ "additionalProperties": true
93
+ }
94
+ }
95
+ },
96
+ "additionalProperties": true
97
+ }
98
+ }
99
+ },
100
+ "additionalProperties": false
101
+ }