kibi-core 0.3.0 → 0.4.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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/checks.pl +9 -9
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kibi-core",
3
- "version": "0.3.0",
3
+ "version": "0.4.0",
4
4
  "private": false,
5
5
  "description": "Core Prolog modules and RDF graph logic for Kibi",
6
6
  "type": "module",
package/src/checks.pl CHANGED
@@ -8,7 +8,7 @@
8
8
  check_all_json/1, % Returns all violations as JSON string
9
9
  check_must_priority_coverage/1, % Returns list of must-priority violations
10
10
  check_symbol_coverage/1, % Returns list of uncovered symbols
11
- check_symbol_traceability/2, % Returns list of symbols lacking direct traceability (ReqAdr option)
11
+ check_symbol_traceability/2, % Returns list of symbols lacking requirement traceability (ReqAdr option)
12
12
  check_no_dangling_refs/1, % Returns list of dangling ref violations
13
13
  check_no_cycles/1, % Returns list of cycle violations
14
14
  check_required_fields/1, % Returns list of missing required field violations
@@ -106,8 +106,8 @@ symbol_coverage_violation(SymbolId, violation(
106
106
  violation_source(SymbolId, symbol, Source).
107
107
 
108
108
  %% check_symbol_traceability(+RequireAdr, -Violations)
109
- % Finds all symbols lacking direct traceability:
110
- % - Every symbol must have at least one direct 'implements' relationship to a requirement
109
+ % Finds all symbols lacking supported requirement traceability:
110
+ % - Every symbol must have at least one supported requirement traceability path
111
111
  % - If RequireAdr=true, the symbol must also have at least one 'constrained_by' relationship to an ADR
112
112
  check_symbol_traceability(RequireAdr, Violations) :-
113
113
  findall(
@@ -125,8 +125,8 @@ symbol_traceability_violation(RequireAdr, violation(
125
125
  Source
126
126
  )) :-
127
127
  kb_entity(SymbolId, symbol, _),
128
- % Check if symbol has direct implements to a requirement
129
- ( kb_relationship(implements, SymbolId, ReqId),
128
+ % Check if symbol has a supported requirement traceability path
129
+ ( transitively_implements(SymbolId, ReqId),
130
130
  kb_entity(ReqId, req, _)
131
131
  -> HasReq = true
132
132
  ; HasReq = false
@@ -142,11 +142,11 @@ symbol_traceability_violation(RequireAdr, violation(
142
142
  ),
143
143
  % Determine what is missing
144
144
  ( HasReq = false, HasAdr = false, RequireAdr = true ->
145
- Description = "Symbol has no direct requirement link and no ADR constraint.",
146
- Suggestion = "Add 'implements: REQ-xxx' and 'constrained_by: ADR-xxx' in symbols.yaml."
145
+ Description = "Symbol has no supported requirement traceability path and no ADR constraint.",
146
+ Suggestion = "Add a direct 'implements: REQ-xxx' link or a test-backed 'covered_by' + 'validates'/'verified_by' path, and add 'constrained_by: ADR-xxx' in symbols.yaml."
147
147
  ; HasReq = false ->
148
- Description = "Symbol has no direct requirement link.",
149
- Suggestion = "Add 'implements: REQ-xxx' in symbols.yaml."
148
+ Description = "Symbol has no supported requirement traceability path.",
149
+ Suggestion = "Add a direct 'implements: REQ-xxx' link or a test-backed 'covered_by' + 'validates'/'verified_by' path."
150
150
  ; HasAdr = false ->
151
151
  Description = "Symbol has no ADR constraint.",
152
152
  Suggestion = "Add 'constrained_by: ADR-xxx' in symbols.yaml."