kibi-core 0.15.1 → 0.16.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/package.json +1 -1
- package/schema/validation.pl +14 -2
- package/src/rule_registry.pl +8 -0
package/package.json
CHANGED
package/schema/validation.pl
CHANGED
|
@@ -225,15 +225,27 @@ valid_strict_polarity_in_props(Props) :-
|
|
|
225
225
|
valid_predicate_polarity_in_props(Props) :-
|
|
226
226
|
( memberchk(polarity=P, Props) -> valid_predicate_polarity(P) ; true ).
|
|
227
227
|
|
|
228
|
-
% claim_key and claim_text form one auditable provenance pair.
|
|
228
|
+
% claim_key and claim_text form one auditable provenance pair. An observation
|
|
229
|
+
% or meta fact is a non-grounding review note: it may quote the claim it is
|
|
230
|
+
% about in claim_text without claiming that claim's key.
|
|
229
231
|
valid_claim_provenance(Props) :-
|
|
230
232
|
( memberchk(claim_key=Key, Props)
|
|
231
233
|
-> memberchk(claim_text=Text, Props),
|
|
232
234
|
nonempty_claim_value(Key),
|
|
233
235
|
nonempty_claim_value(Text)
|
|
234
|
-
;
|
|
236
|
+
; memberchk(claim_text=Text, Props)
|
|
237
|
+
-> review_note_fact(Props),
|
|
238
|
+
nonempty_claim_value(Text)
|
|
239
|
+
; true
|
|
235
240
|
).
|
|
236
241
|
|
|
242
|
+
review_note_fact(Props) :-
|
|
243
|
+
memberchk(fact_kind=RawKind, Props),
|
|
244
|
+
( atom(RawKind) -> Kind = RawKind
|
|
245
|
+
; string(RawKind) -> atom_string(Kind, RawKind)
|
|
246
|
+
),
|
|
247
|
+
memberchk(Kind, [observation, meta]).
|
|
248
|
+
|
|
237
249
|
nonempty_claim_value(Value) :- string(Value), Value \= "", !.
|
|
238
250
|
nonempty_claim_value(Value) :- atom(Value), Value \= '', !.
|
|
239
251
|
|
package/src/rule_registry.pl
CHANGED
|
@@ -55,6 +55,8 @@ known_rule('symbol-owner-superseded').
|
|
|
55
55
|
known_rule('adr-unlinked').
|
|
56
56
|
known_rule('adr-proposed').
|
|
57
57
|
known_rule('predicate-schema-conformance').
|
|
58
|
+
known_rule('entity-context-missing').
|
|
59
|
+
known_rule('entity-context-acknowledged').
|
|
58
60
|
|
|
59
61
|
rule_enforcement_class('must-priority-coverage', canonical).
|
|
60
62
|
rule_enforcement_class('symbol-coverage', canonical).
|
|
@@ -97,6 +99,8 @@ rule_enforcement_class('symbol-owner-superseded', advisory).
|
|
|
97
99
|
rule_enforcement_class('adr-unlinked', advisory).
|
|
98
100
|
rule_enforcement_class('adr-proposed', advisory).
|
|
99
101
|
rule_enforcement_class('predicate-schema-conformance', advisory).
|
|
102
|
+
rule_enforcement_class('entity-context-missing', canonical).
|
|
103
|
+
rule_enforcement_class('entity-context-acknowledged', advisory).
|
|
100
104
|
|
|
101
105
|
rule_implementation('must-priority-coverage', prolog).
|
|
102
106
|
rule_implementation('symbol-coverage', prolog).
|
|
@@ -139,6 +143,8 @@ rule_implementation('symbol-owner-superseded', prolog).
|
|
|
139
143
|
rule_implementation('adr-unlinked', prolog).
|
|
140
144
|
rule_implementation('adr-proposed', prolog).
|
|
141
145
|
rule_implementation('predicate-schema-conformance', typescript).
|
|
146
|
+
rule_implementation('entity-context-missing', typescript).
|
|
147
|
+
rule_implementation('entity-context-acknowledged', typescript).
|
|
142
148
|
|
|
143
149
|
rule_predicate('must-priority-coverage', check_must_priority_coverage).
|
|
144
150
|
rule_predicate('symbol-coverage', check_symbol_coverage).
|
|
@@ -249,3 +255,5 @@ rule_description('symbol-owner-superseded', 'Advisory: a symbol whose every impl
|
|
|
249
255
|
rule_description('adr-unlinked', 'Advisory: an accepted ADR that no requirement or other ADR is linked with (relates_to, supersedes or any typed edge, in either direction)').
|
|
250
256
|
rule_description('adr-proposed', 'Informational: an ADR that is still proposed and not superseded, so nobody accepted or withdrew the decision').
|
|
251
257
|
rule_description('predicate-schema-conformance', 'Predicate facts match a predicate_schema (project-local, or the built-in catalog in the default namespace) and use its declared argument constants').
|
|
258
|
+
rule_description('entity-context-missing', 'A current requirement, scenario, test, ADR or observation/meta fact must carry body context: at least 12 words of prose (requirements: under a Context, Rationale, Why, Background, Source, Notes or Evidence heading) that do not restate the title or semantic_text; entities tagged review:context-missing are acknowledged legacy and exempt').
|
|
259
|
+
rule_description('entity-context-acknowledged', 'Informational: how many current entities carry the review:context-missing tag, so the legacy context backlog stays visible; one summary finding per check').
|