kibi-core 0.22.5 → 0.24.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.
@@ -67,6 +67,10 @@ known_rule('supersedes-reason-missing').
67
67
  known_rule('supersedes-reason-acknowledged').
68
68
  known_rule('policy-ownership').
69
69
  known_rule('policy-markers').
70
+ known_rule('kb-consistency').
71
+ known_rule('kb-consistency-unresolved').
72
+ known_rule('evidence-floor').
73
+ known_rule('proof-contract-claims').
70
74
 
71
75
  rule_enforcement_class('must-priority-coverage', canonical).
72
76
  rule_enforcement_class('symbol-coverage', canonical).
@@ -121,6 +125,10 @@ rule_enforcement_class('supersedes-reason-missing', canonical).
121
125
  rule_enforcement_class('supersedes-reason-acknowledged', advisory).
122
126
  rule_enforcement_class('policy-ownership', canonical).
123
127
  rule_enforcement_class('policy-markers', canonical).
128
+ rule_enforcement_class('kb-consistency', canonical).
129
+ rule_enforcement_class('kb-consistency-unresolved', advisory).
130
+ rule_enforcement_class('evidence-floor', canonical).
131
+ rule_enforcement_class('proof-contract-claims', canonical).
124
132
 
125
133
  rule_implementation('must-priority-coverage', prolog).
126
134
  rule_implementation('symbol-coverage', prolog).
@@ -175,6 +183,10 @@ rule_implementation('supersedes-reason-missing', typescript).
175
183
  rule_implementation('supersedes-reason-acknowledged', typescript).
176
184
  rule_implementation('policy-ownership', typescript).
177
185
  rule_implementation('policy-markers', typescript).
186
+ rule_implementation('kb-consistency', prolog).
187
+ rule_implementation('kb-consistency-unresolved', prolog).
188
+ rule_implementation('evidence-floor', typescript).
189
+ rule_implementation('proof-contract-claims', typescript).
178
190
 
179
191
  rule_predicate('must-priority-coverage', check_must_priority_coverage).
180
192
  rule_predicate('symbol-coverage', check_symbol_coverage).
@@ -210,6 +222,8 @@ rule_predicate('ontology-quality', check_ontology_quality).
210
222
  rule_predicate('symbol-owner-superseded', check_symbol_owner_superseded).
211
223
  rule_predicate('adr-unlinked', check_adr_unlinked).
212
224
  rule_predicate('adr-proposed', check_adr_proposed).
225
+ rule_predicate('kb-consistency', check_kb_consistency).
226
+ rule_predicate('kb-consistency-unresolved', check_kb_consistency_unresolved).
213
227
 
214
228
  rule_predicate_arity('must-priority-coverage', 1).
215
229
  rule_predicate_arity('symbol-coverage', 1).
@@ -245,6 +259,8 @@ rule_predicate_arity('ontology-quality', 1).
245
259
  rule_predicate_arity('symbol-owner-superseded', 1).
246
260
  rule_predicate_arity('adr-unlinked', 1).
247
261
  rule_predicate_arity('adr-proposed', 1).
262
+ rule_predicate_arity('kb-consistency', 1).
263
+ rule_predicate_arity('kb-consistency-unresolved', 1).
248
264
 
249
265
  rule_description('must-priority-coverage', 'Every current must-priority requirement (not superseded, retired, or closed without the implemented tag) must have a scenario and a test').
250
266
  rule_description('symbol-coverage', 'Production symbols need qualifying coverage via covered_by plus a canonical requirement/scenario test path').
@@ -299,3 +315,7 @@ rule_description('supersedes-reason-missing', 'A current requirement or ADR that
299
315
  rule_description('supersedes-reason-acknowledged', 'Informational: how many current superseding requirements and ADRs have only supersede edges the schema 9 migration acknowledged without a \'Why this changed\' section; one summary finding per check').
300
316
  rule_description('policy-ownership', 'When a plugin activated for kibi.check-policy.v1 declares ownership rules, every production symbol in a rule\'s file set must implement a current requirement grounded (requires_predicate) in one of the rule\'s predicates; projects without an activated check policy are unaffected').
301
317
  rule_description('policy-markers', 'When a plugin activated for kibi.check-policy.v1 declares marker rules, every file implementing a requirement grounded in the rule\'s pattern predicate (with its declared sibling files) must contain each marker the KB declares for that pattern').
318
+ rule_description('kb-consistency', 'The facts current requirements name must hold together, jointly and not only pairwise: every property context needs a value that satisfies all its facts, every atom and decision key one truth value, and stored rules a stratification. Each finding is a contradiction certificate (an irreducible core, two disagreeing facts or a negation cycle) re-verified by the independent checker, or a certificate that checker rejects').
319
+ rule_description('kb-consistency-unresolved', 'Advisory: a property context, atom or decision key whose facts the consistency checker cannot compare (mixed value types or units, an unsupported operator or polarity, or a contradiction whose validity windows never overlap); it never counts as consistent').
320
+ rule_description('evidence-floor', 'Every current requirement\'s computed evidence level (proved, tested, asserted, unverified) must reach its floor: required_evidence when set, otherwise tested for a firm requirement and no floor for any other. Receipts that are only older than the code count as pending re-proof and pass, unless kibi check runs with --fresh-evidence, which also needs a clean proof snapshot').
321
+ rule_description('proof-contract-claims', 'From schema 12, every certificate-kind proof contract (exhaustive, typecheck, arithmetic, smt) must name the claims it proves in proves, and each named claim must be a modeled claim of a current requirement the test reaches through its scenarios, grounded by a fact that proof kind can express or attest').
@@ -506,7 +506,7 @@ identity_live_fact(FactId) :-
506
506
  property_value_signature(Props, Signature) :-
507
507
  findall(
508
508
  Field-Value,
509
- ( member(Field, [value_type, value_string, value_int, value_number, value_bool, unit]),
509
+ ( member(Field, [value_type, value_string, value_int, value_number, value_bool, value_set, unit]),
510
510
  memberchk(Field=Raw, Props),
511
511
  signature_value(Raw, Value),
512
512
  Value \== ''