kibi-cli 0.16.1 → 0.17.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.
- package/dist/commands/check.d.ts.map +1 -1
- package/dist/commands/check.js +1 -1
- package/dist/commands/sync/manifest.d.ts +12 -1
- package/dist/commands/sync/manifest.d.ts.map +1 -1
- package/dist/commands/sync/manifest.js +22 -5
- package/dist/commands/sync/persistence.d.ts.map +1 -1
- package/dist/commands/sync/persistence.js +18 -1
- package/dist/extractors/markdown.d.ts +9 -1
- package/dist/extractors/markdown.d.ts.map +1 -1
- package/dist/extractors/markdown.js +12 -0
- package/dist/logic/ir.d.ts +112 -0
- package/dist/logic/ir.d.ts.map +1 -0
- package/dist/logic/ir.js +729 -0
- package/dist/operations/modeling/logic-modeling.d.ts +22 -0
- package/dist/operations/modeling/logic-modeling.d.ts.map +1 -0
- package/dist/operations/modeling/logic-modeling.js +111 -0
- package/dist/operations/modeling/model-requirement.d.ts.map +1 -1
- package/dist/operations/modeling/model-requirement.js +56 -0
- package/dist/operations/modeling/predicate-applyplan.d.ts.map +1 -1
- package/dist/operations/modeling/predicate-applyplan.js +15 -2
- package/dist/operations/modeling/predicate-inference.d.ts.map +1 -1
- package/dist/operations/modeling/predicate-inference.js +17 -2
- package/dist/operations/modeling/predicate-loader.d.ts.map +1 -1
- package/dist/operations/modeling/predicate-loader.js +6 -0
- package/dist/operations/modeling/predicate-ranker.d.ts.map +1 -1
- package/dist/operations/modeling/predicate-ranker.js +40 -2
- package/dist/operations/modeling/predicate-types.d.ts +3 -0
- package/dist/operations/modeling/predicate-types.d.ts.map +1 -1
- package/dist/operations/modeling/requirement-types.d.ts +12 -0
- package/dist/operations/modeling/requirement-types.d.ts.map +1 -1
- package/dist/operations/mutation/relationships.d.ts.map +1 -1
- package/dist/operations/mutation/relationships.js +8 -0
- package/dist/operations/mutation/serialization.d.ts.map +1 -1
- package/dist/operations/mutation/serialization.js +3 -0
- package/dist/operations/mutation/strict-fact.d.ts.map +1 -1
- package/dist/operations/mutation/strict-fact.js +68 -3
- package/dist/operations/semantic-advisor/analysis-receipt.d.ts +2 -2
- package/dist/operations/semantic-advisor/analysis-receipt.d.ts.map +1 -1
- package/dist/operations/semantic-advisor/analysis-receipt.js +23 -15
- package/dist/operations/semantic-advisor/analyze-prose.d.ts +1 -1
- package/dist/operations/semantic-advisor/analyze-prose.d.ts.map +1 -1
- package/dist/operations/semantic-advisor/analyze-prose.js +435 -13
- package/dist/operations/semantic-advisor/observation-plan.d.ts.map +1 -1
- package/dist/operations/semantic-advisor/observation-plan.js +15 -3
- package/dist/operations/semantic-advisor/shared.d.ts +1 -0
- package/dist/operations/semantic-advisor/shared.d.ts.map +1 -1
- package/dist/operations/semantic-advisor/shared.js +1 -1
- package/dist/operations/semantic-advisor/types.d.ts +61 -1
- package/dist/operations/semantic-advisor/types.d.ts.map +1 -1
- package/dist/prolog/codec.d.ts.map +1 -1
- package/dist/prolog/codec.js +11 -1
- package/dist/prolog.d.ts.map +1 -1
- package/dist/prolog.js +7 -2
- package/dist/public/operations/catalog.d.ts +85 -6
- package/dist/public/operations/catalog.d.ts.map +1 -1
- package/dist/public/operations/index.d.ts +1 -0
- package/dist/public/operations/index.d.ts.map +1 -1
- package/dist/public/operations/index.js +1 -0
- package/dist/public/operations/specs/check.d.ts +2 -2
- package/dist/public/operations/specs/check.d.ts.map +1 -1
- package/dist/public/operations/specs/check.js +4 -1
- package/dist/public/operations/specs/modeling.d.ts +16 -0
- package/dist/public/operations/specs/modeling.d.ts.map +1 -1
- package/dist/public/operations/specs/modeling.js +16 -0
- package/dist/public/operations/specs/mutation-schemas.d.ts +37 -2
- package/dist/public/operations/specs/mutation-schemas.d.ts.map +1 -1
- package/dist/public/operations/specs/mutation-schemas.js +27 -0
- package/dist/public/operations/specs/semantic.d.ts +30 -2
- package/dist/public/operations/specs/semantic.d.ts.map +1 -1
- package/dist/public/operations/specs/semantic.js +34 -2
- package/dist/public/operations/specs/upsert.d.ts +37 -2
- package/dist/public/operations/specs/upsert.d.ts.map +1 -1
- package/dist/public/schemas/entity.d.ts.map +1 -1
- package/dist/public/schemas/entity.js +290 -0
- package/dist/public/schemas/relationship.d.ts.map +1 -1
- package/dist/public/schemas/relationship.js +1 -0
- package/dist/public/skills/kibi-usage/SKILL.md +35 -9
- package/dist/public/skills/kibi-usage/resources/fact-lanes.md +11 -1
- package/dist/public/skills/kibi-usage/resources/logic-ir.md +43 -0
- package/dist/public/skills/kibi-usage/resources/operation-access.md +19 -19
- package/dist/public/skills/kibi-usage/resources/ui-requirements.md +96 -0
- package/dist/public/skills/kibi-usage/resources/workflows.md +21 -6
- package/dist/public/symbol-granularity.d.ts +9 -0
- package/dist/public/symbol-granularity.d.ts.map +1 -1
- package/dist/public/symbol-granularity.js +16 -0
- package/dist/schemas/entity.schema.json +306 -3
- package/dist/traceability/staged-diagnostics.d.ts +1 -1
- package/dist/traceability/staged-diagnostics.d.ts.map +1 -1
- package/dist/traceability/staged-diagnostics.js +17 -10
- package/dist/traceability/staged-impact-contract.js +1 -1
- package/dist/traceability/staged-symbols-manifest.d.ts.map +1 -1
- package/dist/traceability/staged-symbols-manifest.js +28 -10
- package/dist/traceability/temp-kb.d.ts.map +1 -1
- package/dist/traceability/temp-kb.js +13 -0
- package/dist/types/relationships.d.ts +1 -1
- package/dist/types/relationships.d.ts.map +1 -1
- package/dist/utils/rule-registry.d.ts.map +1 -1
- package/dist/utils/rule-registry.js +18 -0
- package/dist/utils/schema-version.d.ts +1 -1
- package/dist/utils/schema-version.js +1 -1
- package/package.json +6 -2
- package/src/public/operations/index.ts +1 -0
- package/src/public/operations/specs/check.ts +4 -1
- package/src/public/operations/specs/modeling.ts +20 -0
- package/src/public/operations/specs/mutation-schemas.ts +30 -0
- package/src/public/operations/specs/semantic.ts +41 -2
- package/src/public/schemas/entity.ts +297 -1
- package/src/public/schemas/relationship.ts +1 -0
- package/src/public/skills/kibi-usage/SKILL.md +35 -9
- package/src/public/skills/kibi-usage/resources/fact-lanes.md +11 -1
- package/src/public/skills/kibi-usage/resources/logic-ir.md +43 -0
- package/src/public/skills/kibi-usage/resources/operation-access.md +19 -19
- package/src/public/skills/kibi-usage/resources/ui-requirements.md +96 -0
- package/src/public/skills/kibi-usage/resources/workflows.md +21 -6
- package/src/public/symbol-granularity.ts +25 -0
- package/src/schemas/entity.schema.json +306 -3
- package/src/schemas/relationship.schema.json +1 -0
|
@@ -2,6 +2,209 @@
|
|
|
2
2
|
"$id": "entity.schema.json",
|
|
3
3
|
"title": "Entity",
|
|
4
4
|
"type": "object",
|
|
5
|
+
"$defs": {
|
|
6
|
+
"logicTerm": {
|
|
7
|
+
"oneOf": [
|
|
8
|
+
{
|
|
9
|
+
"type": "object",
|
|
10
|
+
"required": ["kind", "name", "type"],
|
|
11
|
+
"properties": {
|
|
12
|
+
"kind": { "const": "var" },
|
|
13
|
+
"name": { "type": "string", "pattern": "^[A-Z][A-Za-z0-9_]*$" },
|
|
14
|
+
"type": { "type": "string", "pattern": "^[a-z][a-z0-9_:.\\/-]*$" }
|
|
15
|
+
},
|
|
16
|
+
"additionalProperties": false
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"type": "object",
|
|
20
|
+
"required": ["kind", "value"],
|
|
21
|
+
"properties": {
|
|
22
|
+
"kind": { "const": "const" },
|
|
23
|
+
"value": { "type": "string", "minLength": 1 },
|
|
24
|
+
"type": { "type": "string", "pattern": "^[a-z][a-z0-9_:.\\/-]*$" }
|
|
25
|
+
},
|
|
26
|
+
"additionalProperties": false
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"type": "object",
|
|
30
|
+
"required": ["kind", "value"],
|
|
31
|
+
"properties": {
|
|
32
|
+
"kind": { "const": "number" },
|
|
33
|
+
"value": { "type": "number" },
|
|
34
|
+
"unit": { "type": "string", "pattern": "^[a-z][a-z0-9_:.\\/-]*$" }
|
|
35
|
+
},
|
|
36
|
+
"additionalProperties": false
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"type": "object",
|
|
40
|
+
"required": ["kind", "value", "unit"],
|
|
41
|
+
"properties": {
|
|
42
|
+
"kind": { "const": "duration" },
|
|
43
|
+
"value": { "type": "number", "minimum": 0 },
|
|
44
|
+
"unit": {
|
|
45
|
+
"type": "string",
|
|
46
|
+
"enum": ["ms", "s", "m", "h", "d", "w"]
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
"additionalProperties": false
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"type": "object",
|
|
53
|
+
"required": ["kind", "value"],
|
|
54
|
+
"properties": {
|
|
55
|
+
"kind": { "const": "timestamp" },
|
|
56
|
+
"value": { "type": "string" }
|
|
57
|
+
},
|
|
58
|
+
"additionalProperties": false
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"type": "object",
|
|
62
|
+
"required": ["kind", "start", "end"],
|
|
63
|
+
"properties": {
|
|
64
|
+
"kind": { "const": "interval" },
|
|
65
|
+
"start": { "type": "string" },
|
|
66
|
+
"end": { "type": "string" }
|
|
67
|
+
},
|
|
68
|
+
"additionalProperties": false
|
|
69
|
+
}
|
|
70
|
+
]
|
|
71
|
+
},
|
|
72
|
+
"logicAtom": {
|
|
73
|
+
"type": "object",
|
|
74
|
+
"required": ["kind", "name", "args"],
|
|
75
|
+
"properties": {
|
|
76
|
+
"kind": { "const": "atom" },
|
|
77
|
+
"namespace": { "type": "string", "pattern": "^[a-z][a-z0-9_:.\\/-]*$" },
|
|
78
|
+
"name": { "type": "string", "pattern": "^[a-z][a-z0-9_:.\\/-]*$" },
|
|
79
|
+
"args": {
|
|
80
|
+
"type": "array",
|
|
81
|
+
"maxItems": 8,
|
|
82
|
+
"items": { "$ref": "#/$defs/logicTerm" }
|
|
83
|
+
},
|
|
84
|
+
"polarity": { "enum": ["positive", "negative"] },
|
|
85
|
+
"closedWorld": { "type": "boolean" }
|
|
86
|
+
},
|
|
87
|
+
"additionalProperties": false
|
|
88
|
+
},
|
|
89
|
+
"logicExpression": {
|
|
90
|
+
"oneOf": [
|
|
91
|
+
{ "$ref": "#/$defs/logicAtom" },
|
|
92
|
+
{
|
|
93
|
+
"type": "object",
|
|
94
|
+
"required": ["kind", "items"],
|
|
95
|
+
"properties": {
|
|
96
|
+
"kind": { "enum": ["all", "any"] },
|
|
97
|
+
"items": {
|
|
98
|
+
"type": "array",
|
|
99
|
+
"minItems": 1,
|
|
100
|
+
"maxItems": 32,
|
|
101
|
+
"items": { "$ref": "#/$defs/logicExpression" }
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
"additionalProperties": false
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
"type": "object",
|
|
108
|
+
"required": ["kind", "item"],
|
|
109
|
+
"properties": {
|
|
110
|
+
"kind": { "const": "not" },
|
|
111
|
+
"item": { "$ref": "#/$defs/logicAtom" }
|
|
112
|
+
},
|
|
113
|
+
"additionalProperties": false
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
"type": "object",
|
|
117
|
+
"required": ["kind", "operator", "left", "right"],
|
|
118
|
+
"properties": {
|
|
119
|
+
"kind": { "const": "compare" },
|
|
120
|
+
"operator": { "enum": ["eq", "neq", "lt", "lte", "gt", "gte"] },
|
|
121
|
+
"left": { "$ref": "#/$defs/logicTerm" },
|
|
122
|
+
"right": { "$ref": "#/$defs/logicTerm" }
|
|
123
|
+
},
|
|
124
|
+
"additionalProperties": false
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
"type": "object",
|
|
128
|
+
"required": ["kind", "atom", "operator", "value"],
|
|
129
|
+
"properties": {
|
|
130
|
+
"kind": { "const": "count" },
|
|
131
|
+
"atom": { "$ref": "#/$defs/logicAtom" },
|
|
132
|
+
"operator": { "enum": ["eq", "neq", "lt", "lte", "gt", "gte"] },
|
|
133
|
+
"value": { "type": "integer", "minimum": 0 }
|
|
134
|
+
},
|
|
135
|
+
"additionalProperties": false
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
"type": "object",
|
|
139
|
+
"required": ["kind", "relation", "left", "right"],
|
|
140
|
+
"properties": {
|
|
141
|
+
"kind": { "const": "temporal" },
|
|
142
|
+
"relation": {
|
|
143
|
+
"enum": [
|
|
144
|
+
"before",
|
|
145
|
+
"after",
|
|
146
|
+
"during",
|
|
147
|
+
"overlaps",
|
|
148
|
+
"starts",
|
|
149
|
+
"finishes"
|
|
150
|
+
]
|
|
151
|
+
},
|
|
152
|
+
"left": { "$ref": "#/$defs/logicTerm" },
|
|
153
|
+
"right": { "$ref": "#/$defs/logicTerm" }
|
|
154
|
+
},
|
|
155
|
+
"additionalProperties": false
|
|
156
|
+
}
|
|
157
|
+
]
|
|
158
|
+
},
|
|
159
|
+
"logicRule": {
|
|
160
|
+
"type": "object",
|
|
161
|
+
"required": ["version", "kind", "modality"],
|
|
162
|
+
"properties": {
|
|
163
|
+
"version": { "const": "kibi.logic.v1" },
|
|
164
|
+
"kind": { "enum": ["atom", "rule", "constraint"] },
|
|
165
|
+
"modality": {
|
|
166
|
+
"enum": ["assert", "deny", "oblige", "permit", "forbid"]
|
|
167
|
+
},
|
|
168
|
+
"head": { "$ref": "#/$defs/logicAtom" },
|
|
169
|
+
"body": { "$ref": "#/$defs/logicExpression" },
|
|
170
|
+
"variables": {
|
|
171
|
+
"type": "array",
|
|
172
|
+
"maxItems": 32,
|
|
173
|
+
"items": {
|
|
174
|
+
"type": "object",
|
|
175
|
+
"required": ["name", "type"],
|
|
176
|
+
"properties": {
|
|
177
|
+
"name": { "type": "string", "pattern": "^[A-Z][A-Za-z0-9_]*$" },
|
|
178
|
+
"type": {
|
|
179
|
+
"type": "string",
|
|
180
|
+
"pattern": "^[a-z][a-z0-9_:.\\/-]*$"
|
|
181
|
+
},
|
|
182
|
+
"quantifier": { "enum": ["forall", "exists"] }
|
|
183
|
+
},
|
|
184
|
+
"additionalProperties": false
|
|
185
|
+
}
|
|
186
|
+
},
|
|
187
|
+
"exceptions": {
|
|
188
|
+
"type": "array",
|
|
189
|
+
"maxItems": 16,
|
|
190
|
+
"items": { "$ref": "#/$defs/logicExpression" }
|
|
191
|
+
},
|
|
192
|
+
"scope": {
|
|
193
|
+
"type": "object",
|
|
194
|
+
"properties": {
|
|
195
|
+
"authority": { "type": "string" },
|
|
196
|
+
"name": { "type": "string" },
|
|
197
|
+
"tags": { "type": "array", "items": { "type": "string" } }
|
|
198
|
+
},
|
|
199
|
+
"additionalProperties": false
|
|
200
|
+
},
|
|
201
|
+
"validFrom": { "type": "string" },
|
|
202
|
+
"validTo": { "type": "string" },
|
|
203
|
+
"ruleSchemaId": { "type": "string", "minLength": 1 }
|
|
204
|
+
},
|
|
205
|
+
"additionalProperties": false
|
|
206
|
+
}
|
|
207
|
+
},
|
|
5
208
|
"properties": {
|
|
6
209
|
"id": { "type": "string" },
|
|
7
210
|
"title": { "type": "string" },
|
|
@@ -44,6 +247,53 @@
|
|
|
44
247
|
"uniqueItems": true,
|
|
45
248
|
"items": { "type": "string", "pattern": "^CLAIM-[A-F0-9]{16}$" }
|
|
46
249
|
},
|
|
250
|
+
"semantic_inventory": {
|
|
251
|
+
"type": "array",
|
|
252
|
+
"items": {
|
|
253
|
+
"type": "object",
|
|
254
|
+
"required": ["claim_key", "claim_text", "role", "status", "span"],
|
|
255
|
+
"properties": {
|
|
256
|
+
"claim_key": { "type": "string", "pattern": "^CLAIM-[A-F0-9]{16}$" },
|
|
257
|
+
"claim_text": { "type": "string", "minLength": 1 },
|
|
258
|
+
"role": {
|
|
259
|
+
"type": "string",
|
|
260
|
+
"enum": [
|
|
261
|
+
"normative",
|
|
262
|
+
"definition",
|
|
263
|
+
"descriptive",
|
|
264
|
+
"condition",
|
|
265
|
+
"exception",
|
|
266
|
+
"rationale",
|
|
267
|
+
"example",
|
|
268
|
+
"subjective"
|
|
269
|
+
]
|
|
270
|
+
},
|
|
271
|
+
"status": {
|
|
272
|
+
"type": "string",
|
|
273
|
+
"enum": [
|
|
274
|
+
"modeled",
|
|
275
|
+
"ambiguous",
|
|
276
|
+
"ontology_gap",
|
|
277
|
+
"nonlogical",
|
|
278
|
+
"missing"
|
|
279
|
+
]
|
|
280
|
+
},
|
|
281
|
+
"span": {
|
|
282
|
+
"type": "object",
|
|
283
|
+
"required": ["start", "end"],
|
|
284
|
+
"properties": {
|
|
285
|
+
"start": { "type": "integer", "minimum": 0 },
|
|
286
|
+
"end": { "type": "integer", "minimum": 0 }
|
|
287
|
+
},
|
|
288
|
+
"additionalProperties": false
|
|
289
|
+
},
|
|
290
|
+
"semantic_key": { "type": "string" },
|
|
291
|
+
"payload_hash": { "type": "string" },
|
|
292
|
+
"reason": { "type": "string" }
|
|
293
|
+
},
|
|
294
|
+
"additionalProperties": false
|
|
295
|
+
}
|
|
296
|
+
},
|
|
47
297
|
"sourceFile": { "type": "string" },
|
|
48
298
|
"granularity_reason": {
|
|
49
299
|
"type": "string",
|
|
@@ -94,7 +344,9 @@
|
|
|
94
344
|
"observation",
|
|
95
345
|
"meta",
|
|
96
346
|
"predicate_schema",
|
|
97
|
-
"predicate"
|
|
347
|
+
"predicate",
|
|
348
|
+
"rule_schema",
|
|
349
|
+
"rule"
|
|
98
350
|
]
|
|
99
351
|
},
|
|
100
352
|
"subject_key": { "type": "string" },
|
|
@@ -134,7 +386,14 @@
|
|
|
134
386
|
},
|
|
135
387
|
"aliases": { "type": "array", "items": { "type": "string" } },
|
|
136
388
|
"examples": { "type": "array", "items": { "type": "string" } },
|
|
137
|
-
"predicate_args": { "type": "array", "items": { "type": "string" } }
|
|
389
|
+
"predicate_args": { "type": "array", "items": { "type": "string" } },
|
|
390
|
+
"rule_ir": { "$ref": "#/$defs/logicRule" },
|
|
391
|
+
"rule_hash": { "type": "string", "pattern": "^[a-f0-9]{64}$" },
|
|
392
|
+
"rule_schema_id": { "type": "string", "minLength": 1 },
|
|
393
|
+
"rule_name": { "type": "string", "minLength": 1 },
|
|
394
|
+
"semantic_key": { "type": "string", "pattern": "^SEM-[A-F0-9]{24}$" },
|
|
395
|
+
"claim_span_start": { "type": "integer", "minimum": 0 },
|
|
396
|
+
"claim_span_end": { "type": "integer", "minimum": 0 }
|
|
138
397
|
},
|
|
139
398
|
"required": [
|
|
140
399
|
"id",
|
|
@@ -173,6 +432,36 @@
|
|
|
173
432
|
}
|
|
174
433
|
}
|
|
175
434
|
},
|
|
435
|
+
{
|
|
436
|
+
"if": {
|
|
437
|
+
"properties": {
|
|
438
|
+
"type": { "const": "fact" },
|
|
439
|
+
"fact_kind": { "const": "rule_schema" }
|
|
440
|
+
},
|
|
441
|
+
"required": ["type", "fact_kind"]
|
|
442
|
+
},
|
|
443
|
+
"then": {
|
|
444
|
+
"required": ["rule_name", "argument_names", "argument_types"]
|
|
445
|
+
}
|
|
446
|
+
},
|
|
447
|
+
{
|
|
448
|
+
"if": {
|
|
449
|
+
"properties": {
|
|
450
|
+
"type": { "const": "fact" },
|
|
451
|
+
"fact_kind": { "const": "rule" }
|
|
452
|
+
},
|
|
453
|
+
"required": ["type", "fact_kind"]
|
|
454
|
+
},
|
|
455
|
+
"then": {
|
|
456
|
+
"required": [
|
|
457
|
+
"rule_ir",
|
|
458
|
+
"rule_hash",
|
|
459
|
+
"rule_schema_id",
|
|
460
|
+
"rule_name",
|
|
461
|
+
"semantic_key"
|
|
462
|
+
]
|
|
463
|
+
}
|
|
464
|
+
},
|
|
176
465
|
{
|
|
177
466
|
"if": {
|
|
178
467
|
"properties": { "type": { "const": "fact" } }
|
|
@@ -207,11 +496,25 @@
|
|
|
207
496
|
{ "required": ["argument_descriptions"] },
|
|
208
497
|
{ "required": ["aliases"] },
|
|
209
498
|
{ "required": ["examples"] },
|
|
210
|
-
{ "required": ["predicate_args"] }
|
|
499
|
+
{ "required": ["predicate_args"] },
|
|
500
|
+
{ "required": ["rule_ir"] },
|
|
501
|
+
{ "required": ["rule_hash"] },
|
|
502
|
+
{ "required": ["rule_schema_id"] },
|
|
503
|
+
{ "required": ["rule_name"] },
|
|
504
|
+
{ "required": ["semantic_key"] },
|
|
505
|
+
{ "required": ["claim_span_start"] },
|
|
506
|
+
{ "required": ["claim_span_end"] }
|
|
211
507
|
]
|
|
212
508
|
}
|
|
213
509
|
}
|
|
214
510
|
},
|
|
511
|
+
{
|
|
512
|
+
"if": {
|
|
513
|
+
"properties": { "type": { "const": "req" } }
|
|
514
|
+
},
|
|
515
|
+
"then": {},
|
|
516
|
+
"else": { "not": { "required": ["semantic_inventory"] } }
|
|
517
|
+
},
|
|
215
518
|
{
|
|
216
519
|
"if": {
|
|
217
520
|
"properties": {
|
|
@@ -21,5 +21,5 @@ export interface KibiImpactDiagnostic extends QualityDiagnostic {
|
|
|
21
21
|
* files and manifest freshness. It only evaluates explicit predicates recorded in
|
|
22
22
|
* `KibiImpactEvidence`.
|
|
23
23
|
*/
|
|
24
|
-
export declare function collectStagedKibiDiagnostics(evidence: KibiImpactEvidence): KibiImpactDiagnostic[];
|
|
24
|
+
export declare function collectStagedKibiDiagnostics(evidence: KibiImpactEvidence, symbolsManifestPath?: string): KibiImpactDiagnostic[];
|
|
25
25
|
//# sourceMappingURL=staged-diagnostics.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"staged-diagnostics.d.ts","sourceRoot":"","sources":["../../src/traceability/staged-diagnostics.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"staged-diagnostics.d.ts","sourceRoot":"","sources":["../../src/traceability/staged-diagnostics.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AACnE,OAAO,EAGL,KAAK,kBAAkB,EAIxB,MAAM,qBAAqB,CAAC;AAQ7B,MAAM,MAAM,sBAAsB,GAC9B,8BAA8B,GAC9B,wBAAwB,GACxB,8BAA8B,GAC9B,+BAA+B,GAC/B,iCAAiC,GACjC,oCAAoC,GACpC,gCAAgC,GAChC,0BAA0B,GAC1B,2BAA2B,GAC3B,6BAA6B,GAC7B,yBAAyB,GACzB,wCAAwC,CAAC;AAE7C,MAAM,WAAW,oBAAqB,SAAQ,iBAAiB;IAC7D,uDAAuD;IACvD,EAAE,EAAE,sBAAsB,CAAC;IAC3B,QAAQ,EAAE,iBAAiB,CAAC,UAAU,CAAC,CAAC;IACxC,iEAAiE;IACjE,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;IACzB,gDAAgD;IAChD,IAAI,EAAE,SAAS,MAAM,EAAE,CAAC;IACxB,2CAA2C;IAC3C,OAAO,EAAE,MAAM,CAAC;IAChB,0CAA0C;IAC1C,UAAU,EAAE,MAAM,CAAC;CACpB;AAgED;;;;;;GAMG;AACH,wBAAgB,4BAA4B,CAC1C,QAAQ,EAAE,kBAAkB,EAC5B,mBAAmB,GAAE,MAAmC,GACvD,oBAAoB,EAAE,CA8CxB"}
|
|
@@ -1,8 +1,14 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as path from "node:path";
|
|
2
|
+
import { KIBI_STAGED_IMPACT_EVIDENCE_DOC, KIBI_SYMBOLS_MANIFEST_PATH, getBehaviorSourcePaths, getMissingBehaviorSourcePaths, hasOverrideRationale, } from "./evidence-model.js";
|
|
3
|
+
function deriveCoordinatesPath(symbolsManifestPath) {
|
|
4
|
+
return path
|
|
5
|
+
.join(path.dirname(symbolsManifestPath), "symbol-coordinates.yaml")
|
|
6
|
+
.replace(/\\/g, "/");
|
|
7
|
+
}
|
|
2
8
|
function formatFileList(paths) {
|
|
3
9
|
return paths.join(", ");
|
|
4
10
|
}
|
|
5
|
-
function createMissingEvidenceDiagnostic(paths) {
|
|
11
|
+
function createMissingEvidenceDiagnostic(paths, symbolsManifestPath, coordinatesPath) {
|
|
6
12
|
return {
|
|
7
13
|
id: "kibi_impact_evidence_missing",
|
|
8
14
|
severity: "error",
|
|
@@ -11,19 +17,19 @@ function createMissingEvidenceDiagnostic(paths) {
|
|
|
11
17
|
files: [...paths],
|
|
12
18
|
docs: [KIBI_STAGED_IMPACT_EVIDENCE_DOC],
|
|
13
19
|
message: `Behavior-changing staged files are missing staged Kibi impact evidence (see ${KIBI_STAGED_IMPACT_EVIDENCE_DOC}): ${formatFileList(paths)}`,
|
|
14
|
-
suggestion: `Query Kibi via MCP before deciding. MCP writes update KB state but do not stage tracked evidence; also stage requirement/scenario/test/fact/symbol markdown, authored ${
|
|
20
|
+
suggestion: `Query Kibi via MCP before deciding. MCP writes update KB state but do not stage tracked evidence; also stage requirement/scenario/test/fact/symbol markdown, authored ${symbolsManifestPath} metadata, or refreshed ${coordinatesPath}. Re-run kibi check --staged after staging tracked evidence.`,
|
|
15
21
|
};
|
|
16
22
|
}
|
|
17
|
-
function createSymbolsManifestStaleDiagnostic(paths) {
|
|
23
|
+
function createSymbolsManifestStaleDiagnostic(paths, symbolsManifestPath, coordinatesPath) {
|
|
18
24
|
return {
|
|
19
25
|
id: "symbols_manifest_stale",
|
|
20
26
|
severity: "error",
|
|
21
27
|
blocking: true,
|
|
22
28
|
category: "symbol",
|
|
23
|
-
files: [
|
|
29
|
+
files: [coordinatesPath, ...paths],
|
|
24
30
|
docs: [KIBI_STAGED_IMPACT_EVIDENCE_DOC],
|
|
25
|
-
message: `${
|
|
26
|
-
suggestion: `Run kibi sync --refresh-symbol-coordinates && git add ${
|
|
31
|
+
message: `${coordinatesPath} is stale or missing for staged source files: ${formatFileList(paths)}`,
|
|
32
|
+
suggestion: `Run kibi sync --refresh-symbol-coordinates && git add ${coordinatesPath} ${symbolsManifestPath}, then re-run kibi check --staged.`,
|
|
27
33
|
};
|
|
28
34
|
}
|
|
29
35
|
function createMissingOverrideRationaleDiagnostic(evidence) {
|
|
@@ -49,8 +55,9 @@ function createMissingOverrideRationaleDiagnostic(evidence) {
|
|
|
49
55
|
* files and manifest freshness. It only evaluates explicit predicates recorded in
|
|
50
56
|
* `KibiImpactEvidence`.
|
|
51
57
|
*/
|
|
52
|
-
export function collectStagedKibiDiagnostics(evidence) {
|
|
58
|
+
export function collectStagedKibiDiagnostics(evidence, symbolsManifestPath = KIBI_SYMBOLS_MANIFEST_PATH) {
|
|
53
59
|
const diagnostics = [];
|
|
60
|
+
const coordinatesPath = evidence.symbolsManifest.path || deriveCoordinatesPath(symbolsManifestPath);
|
|
54
61
|
if (evidence.mode.kind === "no_impact_override" &&
|
|
55
62
|
!hasOverrideRationale(evidence)) {
|
|
56
63
|
diagnostics.push(createMissingOverrideRationaleDiagnostic(evidence));
|
|
@@ -58,11 +65,11 @@ export function collectStagedKibiDiagnostics(evidence) {
|
|
|
58
65
|
if ((evidence.symbolsManifest.state === "stale" ||
|
|
59
66
|
evidence.symbolsManifest.state === "missing") &&
|
|
60
67
|
evidence.symbolsManifest.sourcePaths.length > 0) {
|
|
61
|
-
diagnostics.push(createSymbolsManifestStaleDiagnostic([...evidence.symbolsManifest.sourcePaths].sort()));
|
|
68
|
+
diagnostics.push(createSymbolsManifestStaleDiagnostic([...evidence.symbolsManifest.sourcePaths].sort(), symbolsManifestPath, coordinatesPath));
|
|
62
69
|
}
|
|
63
70
|
const missingBehaviorPaths = getMissingBehaviorSourcePaths(evidence);
|
|
64
71
|
if (missingBehaviorPaths.length > 0) {
|
|
65
|
-
diagnostics.push(createMissingEvidenceDiagnostic(missingBehaviorPaths));
|
|
72
|
+
diagnostics.push(createMissingEvidenceDiagnostic(missingBehaviorPaths, symbolsManifestPath, coordinatesPath));
|
|
66
73
|
}
|
|
67
74
|
if (evidence.mode.kind === "no_impact_override" &&
|
|
68
75
|
evidence.mode.override.sourcePaths.length === 0 &&
|
|
@@ -48,7 +48,7 @@ export const KIBI_IMPACT_DIAGNOSTICS = {
|
|
|
48
48
|
id: "kibi_impact_evidence_missing",
|
|
49
49
|
title: "Behavior edit requires staged Kibi impact evidence",
|
|
50
50
|
resolution: [
|
|
51
|
-
"Query Kibi via MCP
|
|
51
|
+
"Query Kibi via visible MCP tools or the trusted project-local CLI (peer surfaces): use kb_search for discovery, then kb_query for exact follow-up.",
|
|
52
52
|
"MCP writes update KB state but do not stage tracked evidence; also stage related KB entity markdown, authored documentation/symbols.yaml metadata, or refreshed documentation/symbol-coordinates.yaml.",
|
|
53
53
|
"Re-run or let the hook run kibi check --staged.",
|
|
54
54
|
],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"staged-symbols-manifest.d.ts","sourceRoot":"","sources":["../../src/traceability/staged-symbols-manifest.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"staged-symbols-manifest.d.ts","sourceRoot":"","sources":["../../src/traceability/staged-symbols-manifest.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AA0ClD,MAAM,WAAW,+BAA+B;IAC9C,KAAK,EAAE,OAAO,GAAG,OAAO,GAAG,SAAS,GAAG,cAAc,CAAC;IACtD,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,qCAAqC;IACpD,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,KAAK,CAAC;QAAE,UAAU,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,EAAE,CAAA;KAAE,CAAC,CAAC;IAC5D,gBAAgB,EAAE,MAAM,EAAE,CAAC;CAC5B;AAkTD,wBAAgB,2BAA2B,CAAC,OAAO,EAAE;IACnD,mBAAmB,EAAE,MAAM,CAAC;IAC5B,WAAW,EAAE,UAAU,EAAE,CAAC;IAC1B,WAAW,EAAE,UAAU,EAAE,CAAC;CAC3B,GAAG,+BAA+B,CAgGlC;AAED,wBAAgB,4CAA4C,CAAC,OAAO,EAAE;IACpE,WAAW,EAAE,UAAU,EAAE,CAAC;IAC1B,WAAW,EAAE,UAAU,EAAE,CAAC;CAC3B,GAAG,qCAAqC,CAmExC"}
|
|
@@ -3,7 +3,18 @@ import * as path from "node:path";
|
|
|
3
3
|
import { extractManifestSymbolRecordsString, } from "../extractors/manifest.js";
|
|
4
4
|
import { mergeCoordinatesWithManifest, readCoordinateArtifact, } from "../extractors/symbol-coordinates.js";
|
|
5
5
|
import { analyzeSourceText } from "../extractors/symbols-coordinator.js";
|
|
6
|
+
import { isCoarseGranularityReason } from "../public/symbol-granularity.js";
|
|
6
7
|
import { resolveSymbolsManifestPaths } from "../utils/manifest-paths.js";
|
|
8
|
+
/**
|
|
9
|
+
* True when a manifest record documents coarse file/module-level coverage using
|
|
10
|
+
* a canonical granularity reason that legitimately carries no generated
|
|
11
|
+
* per-symbol coordinates. Such records do not participate in coordinate
|
|
12
|
+
* freshness comparison. `legacy-link` records remain coordinate-bearing, and
|
|
13
|
+
* unknown or malformed reasons cannot bypass freshness checks.
|
|
14
|
+
*/
|
|
15
|
+
function isDocumentedCoarseRecord(record) {
|
|
16
|
+
return isCoarseGranularityReason(record.granularity_reason);
|
|
17
|
+
}
|
|
7
18
|
function toRepoRelativePath(absoluteOrRelativePath) {
|
|
8
19
|
if (!path.isAbsolute(absoluteOrRelativePath)) {
|
|
9
20
|
return absoluteOrRelativePath.replace(/\\/g, "/");
|
|
@@ -97,15 +108,10 @@ function normalizeRelationships(relationships) {
|
|
|
97
108
|
})
|
|
98
109
|
.sort((left, right) => JSON.stringify(left).localeCompare(JSON.stringify(right)));
|
|
99
110
|
}
|
|
100
|
-
function normalizeManifestSymbolsForSourceFile(records, sourceFile
|
|
111
|
+
function normalizeManifestSymbolsForSourceFile(records, sourceFile) {
|
|
101
112
|
return records
|
|
102
113
|
.filter((record) => {
|
|
103
|
-
|
|
104
|
-
const isDocumentedModuleSymbol = typeof record.granularity_reason === "string" &&
|
|
105
|
-
record.granularity_reason.length > 0;
|
|
106
|
-
if (title !== null &&
|
|
107
|
-
isDocumentedModuleSymbol &&
|
|
108
|
-
!expectedTitles.has(title)) {
|
|
114
|
+
if (isDocumentedCoarseRecord(record)) {
|
|
109
115
|
return false;
|
|
110
116
|
}
|
|
111
117
|
const recordSource = typeof record.sourceFile === "string"
|
|
@@ -234,9 +240,21 @@ export function assessStagedSymbolsManifest(options) {
|
|
|
234
240
|
const requiredRefreshPaths = [];
|
|
235
241
|
const freshPaths = new Set();
|
|
236
242
|
for (const sourceFile of sourceFiles) {
|
|
243
|
+
const manifestRecordsForFile = (stagedManifestRecords ?? []).filter((record) => {
|
|
244
|
+
const recordSource = typeof record.sourceFile === "string"
|
|
245
|
+
? record.sourceFile
|
|
246
|
+
: typeof record.source === "string"
|
|
247
|
+
? record.source
|
|
248
|
+
: null;
|
|
249
|
+
return recordSource === sourceFile.path;
|
|
250
|
+
});
|
|
251
|
+
const coarseCovered = manifestRecordsForFile.length > 0 &&
|
|
252
|
+
manifestRecordsForFile.every(isDocumentedCoarseRecord);
|
|
253
|
+
if (coarseCovered) {
|
|
254
|
+
continue;
|
|
255
|
+
}
|
|
237
256
|
const expectedSymbols = normalizeExpectedSymbolsForStagedFile(sourceFile);
|
|
238
|
-
const
|
|
239
|
-
const baselineSymbols = normalizeManifestSymbolsForSourceFile(baselineMergedRecords, sourceFile.path, expectedTitles);
|
|
257
|
+
const baselineSymbols = normalizeManifestSymbolsForSourceFile(baselineMergedRecords, sourceFile.path);
|
|
240
258
|
if (signaturesEqual(expectedSymbols, baselineSymbols)) {
|
|
241
259
|
continue;
|
|
242
260
|
}
|
|
@@ -244,7 +262,7 @@ export function assessStagedSymbolsManifest(options) {
|
|
|
244
262
|
if (!stagedCoordinatesFile || stagedCoordinateArtifact === null) {
|
|
245
263
|
continue;
|
|
246
264
|
}
|
|
247
|
-
const stagedSymbols = normalizeManifestSymbolsForSourceFile(stagedMergedRecords, sourceFile.path
|
|
265
|
+
const stagedSymbols = normalizeManifestSymbolsForSourceFile(stagedMergedRecords, sourceFile.path);
|
|
248
266
|
if (signaturesEqual(expectedSymbols, stagedSymbols)) {
|
|
249
267
|
freshPaths.add(sourceFile.path);
|
|
250
268
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"temp-kb.d.ts","sourceRoot":"","sources":["../../src/traceability/temp-kb.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAGV,gBAAgB,EACjB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAE7C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAExD,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,aAAa,CAAC;CACvB;AAMD;;;GAGG;AACH,wBAAgB,gBAAgB,IAAI,IAAI,CASvC;AAOD;;;GAGG;AACH,wBAAgB,iBAAiB,CAE/B,OAAO,EAAE,CAAC,IAAI,EAAE;IAAE,OAAO,EAAE,MAAM,CAAA;CAAE,KAAK,aAAa,GACpD,IAAI,CAEN;
|
|
1
|
+
{"version":3,"file":"temp-kb.d.ts","sourceRoot":"","sources":["../../src/traceability/temp-kb.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAGV,gBAAgB,EACjB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAE7C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAExD,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,aAAa,CAAC;CACvB;AAMD;;;GAGG;AACH,wBAAgB,gBAAgB,IAAI,IAAI,CASvC;AAOD;;;GAGG;AACH,wBAAgB,iBAAiB,CAE/B,OAAO,EAAE,CAAC,IAAI,EAAE;IAAE,OAAO,EAAE,MAAM,CAAA;CAAE,KAAK,aAAa,GACpD,IAAI,CAEN;AAuMD,iBAAe,cAAc,CAAC,GAAG,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC,CAgB/D;AAED,OAAO,EAAE,cAAc,EAAE,CAAC;AAG1B,wBAAsB,qBAAqB,CACzC,MAAM,EAAE,aAAa,EACrB,OAAO,EAAE,gBAAgB,EAAE,GAC1B,OAAO,CAAC,IAAI,CAAC,CA2Bf;AAED,wBAAsB,YAAY,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC,CA6C7E;AAGD,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,eAAe,EAAE,GAAG,MAAM,CAkBrE;AAED,wBAAsB,aAAa,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CA2BlE"}
|
|
@@ -54,11 +54,17 @@ const FACT_STRING_FIELDS = new Set([
|
|
|
54
54
|
"claim_text",
|
|
55
55
|
"predicate_name",
|
|
56
56
|
"predicate_namespace",
|
|
57
|
+
"rule_hash",
|
|
58
|
+
"rule_schema_id",
|
|
59
|
+
"rule_name",
|
|
60
|
+
"semantic_key",
|
|
57
61
|
]);
|
|
58
62
|
const FACT_NUMBER_FIELDS = new Set([
|
|
59
63
|
"value_int",
|
|
60
64
|
"value_number",
|
|
61
65
|
"predicate_arity",
|
|
66
|
+
"claim_span_start",
|
|
67
|
+
"claim_span_end",
|
|
62
68
|
]);
|
|
63
69
|
const FACT_BOOLEAN_FIELDS = new Set(["value_bool", "closed_world"]);
|
|
64
70
|
const FACT_STRING_ARRAY_FIELDS = new Set([
|
|
@@ -94,6 +100,10 @@ function serializeTypedFactFields(entity) {
|
|
|
94
100
|
fields.push(`${field}=${toPrologString(String(value))}`);
|
|
95
101
|
}
|
|
96
102
|
}
|
|
103
|
+
const ruleIr = getEntityField(entity, "rule_ir");
|
|
104
|
+
if (ruleIr !== undefined && ruleIr !== null) {
|
|
105
|
+
fields.push(`rule_ir=${toPrologString(JSON.stringify(ruleIr))}`);
|
|
106
|
+
}
|
|
97
107
|
for (const field of FACT_ATOM_FIELDS) {
|
|
98
108
|
const value = getEntityField(entity, field);
|
|
99
109
|
if (value !== undefined && value !== null) {
|
|
@@ -146,6 +156,9 @@ function buildEntityAssertionGoal(entity) {
|
|
|
146
156
|
if (entity.type === "req" && entity.logic_claims) {
|
|
147
157
|
props.push(`logic_claims=[${entity.logic_claims.map(toPrologAtom).join(",")}]`);
|
|
148
158
|
}
|
|
159
|
+
if (entity.type === "req" && entity.semantic_inventory) {
|
|
160
|
+
props.push(`semantic_inventory=${toPrologString(JSON.stringify(entity.semantic_inventory))}`);
|
|
161
|
+
}
|
|
149
162
|
if (entity.type === "fact") {
|
|
150
163
|
props.push(...serializeTypedFactFields(entity));
|
|
151
164
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export interface BaseRelationship {
|
|
2
|
-
type: "depends_on" | "specified_by" | "verified_by" | "validates" | "implements" | "covered_by" | "executable_for" | "constrained_by" | "constrains" | "requires_property" | "requires_predicate" | "guards" | "publishes" | "consumes" | "supersedes" | "relates_to";
|
|
2
|
+
type: "depends_on" | "specified_by" | "verified_by" | "validates" | "implements" | "covered_by" | "executable_for" | "constrained_by" | "constrains" | "requires_property" | "requires_predicate" | "requires_rule" | "guards" | "publishes" | "consumes" | "supersedes" | "relates_to";
|
|
3
3
|
from: string;
|
|
4
4
|
to: string;
|
|
5
5
|
created_at?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"relationships.d.ts","sourceRoot":"","sources":["../../src/types/relationships.ts"],"names":[],"mappings":"AAkBA,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EACA,YAAY,GACZ,cAAc,GACd,aAAa,GACb,WAAW,GACX,YAAY,GACZ,YAAY,GACZ,gBAAgB,GAChB,gBAAgB,GAChB,YAAY,GACZ,mBAAmB,GACnB,oBAAoB,GACpB,QAAQ,GACR,WAAW,GACX,UAAU,GACV,YAAY,GACZ,YAAY,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,eAAe,gBAAgB,CAAC"}
|
|
1
|
+
{"version":3,"file":"relationships.d.ts","sourceRoot":"","sources":["../../src/types/relationships.ts"],"names":[],"mappings":"AAkBA,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EACA,YAAY,GACZ,cAAc,GACd,aAAa,GACb,WAAW,GACX,YAAY,GACZ,YAAY,GACZ,gBAAgB,GAChB,gBAAgB,GAChB,YAAY,GACZ,mBAAmB,GACnB,oBAAoB,GACpB,eAAe,GACf,QAAQ,GACR,WAAW,GACX,UAAU,GACV,YAAY,GACZ,YAAY,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,eAAe,gBAAgB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rule-registry.d.ts","sourceRoot":"","sources":["../../src/utils/rule-registry.ts"],"names":[],"mappings":"AAkBA;;;GAGG;AAEH,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE,OAAO,CAAC;IACxB,QAAQ,EAAE,UAAU,GAAG,WAAW,GAAG,WAAW,GAAG,cAAc,CAAC;CACnE;AAED,MAAM,WAAW,yBAAyB;IACxC,UAAU,EAAE,OAAO,CAAC;CACrB;AAED,mCAAmC;AACnC,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC/B,kBAAkB,EAAE,yBAAyB,CAAC;CAC/C;AAED;;;GAGG;AACH,eAAO,MAAM,KAAK,EAAE,SAAS,cAAc,
|
|
1
|
+
{"version":3,"file":"rule-registry.d.ts","sourceRoot":"","sources":["../../src/utils/rule-registry.ts"],"names":[],"mappings":"AAkBA;;;GAGG;AAEH,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE,OAAO,CAAC;IACxB,QAAQ,EAAE,UAAU,GAAG,WAAW,GAAG,WAAW,GAAG,cAAc,CAAC;CACnE;AAED,MAAM,WAAW,yBAAyB;IACxC,UAAU,EAAE,OAAO,CAAC;CACrB;AAED,mCAAmC;AACnC,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC/B,kBAAkB,EAAE,yBAAyB,CAAC;CAC/C;AAED;;;GAGG;AACH,eAAO,MAAM,KAAK,EAAE,SAAS,cAAc,EAsHjC,CAAC;AAEX;;GAEG;AACH,eAAO,MAAM,UAAU,aAAoC,CAAC;AAE5D;;GAEG;AACH,eAAO,MAAM,qBAAqB,EAAE,YAKnC,CAAC;AAEF;;;;;GAKG;AAEH,wBAAgB,iBAAiB,CAC/B,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACrC,QAAQ,CAAC,EAAE,MAAM,GAChB,GAAG,CAAC,MAAM,CAAC,CAsBb;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAK5D;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAC/B,OAAO,CAAC,EAAE,OAAO,CAAC,YAAY,CAAC,GAC9B,YAAY,CAWd"}
|
|
@@ -99,6 +99,24 @@ export const RULES = [
|
|
|
99
99
|
defaultEnabled: true,
|
|
100
100
|
category: "integrity",
|
|
101
101
|
},
|
|
102
|
+
{
|
|
103
|
+
name: "rule-safety",
|
|
104
|
+
description: "Stored Logic IR rules use only the typed, bounded, stratified vocabulary",
|
|
105
|
+
defaultEnabled: true,
|
|
106
|
+
category: "integrity",
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
name: "rule-verifiability",
|
|
110
|
+
description: "Requirement rule links resolve to safe rules and registered rule schemas",
|
|
111
|
+
defaultEnabled: true,
|
|
112
|
+
category: "integrity",
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
name: "semantic-completeness",
|
|
116
|
+
description: "Every inventoried assertive proposition is modeled or explicitly classified",
|
|
117
|
+
defaultEnabled: false,
|
|
118
|
+
category: "integrity",
|
|
119
|
+
},
|
|
102
120
|
{
|
|
103
121
|
name: "query-plan-safety",
|
|
104
122
|
description: "Detect Prolog validation clauses that place negation before generator calls",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { KbConfig } from "./config.js";
|
|
2
|
-
export declare const LATEST_KB_SCHEMA_VERSION =
|
|
2
|
+
export declare const LATEST_KB_SCHEMA_VERSION = 4;
|
|
3
3
|
export interface SchemaVersionStatus {
|
|
4
4
|
status: "missing" | "invalid" | "older" | "current" | "newer";
|
|
5
5
|
currentVersion: number | null;
|