@sigloch/contracts 11.0.0 → 12.6.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.
@@ -10,7 +10,7 @@ import { CR_RULES } from './cr-quality-rules.js';
10
10
  import { ND_RULES } from './near-duplicate-rules.js';
11
11
  import { AO_RULES } from './ao-rules.js';
12
12
  import { BQ_RULES } from './quality-rules.js';
13
- import { AF_RULES, TASK_OUTCOME_RULES } from './analysis-freshness-rules.js';
13
+ import { AF_RULES } from './analysis-freshness-rules.js';
14
14
  import { CODE_CONFORMANCE_RULES } from './conformance-rules.js';
15
15
  import { markOfStage } from './readiness.js';
16
16
  /**
@@ -37,7 +37,6 @@ const CATALOGS = [
37
37
  { profile: 'se', rules: FM_RULES },
38
38
  { profile: 'se', rules: VIEW_RULES },
39
39
  { profile: 'se', rules: AF_RULES },
40
- { profile: 'se', rules: TASK_OUTCOME_RULES }, // CR-SM-355: Task-Ausgaenge trade / irr
41
40
  // Sprach-/Textqualitaet statt SE-Struktur — das ist die Trennlinie, die die Praefixliste meinte.
42
41
  { profile: 'coding', rules: BQ_RULES },
43
42
  { profile: 'coding', rules: ND_RULES },
@@ -76,7 +75,6 @@ export function getRuleDefsForProfile(profile) {
76
75
  const EVALUATED_CATALOGS = [
77
76
  V3_RULES, BQ_RULES, UC_RULES, FC_RULES, SC_RULES, ND_RULES, MT_RULES, CR_RULES, AO_RULES,
78
77
  FM_RULES, VIEW_RULES, AF_RULES,
79
- TASK_OUTCOME_RULES, // CR-SM-355
80
78
  ];
81
79
  /**
82
80
  * Evaluate all rules against a graph. Single call replaces the individual evaluator calls.
@@ -1,4 +1,5 @@
1
1
  import { indexOf } from './graph-index.js';
2
+ import { unwiredFuncs } from './rules.js';
2
3
  // ---------------------------------------------------------------------------
3
4
  // FC-02: Leaf UC (no UC→compose→UC) must have at least one FCHAIN
4
5
  // ---------------------------------------------------------------------------
@@ -23,7 +24,8 @@ export function fc02LeafUcHasFchain(graph) {
23
24
  }));
24
25
  }
25
26
  // ---------------------------------------------------------------------------
26
- // FC-03: FUNC within FCHAIN should not compose other FUNC (flat chain)
27
+ // FC-03: ein Block (FUNC mit FUNC-Kindern) ist weder Glied einer Kette noch Erfueller einer Anforderung —
28
+ // error seit CR-SM-410. Fall 1: FUNC within FCHAIN must not compose other FUNC (flat chain).
27
29
  // ---------------------------------------------------------------------------
28
30
  export function fc03FchainFlat(graph) {
29
31
  const violations = [];
@@ -37,7 +39,7 @@ export function fc03FchainFlat(graph) {
37
39
  if (nestedCompose.length > 0) {
38
40
  violations.push({
39
41
  rule_id: 'FC-03',
40
- severity: 'warning',
42
+ severity: 'error',
41
43
  element_id: fid,
42
44
  message: `${fid} in ${fc.id} has nested FUNC compose (should be flat)`,
43
45
  fix_hint: 'Move nested functions to FCHAIN level (flat composition)',
@@ -46,6 +48,26 @@ export function fc03FchainFlat(graph) {
46
48
  }
47
49
  }
48
50
  }
51
+ // CR-SM-410, zweiter Fall: ein Block erfuellt keine Anforderung („Ein Block sammelt Funktionen, kann
52
+ // aber keine Anforderungen tragen"). Die Kante `FUNC -satisfy-> REQ` laesst die Grammatik zu, sie
53
+ // verdeckt aber, welche Blattfunktion die Anforderung traegt. EIN Befund je Block (CR-SM-242), die
54
+ // Anforderungen stehen in der Meldung. Dieselbe Kennung und Schwere wie der erste Fall: eine Kennung
55
+ // traegt keine zwei Schweren, darum haengt das nicht als Fehler-Bein an der Warnung R-02.
56
+ for (const fn of idx.elementsOfType('FUNC')) {
57
+ if (!idx.out(fn.id, 'compose').some(t => idx.typeOf(t.target) === 'FUNC'))
58
+ continue;
59
+ const reqs = [...new Set(idx.out(fn.id, 'satisfy').map(t => t.target).filter(id => idx.typeOf(id) === 'REQ'))].sort();
60
+ if (reqs.length === 0)
61
+ continue;
62
+ violations.push({
63
+ rule_id: 'FC-03',
64
+ severity: 'error',
65
+ element_id: fn.id,
66
+ message: `${fn.id} composes other FUNC and satisfies ${reqs.join(', ')} (a block carries no requirement)`,
67
+ fix_hint: 'Move the satisfy trace to the leaf function that carries the requirement; a requirement of the whole block is non-functional and belongs to the MOD, FCHAIN or SYS',
68
+ context: { element_type: 'FUNC', element_name: fn.name },
69
+ });
70
+ }
49
71
  return violations;
50
72
  }
51
73
  // ---------------------------------------------------------------------------
@@ -123,16 +145,12 @@ export function fc05ChainConnected(graph) {
123
145
  // Erzeuger/Verbraucher je FLOW — ueber alle Typen (FUNC oder ACTOR).
124
146
  const producers = new Map();
125
147
  const consumers = new Map();
126
- const wiredIn = new Set();
127
- const wiredOut = new Set();
128
148
  for (const t of idx.tracesOfType('io')) {
129
149
  if (idx.typeOf(t.target) === 'FLOW') {
130
150
  (producers.get(t.target) ?? producers.set(t.target, []).get(t.target)).push(t.source);
131
- wiredOut.add(t.source);
132
151
  }
133
152
  if (idx.typeOf(t.source) === 'FLOW') {
134
153
  (consumers.get(t.source) ?? consumers.set(t.source, []).get(t.source)).push(t.target);
135
- wiredIn.add(t.target);
136
154
  }
137
155
  }
138
156
  const successors = new Map();
@@ -145,6 +163,7 @@ export function fc05ChainConnected(graph) {
145
163
  }
146
164
  }
147
165
  const succ = (id) => successors.get(id) ?? new Set();
166
+ const unwired = unwiredFuncs(graph);
148
167
  const violations = [];
149
168
  for (const fc of idx.elementsOfType('FCHAIN')) {
150
169
  const members = [...new Set(idx.out(fc.id, 'compose').map(t => t.target).filter(id => idx.typeOf(id) === 'FUNC'))].sort();
@@ -153,7 +172,8 @@ export function fc05ChainConnected(graph) {
153
172
  // Ein Glied ohne io-Eingang oder -Ausgang ist R-31s Befund — und er kann genau die Bruecke
154
173
  // sein, die fehlt. Solange eines da ist, urteilt FC-05 nicht (eine Ursache, ein Befund):
155
174
  // gemessen an graphcode FCHAIN-capture, wo `FUNC-decode` ohne Ausgang sonst einen Sack vortaeuscht.
156
- if (members.some(f => !wiredIn.has(f) || !wiredOut.has(f)))
175
+ // CR-SM-409: dieselbe Rechnung wie R-31 und `chainMetrics` (`unwiredFuncs`), hier ueber die Glieder.
176
+ if (members.some(f => unwired.has(f)))
157
177
  continue;
158
178
  const inChain = new Set(members);
159
179
  // Schwache Komponenten ueber Glied -> Glied.
@@ -234,9 +254,16 @@ export const FC_RULES = [
234
254
  // CR-SM-243: domain ist FUNC, nicht FCHAIN — die Regel meldet am FUNC mit der
235
255
  // verschachtelten Zerlegung. Die FCHAIN ist der Suchraum, nicht die Grundgesamtheit:
236
256
  // eine Kette mit n verschachtelten FUNCs erzeugt n Verstoesse gegen einen Beitrag von 1.
237
- { id: 'FC-03', name: 'FCHAIN is flat', severity: 'warning', stage: 5, evaluate: fc03FchainFlat, domain: ['FUNC'] },
257
+ // CR-SM-410: FEHLER (Entscheidung des Autors 2026-10-11: „Ein Block aggregiert Teile einer Kette, ist aber
258
+ // selbst nicht Glied" und „Ein Block sammelt Funktionen, kann aber keine Anforderungen tragen"). Beide Faelle
259
+ // unter dieser Kennung. Nachgezaehlt ueber 30 Modelle nach dem Richten: 41 Bloecke, keiner Glied, keiner Erfueller.
260
+ { id: 'FC-03', name: 'Block is neither chain member nor satisfier', severity: 'error', stage: 5, evaluate: fc03FchainFlat, domain: ['FUNC'] },
238
261
  { id: 'FC-04', name: 'FCHAIN actor-bounded (trigger+consumer)', severity: 'warning', stage: 6, evaluate: fc04ActorBounded, domain: ['FCHAIN'] },
239
- { id: 'FC-05', name: 'FCHAIN is connected (producer -> consumer)', severity: 'warning', stage: 6, evaluate: fc05ChainConnected, domain: ['FCHAIN'] },
262
+ // CR-SM-409: die zerfallene Kette haelt PDR (Rolle `existence`, Entscheidung des Autors 2026-10-11).
263
+ // R-31 haelt die Marke am losen Glied, R-15 an der leeren Kette; ohne diese Rolle erreichte ein Modell
264
+ // PDR mit einer Kette, die keine Kennzahl und keine Analyse traegt. FC-04 bleibt ohne Rolle: sie meldet
265
+ // auch an bewertbaren Ketten, die eine andere fortsetzen.
266
+ { id: 'FC-05', name: 'FCHAIN is connected (producer -> consumer)', severity: 'warning', stage: 6, role: 'existence', evaluate: fc05ChainConnected, domain: ['FCHAIN'] },
240
267
  ];
241
268
  // CR-SM-236: `policy` wird durchgereicht, auch wo diese Familie heute keine Schwelle hat —
242
269
  // ein Sonderweg je Familie waere genau der zweite Pfad, den der Regelsatz verbietet.
@@ -75,3 +75,35 @@ export type FunctionCriticality = z.infer<typeof FunctionCriticality>;
75
75
  */
76
76
  export declare function chainsByFunc(graph: OntologyGraph): Map<string, Set<string>>;
77
77
  export declare function functionCriticality(graph: OntologyGraph): FunctionCriticality[];
78
+ /**
79
+ * CR-SM-407 — der BETRACHTUNGSUMFANG einer Funktionsmenge: was eine Analyse lesen muss.
80
+ *
81
+ * Die Funktionen, ihre Module, alle Ketten durch sie und jedes System — dazu jede Anforderung,
82
+ * die eines davon erfuellt. Gemessen an drei Ketten der Familie (graphanalyze
83
+ * `docs/messung/flaechen-2026-10-11/`): 39 bis 48 Prozent der Anforderungen, darin 22 von 24,
84
+ * die ein Gutachter als verletzt oder gefaehrdet nannte.
85
+ *
86
+ * ## Eine Ableitung, keine Kennzahl
87
+ *
88
+ * Vier Mengenvereinigungen ueber vorhandene Kanten. Kein Feld an der Kettenzeile von
89
+ * `chainMetrics`: der Umfang ist auch ueber die beruehrten Funktionen eines Vorschlags definiert,
90
+ * nicht nur ueber eine Kette, und als Liste an jeder Zeile waeren es am graphcode-Modell rund
91
+ * 35 700 Zeichen je Aufruf. Die Zahl ist die Laenge der Liste.
92
+ *
93
+ * ## Dieselben Begriffe wie daneben
94
+ *
95
+ * - Ein Seed ist eine FUNC oder eine FCHAIN; eine Kette steht fuer ihre Glieder (direkte
96
+ * `FCHAIN -compose-> FUNC`-Kante, R-30s Definition). Jeder andere Seed traegt nichts bei.
97
+ * - „Ketten durch eine Funktion" ist `chainsByFunc` — die eine Rechnung dieser Datei.
98
+ * - Modul = direkte `allocate`-Kante, wie in `chainMetrics`. Kein Elternmodul.
99
+ * - Das System gehoert IMMER dazu, auch ohne Seed: seine Anforderungen gelten fuer jede Analyse.
100
+ *
101
+ * Jede Liste ist nach Kennung sortiert.
102
+ */
103
+ export declare const RequirementScope: z.ZodObject<{
104
+ modules: z.ZodArray<z.ZodString>;
105
+ chains: z.ZodArray<z.ZodString>;
106
+ requirements: z.ZodArray<z.ZodString>;
107
+ }, z.core.$strict>;
108
+ export type RequirementScope = z.infer<typeof RequirementScope>;
109
+ export declare function requirementScope(graph: OntologyGraph, seeds: readonly string[]): RequirementScope;
@@ -139,3 +139,72 @@ export function functionCriticality(graph) {
139
139
  z.array(FunctionCriticality).parse(sorted); // CR-SM-361: der Erzeuger prueft seinen Vertrag
140
140
  return sorted;
141
141
  }
142
+ /**
143
+ * CR-SM-407 — der BETRACHTUNGSUMFANG einer Funktionsmenge: was eine Analyse lesen muss.
144
+ *
145
+ * Die Funktionen, ihre Module, alle Ketten durch sie und jedes System — dazu jede Anforderung,
146
+ * die eines davon erfuellt. Gemessen an drei Ketten der Familie (graphanalyze
147
+ * `docs/messung/flaechen-2026-10-11/`): 39 bis 48 Prozent der Anforderungen, darin 22 von 24,
148
+ * die ein Gutachter als verletzt oder gefaehrdet nannte.
149
+ *
150
+ * ## Eine Ableitung, keine Kennzahl
151
+ *
152
+ * Vier Mengenvereinigungen ueber vorhandene Kanten. Kein Feld an der Kettenzeile von
153
+ * `chainMetrics`: der Umfang ist auch ueber die beruehrten Funktionen eines Vorschlags definiert,
154
+ * nicht nur ueber eine Kette, und als Liste an jeder Zeile waeren es am graphcode-Modell rund
155
+ * 35 700 Zeichen je Aufruf. Die Zahl ist die Laenge der Liste.
156
+ *
157
+ * ## Dieselben Begriffe wie daneben
158
+ *
159
+ * - Ein Seed ist eine FUNC oder eine FCHAIN; eine Kette steht fuer ihre Glieder (direkte
160
+ * `FCHAIN -compose-> FUNC`-Kante, R-30s Definition). Jeder andere Seed traegt nichts bei.
161
+ * - „Ketten durch eine Funktion" ist `chainsByFunc` — die eine Rechnung dieser Datei.
162
+ * - Modul = direkte `allocate`-Kante, wie in `chainMetrics`. Kein Elternmodul.
163
+ * - Das System gehoert IMMER dazu, auch ohne Seed: seine Anforderungen gelten fuer jede Analyse.
164
+ *
165
+ * Jede Liste ist nach Kennung sortiert.
166
+ */
167
+ export const RequirementScope = z.strictObject({
168
+ /** Die Module der Funktionen. */
169
+ modules: z.array(z.string()),
170
+ /** Alle Ketten durch die Funktionen. */
171
+ chains: z.array(z.string()),
172
+ /** Jede REQ, die eine der Funktionen, eines der Module, eine der Ketten oder ein System erfuellt. */
173
+ requirements: z.array(z.string()),
174
+ });
175
+ export function requirementScope(graph, seeds) {
176
+ const idx = indexOf(graph);
177
+ const chainsOf = chainsByFunc(graph);
178
+ const funcs = new Set();
179
+ for (const seed of seeds) {
180
+ const type = idx.typeOf(seed);
181
+ if (type === 'FUNC')
182
+ funcs.add(seed);
183
+ else if (type === 'FCHAIN') {
184
+ for (const t of idx.out(seed, 'compose'))
185
+ if (idx.typeOf(t.target) === 'FUNC')
186
+ funcs.add(t.target);
187
+ }
188
+ }
189
+ const modules = new Set();
190
+ const chains = new Set();
191
+ for (const func of funcs) {
192
+ for (const t of idx.out(func, 'allocate'))
193
+ if (idx.typeOf(t.target) === 'MOD')
194
+ modules.add(t.target);
195
+ for (const chain of chainsOf.get(func) ?? [])
196
+ chains.add(chain);
197
+ }
198
+ const requirements = new Set();
199
+ const systems = idx.elementsOfType('SYS').map((s) => s.id);
200
+ for (const satisfier of [...funcs, ...modules, ...chains, ...systems]) {
201
+ for (const t of idx.out(satisfier, 'satisfy'))
202
+ if (idx.typeOf(t.target) === 'REQ')
203
+ requirements.add(t.target);
204
+ }
205
+ return RequirementScope.parse({
206
+ modules: [...modules].sort(),
207
+ chains: [...chains].sort(),
208
+ requirements: [...requirements].sort(),
209
+ });
210
+ }
@@ -13,16 +13,16 @@ export declare const GRAMMAR_SNAPSHOT: {
13
13
  readonly versions: {
14
14
  readonly ontology: "11.0.0";
15
15
  readonly metaModel: "6.0.0";
16
- readonly rules: "41.0.0";
16
+ readonly rules: "47.0.0";
17
17
  };
18
18
  readonly elementTypes: readonly ["ACTOR", "CR", "FCHAIN", "FLOW", "FUNC", "MOD", "MS", "REQ", "SCHEMA", "SYS", "TEST", "UC"];
19
19
  readonly traceTypes: readonly ["allocate", "compose", "io", "relation", "satisfy", "verify"];
20
20
  readonly patterns: readonly ["ACTOR -io-> FLOW", "CR -relation-> FUNC", "CR -relation-> MOD", "CR -relation-> MS", "CR -relation-> REQ", "CR -relation-> SCHEMA", "CR -relation-> UC", "FCHAIN -compose-> FUNC [1..*]", "FCHAIN -satisfy-> REQ where target.kinds in {non-functional}", "FLOW -io-> ACTOR", "FLOW -io-> FUNC", "FLOW -relation-> SCHEMA [1]", "FUNC -allocate-> MOD [0..1]", "FUNC -compose-> FUNC [0..*]", "FUNC -io-> FLOW", "FUNC -satisfy-> REQ where target.kinds in {functional}", "MOD -compose-> MOD [0..*]", "MOD -satisfy-> REQ where target.kinds in {non-functional}", "MS -compose-> FUNC", "MS -compose-> REQ", "MS -compose-> UC", "MS -relation-> MS label=depends-on", "REQ -compose-> REQ [0..*]", "SYS -compose-> MOD [0..*]", "SYS -compose-> REQ [0..*]", "SYS -compose-> SYS [0..*]", "SYS -compose-> UC [1..*]", "SYS -satisfy-> REQ where target.kinds in {non-functional}", "TEST -verify-> REQ", "TEST -verify-> SCHEMA", "UC -compose-> FCHAIN [1..*]", "UC -compose-> REQ [1..*]"];
21
21
  readonly elementColumns: readonly ["OntologyElement.attributes", "OntologyElement.created_at", "OntologyElement.description", "OntologyElement.id", "OntologyElement.kinds", "OntologyElement.method", "OntologyElement.name", "OntologyElement.status", "OntologyElement.type", "OntologyElement.updated_at", "Trace.attributes", "Trace.created_at", "Trace.label", "Trace.source", "Trace.target", "Trace.type", "Trace.verified_at", "Trace.weight"];
22
22
  readonly attributes: readonly ["CR.architectureOnly: boolean", "CR.rationale: string", "CR.spike: boolean", "CR.status: enum", "FLOW.sync: enum", "FUNC.external: boolean", "FUNC.measuredMs: number", "FUNC.realRef: object", "FUNC.safety_relevant: boolean", "FUNC.sourceFile: string", "FUNC.timingBudgetMs: number", "MOD.external: boolean", "MOD.kind: string", "MOD.path: string", "MOD.realRef: object", "REQ.detection: number", "REQ.occurrence: number", "REQ.role: enum", "REQ.severity: number", "SCHEMA.contract: string", "SCHEMA.external: boolean", "SCHEMA.realRef: object", "TEST.sourceFile: string", "TEST.testRefs: array", "UC.operatingMode: string"];
23
- readonly rules: readonly ["AF-01 (warning) domain=[graph] stage=3 role=analysis", "AF-02 (warning) domain=[graph] stage=7 role=analysis", "AF-03 (warning) domain=[graph] stage=7 role=analysis", "AF-04 (warning) domain=[graph] stage=8 role=analysis", "AF-05 (warning) domain=[graph] stage=10 role=existence", "BQ-01 (warning) domain=[REQ] stage=3", "BQ-02 (warning) domain=[REQ] stage=3", "BQ-04 (warning) domain=[REQ] stage=3", "BQ-06 (warning) domain=[REQ] stage=3", "BQ-07 (warning) domain=[REQ] stage=3", "BW-02 (warning) domain=[FUNC] stage=5", "CL-01 (warning) domain=[ACTOR] stage=2", "CR-01 (warning) domain=[MOD] stage=7", "CR-R01 (warning) domain=[CR] stage=10", "CR-R02 (warning) domain=[CR] stage=10", "CR-R03 (warning) domain=[all] stage=immer", "FC-02 (warning) domain=[UC] stage=2", "FC-03 (warning) domain=[FUNC] stage=5", "FC-04 (warning) domain=[FCHAIN] stage=6", "FC-05 (warning) domain=[FCHAIN] stage=6", "FM-01 (warning) domain=[REQ] stage=3", "FM-02 (warning) domain=[REQ] stage=3", "FM-03 (warning) domain=[REQ] stage=9", "IO-01 (warning) domain=[FUNC] stage=5", "IO-02 (error) domain=[FLOW] stage=6", "IR-01 (warning) domain=[graph] stage=7 role=analysis", "MS-01 (warning) domain=[MS] stage=10", "MS-02 (warning) domain=[MS] stage=10", "MS-03 (info) domain=[CR] stage=10", "MT-01 (warning) domain=[MOD] stage=7", "MT-02 (warning) domain=[MOD] stage=7", "MT-04 (info) domain=[FUNC] stage=5", "ND-01 (warning) domain=[FUNC] stage=5", "ND-02 (warning) domain=[SCHEMA] stage=8", "NFR-01 (warning) domain=[FCHAIN,FUNC,MOD] stage=7", "R-01 (error) domain=[REQ] stage=9 role=existence", "R-02 (warning) domain=[FUNC] stage=5", "R-04 (warning) domain=[MOD] stage=7", "R-05 (warning) domain=[TEST] stage=9", "R-08 (error) domain=[all] stage=immer", "R-10 (warning) domain=[FLOW] stage=6", "R-12 (warning) domain=[FUNC] stage=5", "R-15 (warning) domain=[FCHAIN] stage=5 role=existence", "R-16 (warning) domain=[ACTOR] stage=2", "R-17 (warning) domain=[SYS] stage=2 role=existence", "R-18 (error) domain=[all] stage=immer", "R-19 (warning) domain=[TEST] stage=11", "R-20 (warning) domain=[FUNC] stage=11", "R-21 (warning) domain=[FCHAIN,FUNC] stage=9", "R-22 (warning) domain=[FUNC] stage=7 role=existence", "R-23 (warning) domain=[MOD] stage=7", "R-26 (warning) domain=[SCHEMA] stage=11", "R-29 (error) domain=[TEST] stage=11", "R-30 (warning) domain=[FUNC] stage=5", "R-31 (warning) domain=[FUNC] stage=6 role=existence", "R-32 (warning) domain=[SCHEMA] stage=9 role=existence", "R-33 (warning) domain=[graph] stage=1 role=existence", "RC-01 (warning) domain=[FUNC] stage=12", "RC-02 (warning) domain=[TEST] stage=12", "RC-03 (warning) domain=[SCHEMA] stage=12", "RC-04 (warning) domain=[SCHEMA] stage=12", "RC-05 (warning) domain=[MOD] stage=10", "RC-06 (warning) domain=[FUNC,MOD,SCHEMA] stage=12", "RC-07 (warning) domain=[CR,SYS] stage=10", "RC-08 (warning) domain=[SCHEMA] stage=12", "RC-09 (warning) domain=[SCHEMA] stage=12", "RC-10 (warning) domain=[MOD] stage=12", "RD-01 (warning) domain=[REQ] stage=3", "RD-02 (warning) domain=[REQ] stage=3", "RD-04 (warning) domain=[FUNC,MOD,SYS] stage=7", "RD-05 (warning) domain=[FUNC,MOD] stage=7", "SC-02 (warning) domain=[SCHEMA] stage=8", "TR-01 (warning) domain=[graph] stage=7 role=analysis", "UC-01 (warning) domain=[UC] stage=3 role=existence", "UC-02 (warning) domain=[UC] stage=2 role=existence", "UC-03 (warning) domain=[UC] stage=4 role=existence", "UC-04 (warning) domain=[UC] stage=2", "VR-01 (info) domain=[TEST] stage=11"];
23
+ readonly rules: readonly ["AF-01 (warning) domain=[graph] stage=3 role=analysis", "AF-02 (warning) domain=[graph] stage=7 role=analysis", "AF-03 (warning) domain=[graph] stage=7 role=analysis", "AF-04 (warning) domain=[graph] stage=8 role=analysis", "AF-05 (warning) domain=[graph] stage=10 role=existence", "BQ-01 (warning) domain=[REQ] stage=3", "BQ-02 (warning) domain=[REQ] stage=3", "BQ-04 (warning) domain=[REQ] stage=3", "BQ-06 (warning) domain=[REQ] stage=3", "BQ-07 (warning) domain=[REQ] stage=3", "BW-02 (warning) domain=[FUNC] stage=5", "CL-01 (warning) domain=[ACTOR] stage=2", "CR-01 (warning) domain=[MOD] stage=7", "CR-R01 (warning) domain=[CR] stage=10", "CR-R02 (warning) domain=[CR] stage=10", "CR-R03 (warning) domain=[all] stage=immer", "FC-02 (warning) domain=[UC] stage=2", "FC-03 (error) domain=[FUNC] stage=5", "FC-04 (warning) domain=[FCHAIN] stage=6", "FC-05 (warning) domain=[FCHAIN] stage=6 role=existence", "FM-01 (warning) domain=[REQ] stage=3", "FM-02 (warning) domain=[REQ] stage=3", "FM-03 (warning) domain=[REQ] stage=9", "IO-01 (warning) domain=[FUNC] stage=5", "IO-02 (error) domain=[FLOW] stage=6", "MS-01 (warning) domain=[MS] stage=10", "MS-02 (warning) domain=[MS] stage=10", "MS-03 (info) domain=[CR] stage=10", "MT-01 (warning) domain=[MOD] stage=7", "MT-02 (warning) domain=[MOD] stage=7", "MT-04 (info) domain=[FUNC] stage=5", "ND-01 (warning) domain=[FUNC] stage=5", "ND-02 (warning) domain=[SCHEMA] stage=8", "NFR-01 (warning) domain=[FCHAIN,FUNC,MOD] stage=7", "R-01 (error) domain=[REQ] stage=9 role=existence", "R-02 (warning) domain=[FUNC] stage=5", "R-04 (warning) domain=[MOD] stage=7", "R-05 (warning) domain=[TEST] stage=9", "R-08 (error) domain=[all] stage=immer", "R-10 (warning) domain=[FLOW] stage=6", "R-12 (warning) domain=[FUNC] stage=5", "R-15 (warning) domain=[FCHAIN] stage=5 role=existence", "R-16 (warning) domain=[ACTOR] stage=2", "R-17 (warning) domain=[SYS] stage=2 role=existence", "R-18 (error) domain=[all] stage=immer", "R-19 (warning) domain=[TEST] stage=11", "R-20 (warning) domain=[FUNC] stage=11", "R-21 (warning) domain=[FCHAIN,FUNC] stage=9", "R-22 (warning) domain=[FUNC] stage=7 role=existence", "R-23 (warning) domain=[MOD] stage=7", "R-26 (warning) domain=[SCHEMA] stage=11", "R-29 (error) domain=[TEST] stage=11", "R-30 (warning) domain=[FUNC] stage=5", "R-31 (warning) domain=[FUNC] stage=6 role=existence", "R-32 (warning) domain=[SCHEMA] stage=9 role=existence", "R-33 (warning) domain=[graph] stage=1 role=existence", "RC-01 (warning) domain=[FUNC] stage=12", "RC-02 (warning) domain=[TEST] stage=12", "RC-03 (warning) domain=[SCHEMA] stage=12", "RC-04 (warning) domain=[SCHEMA] stage=12", "RC-05 (warning) domain=[MOD] stage=10", "RC-06 (warning) domain=[FUNC,MOD,SCHEMA] stage=12", "RC-07 (warning) domain=[CR,SYS] stage=10", "RC-08 (warning) domain=[SCHEMA] stage=12", "RC-09 (warning) domain=[SCHEMA] stage=12", "RC-10 (warning) domain=[MOD] stage=12", "RD-01 (warning) domain=[REQ] stage=3", "RD-02 (warning) domain=[REQ] stage=3", "RD-04 (warning) domain=[FUNC,MOD,SYS] stage=7", "RD-05 (warning) domain=[FUNC,MOD] stage=7", "SC-02 (warning) domain=[SCHEMA] stage=8", "UC-01 (warning) domain=[UC] stage=3 role=existence", "UC-02 (warning) domain=[UC] stage=2 role=existence", "UC-03 (warning) domain=[UC] stage=4 role=existence", "UC-04 (warning) domain=[UC] stage=2", "VR-01 (info) domain=[TEST] stage=11"];
24
24
  readonly conformanceRules: readonly ["RC-01 (warning)", "RC-02 (warning)", "RC-03 (warning)", "RC-04 (warning)", "RC-05 (warning)", "RC-06 (warning)", "RC-07 (warning)", "RC-08 (warning)", "RC-09 (warning)", "RC-10 (warning)"];
25
25
  readonly policy: readonly ["apTable = null", "boundaryWidth = {warning:5}", "criticality = {infrastructure:3}", "crossingFlows = {warning:3}", "decompositionBreadth = {min:3,warning:9}", "instability = null", "lcom4 = {info:4,warning:6}", "riskRpn = 100"];
26
- readonly ruleHelp: readonly ["AF-01", "AF-02", "AF-03", "AF-04", "AF-05", "BQ-01", "BQ-02", "BQ-04", "BQ-06", "BQ-07", "BW-02", "CL-01", "CR-01", "CR-R01", "CR-R02", "CR-R03", "FC-02", "FC-03", "FC-04", "FC-05", "FM-01", "FM-02", "FM-03", "IO-01", "IO-02", "IR-01", "MS-01", "MS-02", "MS-03", "MT-01", "MT-02", "MT-04", "ND-01", "ND-02", "NFR-01", "R-01", "R-02", "R-04", "R-05", "R-08", "R-10", "R-12", "R-15", "R-16", "R-17", "R-18", "R-19", "R-20", "R-21", "R-22", "R-23", "R-26", "R-29", "R-30", "R-31", "R-32", "R-33", "RC-01", "RC-02", "RC-03", "RC-04", "RC-05", "RC-06", "RC-07", "RC-08", "RC-09", "RC-10", "RD-01", "RD-02", "RD-04", "RD-05", "SC-02", "TR-01", "UC-01", "UC-02", "UC-03", "UC-04", "VR-01"];
27
- readonly exports: readonly ["ACCEPTED_FINDINGS_ATTRIBUTE", "AF_RULES", "ALL_RULE_DEFS", "AO_RULES", "AcceptedFindingSchema", "ActionPriority", "AnalysisArtifactId", "AnalysisFreshnessStampSchema", "ApTableSchema", "BOUNDED_PATTERNS", "BQ_RULES", "CLOSED_STATUS", "CODE_CONFORMANCE_RULES", "CR_RULES", "CodeFactsSchema", "DEFAULT_METRIC_POLICY", "DIMENSION_READINESS_DELTA_NAME", "DIMENSION_READINESS_NAME", "ELEMENT_ATTRIBUTES", "ELEMENT_DESCRIPTIONS", "ElementType", "ElementUid", "FC_RULES", "FM_RULES", "FileFactsSchema", "FlowSync", "FunctionCriticality", "GRAPH_ANCHOR", "ImportEdgeSchema", "MARK_STAGE", "MAX_SLUG_LENGTH", "META_MODEL_VERSION", "MODELING_ELEMENT_TYPES", "MT_RULES", "Mark", "MetricPolicySchema", "ModuleMetrics", "ND_RULES", "ONTOLOGY_VERSION", "OntologyElement", "OntologyGraph", "PHASE_READINESS_NAME", "READINESS_SCORED_PROFILES", "REQUIRED_PATTERNS", "RULES_VERSION", "RULE_HELP", "RULE_TASKS", "RULE_TO_DIMENSION", "ReadinessDimension", "ReadinessReport", "ReadinessScore", "RealRefSchema", "RepoRelativePathSchema", "ReqKind", "ReqRole", "RuleSeverity", "RuleViolation", "SC_RULES", "STAGE_SETS", "SteerSpace", "SteerTerm", "TASK_ENTRY", "TASK_OUTCOME_RULES", "TASK_OWNED_RULES", "TRACE_PATTERNS", "TestRefSchema", "TestRefsSchema", "TestResult", "Trace", "TraceType", "UC_RULES", "V3_RULES", "VIEW_RULES", "VerificationMethod", "ViolationCandidate", "ViolationContext", "acceptedRuleIds", "actionPriority", "admittingAlternatives", "allocationCohesion", "apMethod", "assumptionReviewRequirementsExist", "attributeTypeOf", "boxContracts", "bq01Unambiguous", "bq02Verifiable", "bq04Necessary", "bq06Conforming", "bq07Complete", "bw02WhiteboxWidth", "chainsByFunc", "cl01ConopsCompleteness", "cr01CrossingFlowCount", "crossingContractCount", "decomposedFuncs", "evaluateAFRules", "evaluateAORules", "evaluateAllRules", "evaluateBQRules", "evaluateCRRules", "evaluateConformanceRules", "evaluateFCRules", "evaluateFMRules", "evaluateMTRules", "evaluateNDRules", "evaluateRules", "evaluateSCRules", "evaluateTaskOutcomeRules", "evaluateUCRules", "evaluateViewRules", "extractFormatE", "fc02LeafUcHasFchain", "fc03FchainFlat", "fc04ActorBounded", "fc05ChainConnected", "flowProducers", "fm01MissingFmeaAttributes", "fm02MissingMitigation", "fm03HighRiskUnverified", "funcSimilarity", "funcSubtree", "functionCriticality", "getRuleDefsForProfile", "hydrateAttrValue", "importCoverage", "indexOf", "io01CrossModuleCompleteness", "isDue", "isElementUid", "isValidTrace", "jaccard", "markOfStage", "maxOccurs", "minOccurs", "moduleCrossings", "moduleMetrics", "mt01Instability", "mt02Lcom4", "mt04WhiteboxLcom4", "nd01FuncNearDuplicate", "nd02SchemaNearDuplicate", "nfr01BudgetOvershoot", "normalizeReqKinds", "pairsAbove", "parseElementUid", "readAnalysisStamp", "readFlowSync", "readRealRef", "readReqRole", "readTestRefs", "sc02IsReferenced", "schemaSimilarity", "setBQ04SimilarityMatrix", "subtreeFuncs", "taskOf", "toElementUid", "toEvaluableGraph", "tokens", "traceRejection", "tradeDecisionRecorded", "tryParseElementUid", "uc01HasRequirements", "uc02HasActor", "uc03HasScenario", "uc04GoalDefined", "unbuiltElementIds", "vr01TestNoResult", "whiteboxContractCount"];
26
+ readonly ruleHelp: readonly ["AF-01", "AF-02", "AF-03", "AF-04", "AF-05", "BQ-01", "BQ-02", "BQ-04", "BQ-06", "BQ-07", "BW-02", "CL-01", "CR-01", "CR-R01", "CR-R02", "CR-R03", "FC-02", "FC-03", "FC-04", "FC-05", "FM-01", "FM-02", "FM-03", "IO-01", "IO-02", "MS-01", "MS-02", "MS-03", "MT-01", "MT-02", "MT-04", "ND-01", "ND-02", "NFR-01", "R-01", "R-02", "R-04", "R-05", "R-08", "R-10", "R-12", "R-15", "R-16", "R-17", "R-18", "R-19", "R-20", "R-21", "R-22", "R-23", "R-26", "R-29", "R-30", "R-31", "R-32", "R-33", "RC-01", "RC-02", "RC-03", "RC-04", "RC-05", "RC-06", "RC-07", "RC-08", "RC-09", "RC-10", "RD-01", "RD-02", "RD-04", "RD-05", "SC-02", "UC-01", "UC-02", "UC-03", "UC-04", "VR-01"];
27
+ readonly exports: readonly ["ACCEPTED_FINDINGS_ATTRIBUTE", "AF_RULES", "ALL_RULE_DEFS", "AO_RULES", "AcceptedFindingSchema", "ActionPriority", "AnalysisArtifactId", "AnalysisFreshnessStampSchema", "ApTableSchema", "BOUNDED_PATTERNS", "BQ_RULES", "CLOSED_STATUS", "CODE_CONFORMANCE_RULES", "CR_RULES", "ChainMetrics", "CodeFactsSchema", "DEFAULT_METRIC_POLICY", "ELEMENT_ATTRIBUTES", "ELEMENT_DESCRIPTIONS", "ElementType", "ElementUid", "FC_RULES", "FM_RULES", "FileFactsSchema", "FlowSync", "FunctionCriticality", "GRAPH_ANCHOR", "ImportEdgeSchema", "MARK_STAGE", "MAX_SLUG_LENGTH", "META_MODEL_VERSION", "MODELING_ELEMENT_TYPES", "MT_RULES", "Mark", "MetricPolicySchema", "ModuleMetrics", "ND_RULES", "ONTOLOGY_VERSION", "OntologyElement", "OntologyGraph", "PHASE_READINESS_NAME", "REQUIRED_PATTERNS", "RULES_VERSION", "RULE_HELP", "RULE_TASKS", "RealRefSchema", "RepoRelativePathSchema", "ReqKind", "ReqRole", "RequirementScope", "RiskCarriers", "RuleSeverity", "RuleViolation", "SC_RULES", "STAGE_SETS", "SteerSpace", "SteerTerm", "TASK_ENTRY", "TASK_OWNED_RULES", "TRACE_PATTERNS", "TestRefSchema", "TestRefsSchema", "TestResult", "Trace", "TraceType", "UC_RULES", "V3_RULES", "VIEW_RULES", "VerificationMethod", "ViolationCandidate", "ViolationContext", "acceptedRuleIds", "actionPriority", "admittingAlternatives", "allocationCohesion", "apMethod", "attributeTypeOf", "boxContracts", "bq01Unambiguous", "bq02Verifiable", "bq04Necessary", "bq06Conforming", "bq07Complete", "bw02WhiteboxWidth", "chainMetrics", "chainsByFunc", "cl01ConopsCompleteness", "contractsOfFlow", "cr01CrossingFlowCount", "crossingContractCount", "decomposedFuncs", "evaluateAFRules", "evaluateAORules", "evaluateAllRules", "evaluateBQRules", "evaluateCRRules", "evaluateConformanceRules", "evaluateFCRules", "evaluateFMRules", "evaluateMTRules", "evaluateNDRules", "evaluateRules", "evaluateSCRules", "evaluateUCRules", "evaluateViewRules", "extractFormatE", "fc02LeafUcHasFchain", "fc03FchainFlat", "fc04ActorBounded", "fc05ChainConnected", "flowProducers", "fm01MissingFmeaAttributes", "fm02MissingMitigation", "fm03HighRiskUnverified", "funcSimilarity", "funcSubtree", "functionCriticality", "getRuleDefsForProfile", "hydrateAttrValue", "importCoverage", "indexOf", "io01CrossModuleCompleteness", "isDue", "isElementUid", "isValidTrace", "jaccard", "markOfStage", "maxOccurs", "minOccurs", "moduleCrossings", "moduleMetrics", "mt01Instability", "mt02Lcom4", "mt04WhiteboxLcom4", "nd01FuncNearDuplicate", "nd02SchemaNearDuplicate", "nfr01BudgetOvershoot", "normalizeReqKinds", "pairsAbove", "parseElementUid", "readAnalysisStamp", "readFlowSync", "readRealRef", "readReqRole", "readTestRefs", "requirementScope", "riskCarriers", "sc02IsReferenced", "schemaSimilarity", "setBQ04SimilarityMatrix", "subtreeFuncs", "taskOf", "toElementUid", "toEvaluableGraph", "tokens", "traceRejection", "tryParseElementUid", "uc01HasRequirements", "uc02HasActor", "uc03HasScenario", "uc04GoalDefined", "unbuiltElementIds", "unwiredFuncs", "vr01TestNoResult", "whiteboxContractCount"];
28
28
  };
@@ -13,7 +13,7 @@ export const GRAMMAR_SNAPSHOT = {
13
13
  versions: {
14
14
  ontology: "11.0.0",
15
15
  metaModel: "6.0.0",
16
- rules: "41.0.0",
16
+ rules: "47.0.0",
17
17
  },
18
18
  elementTypes: [
19
19
  "ACTOR",
@@ -136,15 +136,14 @@ export const GRAMMAR_SNAPSHOT = {
136
136
  "CR-R02 (warning) domain=[CR] stage=10",
137
137
  "CR-R03 (warning) domain=[all] stage=immer",
138
138
  "FC-02 (warning) domain=[UC] stage=2",
139
- "FC-03 (warning) domain=[FUNC] stage=5",
139
+ "FC-03 (error) domain=[FUNC] stage=5",
140
140
  "FC-04 (warning) domain=[FCHAIN] stage=6",
141
- "FC-05 (warning) domain=[FCHAIN] stage=6",
141
+ "FC-05 (warning) domain=[FCHAIN] stage=6 role=existence",
142
142
  "FM-01 (warning) domain=[REQ] stage=3",
143
143
  "FM-02 (warning) domain=[REQ] stage=3",
144
144
  "FM-03 (warning) domain=[REQ] stage=9",
145
145
  "IO-01 (warning) domain=[FUNC] stage=5",
146
146
  "IO-02 (error) domain=[FLOW] stage=6",
147
- "IR-01 (warning) domain=[graph] stage=7 role=analysis",
148
147
  "MS-01 (warning) domain=[MS] stage=10",
149
148
  "MS-02 (warning) domain=[MS] stage=10",
150
149
  "MS-03 (info) domain=[CR] stage=10",
@@ -191,7 +190,6 @@ export const GRAMMAR_SNAPSHOT = {
191
190
  "RD-04 (warning) domain=[FUNC,MOD,SYS] stage=7",
192
191
  "RD-05 (warning) domain=[FUNC,MOD] stage=7",
193
192
  "SC-02 (warning) domain=[SCHEMA] stage=8",
194
- "TR-01 (warning) domain=[graph] stage=7 role=analysis",
195
193
  "UC-01 (warning) domain=[UC] stage=3 role=existence",
196
194
  "UC-02 (warning) domain=[UC] stage=2 role=existence",
197
195
  "UC-03 (warning) domain=[UC] stage=4 role=existence",
@@ -246,7 +244,6 @@ export const GRAMMAR_SNAPSHOT = {
246
244
  "FM-03",
247
245
  "IO-01",
248
246
  "IO-02",
249
- "IR-01",
250
247
  "MS-01",
251
248
  "MS-02",
252
249
  "MS-03",
@@ -293,7 +290,6 @@ export const GRAMMAR_SNAPSHOT = {
293
290
  "RD-04",
294
291
  "RD-05",
295
292
  "SC-02",
296
- "TR-01",
297
293
  "UC-01",
298
294
  "UC-02",
299
295
  "UC-03",
@@ -315,10 +311,9 @@ export const GRAMMAR_SNAPSHOT = {
315
311
  "CLOSED_STATUS",
316
312
  "CODE_CONFORMANCE_RULES",
317
313
  "CR_RULES",
314
+ "ChainMetrics",
318
315
  "CodeFactsSchema",
319
316
  "DEFAULT_METRIC_POLICY",
320
- "DIMENSION_READINESS_DELTA_NAME",
321
- "DIMENSION_READINESS_NAME",
322
317
  "ELEMENT_ATTRIBUTES",
323
318
  "ELEMENT_DESCRIPTIONS",
324
319
  "ElementType",
@@ -343,19 +338,16 @@ export const GRAMMAR_SNAPSHOT = {
343
338
  "OntologyElement",
344
339
  "OntologyGraph",
345
340
  "PHASE_READINESS_NAME",
346
- "READINESS_SCORED_PROFILES",
347
341
  "REQUIRED_PATTERNS",
348
342
  "RULES_VERSION",
349
343
  "RULE_HELP",
350
344
  "RULE_TASKS",
351
- "RULE_TO_DIMENSION",
352
- "ReadinessDimension",
353
- "ReadinessReport",
354
- "ReadinessScore",
355
345
  "RealRefSchema",
356
346
  "RepoRelativePathSchema",
357
347
  "ReqKind",
358
348
  "ReqRole",
349
+ "RequirementScope",
350
+ "RiskCarriers",
359
351
  "RuleSeverity",
360
352
  "RuleViolation",
361
353
  "SC_RULES",
@@ -363,7 +355,6 @@ export const GRAMMAR_SNAPSHOT = {
363
355
  "SteerSpace",
364
356
  "SteerTerm",
365
357
  "TASK_ENTRY",
366
- "TASK_OUTCOME_RULES",
367
358
  "TASK_OWNED_RULES",
368
359
  "TRACE_PATTERNS",
369
360
  "TestRefSchema",
@@ -382,7 +373,6 @@ export const GRAMMAR_SNAPSHOT = {
382
373
  "admittingAlternatives",
383
374
  "allocationCohesion",
384
375
  "apMethod",
385
- "assumptionReviewRequirementsExist",
386
376
  "attributeTypeOf",
387
377
  "boxContracts",
388
378
  "bq01Unambiguous",
@@ -391,8 +381,10 @@ export const GRAMMAR_SNAPSHOT = {
391
381
  "bq06Conforming",
392
382
  "bq07Complete",
393
383
  "bw02WhiteboxWidth",
384
+ "chainMetrics",
394
385
  "chainsByFunc",
395
386
  "cl01ConopsCompleteness",
387
+ "contractsOfFlow",
396
388
  "cr01CrossingFlowCount",
397
389
  "crossingContractCount",
398
390
  "decomposedFuncs",
@@ -408,7 +400,6 @@ export const GRAMMAR_SNAPSHOT = {
408
400
  "evaluateNDRules",
409
401
  "evaluateRules",
410
402
  "evaluateSCRules",
411
- "evaluateTaskOutcomeRules",
412
403
  "evaluateUCRules",
413
404
  "evaluateViewRules",
414
405
  "extractFormatE",
@@ -451,6 +442,8 @@ export const GRAMMAR_SNAPSHOT = {
451
442
  "readRealRef",
452
443
  "readReqRole",
453
444
  "readTestRefs",
445
+ "requirementScope",
446
+ "riskCarriers",
454
447
  "sc02IsReferenced",
455
448
  "schemaSimilarity",
456
449
  "setBQ04SimilarityMatrix",
@@ -460,13 +453,13 @@ export const GRAMMAR_SNAPSHOT = {
460
453
  "toEvaluableGraph",
461
454
  "tokens",
462
455
  "traceRejection",
463
- "tradeDecisionRecorded",
464
456
  "tryParseElementUid",
465
457
  "uc01HasRequirements",
466
458
  "uc02HasActor",
467
459
  "uc03HasScenario",
468
460
  "uc04GoalDefined",
469
461
  "unbuiltElementIds",
462
+ "unwiredFuncs",
470
463
  "vr01TestNoResult",
471
464
  "whiteboxContractCount",
472
465
  ],
@@ -5,7 +5,7 @@
5
5
  /** Ontology schema version (element types + trace types). */
6
6
  export declare const ONTOLOGY_VERSION = "11.0.0";
7
7
  /** Rules engine version (validation rules incl. RC conformance). */
8
- export declare const RULES_VERSION = "41.0.0";
8
+ export declare const RULES_VERSION = "47.0.0";
9
9
  /** Meta-model version (trace pattern constraints + format-e parser). */
10
10
  export declare const META_MODEL_VERSION = "6.0.0";
11
11
  export * from './ontology.js';
@@ -31,6 +31,8 @@ export * from './module-crossings.js';
31
31
  * Ausnahme, CR-SM-313) und es gibt nur EINEN Kettenbegriff im Paket.
32
32
  */
33
33
  export * from './function-criticality.js';
34
+ export * from './chain-metrics.js';
35
+ export * from './risk-carriers.js';
34
36
  export * from './quality-rules.js';
35
37
  export * from './analysis-freshness-rules.js';
36
38
  export * from './evaluate-all.js';