@sigloch/contracts 12.13.0 → 12.14.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.
@@ -14,17 +14,19 @@
14
14
  * Annahme), aktiviert nicht (CR-SM-422).
15
15
  * - Eingang = (ACTOR a, FLOW f, Glied c) mit a -io-> f -io-> c; seine Deckung = die von c aus
16
16
  * erreichbaren Glieder.
17
- * - Ausloeser: ein Eingang, dessen Deckung ganz M umfasst. Jeder andere Eingang, in dieser Reihenfolge:
17
+ * - Antwort (`answer`, CR-SM-438), vor allem anderen: f traegt `sync`, a bekommt aus der Kette nur Fluesse ohne
18
+ * `sync`, und mindestens einer davon kommt von einem Glied, das c erreicht — die Kette fragt, a antwortet.
19
+ * - Ausloeser: ein Eingang, der keine Antwort ist und dessen Deckung ganz M umfasst. Jeder andere Eingang, in dieser Reihenfolge:
18
20
  * `neighbor` (Ausloeser einer anderen Kette, die c ebenfalls enthaelt), `middle` (a bekam vorher aus
19
- * der Kette einen Fluss mit `sync`: Akteur in der Mitte, Schnitt bei c), `answer` (f traegt `sync`,
20
- * a bekommt aus der Kette nur Fluesse ohne `sync`), `predelivery` (f `async`, a bekommt nichts aus der
21
+ * der Kette einen Fluss mit `sync`: Akteur in der Mitte, Schnitt bei c), `predelivery` (f `async`, a bekommt nichts aus der
21
22
  * Kette), sonst `unknown`.
22
23
  * - Abschnitte: die Kette zerfaellt an jedem Glied, an dem ein Akteur in der Mitte eintritt; das Glied
23
24
  * gehoert zu beiden Seiten.
24
25
  *
25
26
  * Mehrere Ausloeser sind zulaessig, wenn alle am selben Glied mit demselben Vertrag (SCHEMA) andocken —
26
27
  * dann ist „wer startet" ein Feld im Vertrag (Freigabe des Autors 2026-10-28, im CR zitiert). FC-06
27
- * meldet die uebrigen Faelle. Rein ueber den Graphen, ohne `node:` — gve liest das im Browser.
28
+ * meldet die uebrigen Faelle und liest dafuer den Vertrag selbst: `chainRoles` liest kein SCHEMA (CR-SM-438),
29
+ * damit FC-04 auf Stufe 6 darauf bauen kann. Rein ueber den Graphen, ohne `node:` — gve liest das im Browser.
28
30
  *
29
31
  * @author andreas@siglochconsulting
30
32
  */
@@ -55,7 +57,5 @@ export interface ChainRoles {
55
57
  unreached: string[];
56
58
  /** Fluesse an einem Glied ohne lesbares `sync` — die Ableitung raet dort. */
57
59
  unsynced: string[];
58
- /** Mehrere Ausloeser an EINEM Glied mit EINEM Vertrag (oder hoechstens einer). */
59
- triggersAgree: boolean;
60
60
  }
61
61
  export declare function chainRoles(graph: OntologyGraph): ChainRoles[];
@@ -14,17 +14,19 @@
14
14
  * Annahme), aktiviert nicht (CR-SM-422).
15
15
  * - Eingang = (ACTOR a, FLOW f, Glied c) mit a -io-> f -io-> c; seine Deckung = die von c aus
16
16
  * erreichbaren Glieder.
17
- * - Ausloeser: ein Eingang, dessen Deckung ganz M umfasst. Jeder andere Eingang, in dieser Reihenfolge:
17
+ * - Antwort (`answer`, CR-SM-438), vor allem anderen: f traegt `sync`, a bekommt aus der Kette nur Fluesse ohne
18
+ * `sync`, und mindestens einer davon kommt von einem Glied, das c erreicht — die Kette fragt, a antwortet.
19
+ * - Ausloeser: ein Eingang, der keine Antwort ist und dessen Deckung ganz M umfasst. Jeder andere Eingang, in dieser Reihenfolge:
18
20
  * `neighbor` (Ausloeser einer anderen Kette, die c ebenfalls enthaelt), `middle` (a bekam vorher aus
19
- * der Kette einen Fluss mit `sync`: Akteur in der Mitte, Schnitt bei c), `answer` (f traegt `sync`,
20
- * a bekommt aus der Kette nur Fluesse ohne `sync`), `predelivery` (f `async`, a bekommt nichts aus der
21
+ * der Kette einen Fluss mit `sync`: Akteur in der Mitte, Schnitt bei c), `predelivery` (f `async`, a bekommt nichts aus der
21
22
  * Kette), sonst `unknown`.
22
23
  * - Abschnitte: die Kette zerfaellt an jedem Glied, an dem ein Akteur in der Mitte eintritt; das Glied
23
24
  * gehoert zu beiden Seiten.
24
25
  *
25
26
  * Mehrere Ausloeser sind zulaessig, wenn alle am selben Glied mit demselben Vertrag (SCHEMA) andocken —
26
27
  * dann ist „wer startet" ein Feld im Vertrag (Freigabe des Autors 2026-10-28, im CR zitiert). FC-06
27
- * meldet die uebrigen Faelle. Rein ueber den Graphen, ohne `node:` — gve liest das im Browser.
28
+ * meldet die uebrigen Faelle und liest dafuer den Vertrag selbst: `chainRoles` liest kein SCHEMA (CR-SM-438),
29
+ * damit FC-04 auf Stufe 6 darauf bauen kann. Rein ueber den Graphen, ohne `node:` — gve liest das im Browser.
28
30
  *
29
31
  * @author andreas@siglochconsulting
30
32
  */
@@ -37,7 +39,6 @@ export function chainRoles(graph) {
37
39
  const isAsync = (flow) => { const s = syncOf(flow); return s.state === 'bound' && s.value === 'async'; };
38
40
  const producersOf = (flow) => idx.in(flow, 'io').map((t) => t.source);
39
41
  const consumersOf = (flow) => idx.out(flow, 'io').map((t) => t.target);
40
- const schemaOf = (flow) => idx.out(flow, 'relation').map((t) => t.target).filter((id) => idx.typeOf(id) === 'SCHEMA').sort().join(',');
41
42
  const flowsOutOf = (id) => idx.out(id, 'io').map((t) => t.target).filter((f) => idx.typeOf(f) === 'FLOW');
42
43
  const flowsInto = (id) => idx.in(id, 'io').map((t) => t.source).filter((f) => idx.typeOf(f) === 'FLOW');
43
44
  const chains = idx.elementsOfType('FCHAIN').map((fc) => {
@@ -105,8 +106,18 @@ export function chainRoles(graph) {
105
106
  for (const f of [...flowsOutOf(m), ...flowsInto(m)])
106
107
  if (syncOf(f).state !== 'bound')
107
108
  unsynced.add(f);
108
- const full = (e) => members.every((m) => coverOf(e.member).has(m));
109
- return { fc, members, inChain, raw, sinks, unsynced: [...unsynced].sort(), coverOf, full };
109
+ // CR-SM-438: `answer` vor `trigger`. Der Akteur antwortet `sync` auf eine Anfrage ohne `sync` aus der Kette, und
110
+ // die Anfrage kommt VOR der Antwort: von einem Glied, von dem aus das Andock-Glied erreichbar ist. Ohne die
111
+ // Reihenfolge waere der Nutzer, der `sync` startet und das Ergebnis `async` bekommt, auch ein Antwortender. Dockt
112
+ // die Antwort am ersten Glied an, erreicht sie alle Glieder und galt vorher als zweiter Ausloeser.
113
+ const answer = (e) => {
114
+ if (!isSync(e.flow))
115
+ return false;
116
+ const asked = sinks.filter((s) => s.actor === e.actor);
117
+ return asked.length > 0 && !asked.some((s) => isSync(s.flow)) && asked.some((s) => coverOf(s.member).has(e.member));
118
+ };
119
+ const full = (e) => !answer(e) && members.every((m) => coverOf(e.member).has(m));
120
+ return { fc, members, inChain, raw, sinks, unsynced: [...unsynced].sort(), coverOf, full, answer };
110
121
  });
111
122
  // Ausloeser je Kette zuerst — `neighbor` fragt nach den Ausloesern der ANDEREN Ketten.
112
123
  const triggerFlows = new Map(chains.map((c) => [c.fc.id, new Set(c.raw.filter(c.full).map((e) => `${e.flow} ${e.member}`))]));
@@ -116,6 +127,8 @@ export function chainRoles(graph) {
116
127
  const scope = triggers.length > 0 ? reachedByTrigger : new Set(c.members);
117
128
  const fromChain = (actor) => c.sinks.filter((s) => s.actor === actor && scope.has(s.member)).map((s) => s.flow);
118
129
  const entries = c.raw.map((e) => {
130
+ if (c.answer(e))
131
+ return { ...e, role: 'answer' };
119
132
  if (c.full(e))
120
133
  return { ...e, role: 'trigger' };
121
134
  const neighbor = chains.some((o) => o.fc.id !== c.fc.id && o.inChain.has(e.member) && triggerFlows.get(o.fc.id).has(`${e.flow} ${e.member}`));
@@ -124,8 +137,6 @@ export function chainRoles(graph) {
124
137
  const received = fromChain(e.actor);
125
138
  if (received.some(isSync))
126
139
  return { ...e, role: 'middle' };
127
- if (isSync(e.flow) && received.length > 0)
128
- return { ...e, role: 'answer' };
129
140
  if (isAsync(e.flow) && received.length === 0)
130
141
  return { ...e, role: 'predelivery' };
131
142
  return { ...e, role: 'unknown' };
@@ -144,7 +155,6 @@ export function chainRoles(graph) {
144
155
  if (rest.size > 0)
145
156
  segments.push([...rest].sort());
146
157
  const reached = new Set(c.raw.flatMap((e) => [...c.coverOf(e.member)]));
147
- const keys = new Set(triggers.map((e) => `${e.member} ${schemaOf(e.flow)}`));
148
158
  return {
149
159
  chainId: c.fc.id,
150
160
  members: c.members,
@@ -153,7 +163,6 @@ export function chainRoles(graph) {
153
163
  segments,
154
164
  unreached: c.members.filter((m) => !reached.has(m)),
155
165
  unsynced: c.unsynced,
156
- triggersAgree: keys.size <= 1,
157
166
  };
158
167
  });
159
168
  }
@@ -42,7 +42,7 @@ export function fc03FchainFlat(graph) {
42
42
  severity: 'error',
43
43
  element_id: fn.id,
44
44
  message: `${fn.id} composes other FUNC and satisfies ${reqs.join(', ')} (a block carries no requirement)`,
45
- 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',
45
+ fix_hint: 'Split the requirement into one child REQ per leaf function (REQ compose REQ), each satisfied by its leaf; or the requirement is non-functional and belongs to the MOD, FCHAIN or SYS',
46
46
  context: { element_type: 'FUNC', element_name: fn.name },
47
47
  });
48
48
  }
@@ -61,39 +61,33 @@ export function fc03FchainFlat(graph) {
61
61
  // to have unrelated ACTOR io.
62
62
  // ---------------------------------------------------------------------------
63
63
  export function fc04ActorBounded(graph) {
64
- // CR-SM-264: die beiden Zwischenmengen einmal je Graph statt |io|^2 je Kette.
65
- // `actorFed` sind die Knoten, in die ein ACTOR hineinschickt, `actorConsumed` die, aus denen
66
- // ein ACTOR liest. Beide Richtungen bleiben getrennt — anders als bei FC-01, das nur fragt,
67
- // OB ein ACTOR anliegt; FC-04 verlangt Eingang UND Ausgang.
64
+ // CR-SM-438: Eingang und Ausgang aus `chainRoles` statt aus eigenen Mengen. Ein Akteur, dessen Eingaenge in die
65
+ // Kette alle die Rolle `answer` tragen, ist kein Empfaenger: die Anfrage an ihn ist kein Ausgang der Kette. Vorher
66
+ // erfuellte die Anfrage an einen antwortenden Dienst (PropStack) den Ausgang allein.
68
67
  const idx = indexOf(graph);
69
- const io = idx.tracesOfType('io');
70
- const actorFed = new Set();
71
- const actorConsumed = new Set();
72
- for (const a of io) {
73
- if (idx.typeOf(a.source) === 'ACTOR')
74
- actorFed.add(a.target);
75
- if (idx.typeOf(a.target) === 'ACTOR')
76
- actorConsumed.add(a.source);
77
- }
78
- return idx.elementsOfType('FCHAIN')
79
- .filter(fc => {
80
- const funcIds = new Set(idx.out(fc.id, 'compose').map(t => t.target).filter(id => idx.typeOf(id) === 'FUNC'));
81
- if (funcIds.size === 0)
68
+ return chainRoles(graph)
69
+ .filter(r => {
70
+ if (r.members.length === 0)
82
71
  return false; // R-15 already flags the empty-chain case
83
- // Entry: ACTOR→FLOW→FUNC∈chain (something triggers the chain).
84
- const entry = io.some(e => funcIds.has(e.target) && idx.typeOf(e.source) === 'FLOW' && actorFed.has(e.source));
85
- // Exit: FUNC∈chain→FLOW→ACTOR (the chain produces something back to an actor).
86
- const exit = io.some(e => funcIds.has(e.source) && idx.typeOf(e.target) === 'FLOW' && actorConsumed.has(e.target));
72
+ const answerOnly = new Set(r.entries.filter(e => e.role === 'answer').map(e => e.actor));
73
+ for (const e of r.entries)
74
+ if (e.role !== 'answer')
75
+ answerOnly.delete(e.actor);
76
+ const entry = r.entries.length > 0;
77
+ const exit = r.sinks.some(s => !answerOnly.has(s.actor));
87
78
  return !(entry && exit);
88
79
  })
89
- .map(fc => ({
90
- rule_id: 'FC-04',
91
- severity: 'warning',
92
- element_id: fc.id,
93
- message: `${fc.id} is not actor-bounded (needs an ACTOR trigger into AND an ACTOR consumer out of the chain)`,
94
- fix_hint: 'Link an ACTOR→FLOW→FUNC entry and a FUNC→FLOW→ACTOR exit for at least one FUNC in the chain',
95
- context: { element_type: fc.type, element_name: fc.name },
96
- }));
80
+ .map(r => {
81
+ const fc = idx.byId.get(r.chainId);
82
+ return {
83
+ rule_id: 'FC-04',
84
+ severity: 'warning',
85
+ element_id: fc.id,
86
+ message: `${fc.id} is not actor-bounded (needs an ACTOR trigger into AND an ACTOR consumer out of the chain)`,
87
+ fix_hint: 'Link an ACTOR→FLOW→FUNC entry and a FUNC→FLOW→ACTOR exit for at least one FUNC in the chain; an actor that only answers a request of the chain is no consumer',
88
+ context: { element_type: fc.type, element_name: fc.name },
89
+ };
90
+ });
97
91
  }
98
92
  // ---------------------------------------------------------------------------
99
93
  // FC-05: FCHAIN ist gerichtet zusammenhaengend (CR-SM-363).
@@ -254,6 +248,9 @@ export function fc06OneTrigger(graph) {
254
248
  context: { element_type: fc.type, element_name: fc.name },
255
249
  });
256
250
  const triggers = r.entries.filter((e) => e.role === 'trigger');
251
+ // Mehrere Ausloeser stimmen ueberein, wenn sie am selben Glied mit demselben Vertrag andocken (CR-SM-420).
252
+ const schemaOf = (flow) => idx.out(flow, 'relation').map((t) => t.target).filter((id) => idx.typeOf(id) === 'SCHEMA').sort().join(',');
253
+ const triggersAgree = new Set(triggers.map((e) => `${e.member} ${schemaOf(e.flow)}`)).size <= 1;
257
254
  const vorab = r.entries.filter((e) => e.role === 'predelivery');
258
255
  if (r.unsynced.length > 0) {
259
256
  push('unsynced', `${fc.id}: flows without sync, the trigger cannot be derived (${r.unsynced.join(', ')})`, 'Set `@sync sync` (the receiver waits for it) or `@sync async` (delivered beforehand) on each flow');
@@ -265,7 +262,7 @@ export function fc06OneTrigger(graph) {
265
262
  const reach = r.unreached.length > 0 ? `unreached: ${r.unreached.join(', ')}` : 'each entry reaches only a part';
266
263
  push('no-trigger', `${fc.id} has no trigger: no entry reaches every member (${reach})`, 'Connect the unreached members with a FLOW from the chain, or split the chain — one FCHAIN per trigger');
267
264
  }
268
- else if (!r.triggersAgree) {
265
+ else if (!triggersAgree) {
269
266
  const list = triggers.map((e) => `${e.actor} via ${e.flow} at ${e.member}`);
270
267
  push('triggers-disagree', `${fc.id} has ${triggers.length} triggers at different members or with different contracts (${list.join('; ')})`, 'Several actors may start one chain only at the same member with the same SCHEMA — otherwise give each trigger its own FCHAIN');
271
268
  }
@@ -13,7 +13,7 @@ export declare const GRAMMAR_SNAPSHOT: {
13
13
  readonly versions: {
14
14
  readonly ontology: "13.0.0";
15
15
  readonly metaModel: "6.0.0";
16
- readonly rules: "50.1.0";
16
+ readonly rules: "53.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"];
@@ -21,9 +21,9 @@ export declare const GRAMMAR_SNAPSHOT: {
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.maxFiles: number", "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
23
  readonly enums: readonly ["CR.status=done", "CR.status=open", "FLOW.sync=async", "FLOW.sync=sync", "OntologyElement.kinds=functional", "OntologyElement.kinds=non-functional", "OntologyElement.method=analysis", "OntologyElement.method=demonstration", "OntologyElement.method=inspection", "OntologyElement.method=test", "OntologyElement.status=done", "OntologyElement.status=draft", "OntologyElement.status=open", "OntologyElement.status=reviewed", "REQ.role=mitigation", "REQ.role=risk"];
24
- 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-03 (warning) domain=[REQ] stage=3", "BQ-04 (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-R03 (warning) domain=[all] stage=immer", "FC-03 (error) domain=[FUNC] stage=5", "FC-04 (warning) domain=[FCHAIN] stage=6", "FC-05 (warning) domain=[FCHAIN] stage=6 role=existence", "FC-06 (warning) domain=[FCHAIN] stage=8", "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", "R-35 (error) domain=[FUNC] stage=7", "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", "RC-11 (warning) domain=[SYS] stage=12", "RC-12 (warning) domain=[FLOW] stage=12", "RC-13 (warning) domain=[FUNC] 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", "UC-07 (warning) domain=[FCHAIN,UC] stage=4", "VR-01 (info) domain=[TEST] stage=11"];
24
+ 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-03 (warning) domain=[REQ] stage=3", "BQ-04 (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-R03 (warning) domain=[all] stage=immer", "FC-03 (error) domain=[FUNC] stage=5", "FC-04 (warning) domain=[FCHAIN] stage=6", "FC-05 (warning) domain=[FCHAIN] stage=6 role=existence", "FC-06 (warning) domain=[FCHAIN] stage=8", "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=8 role=existence", "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", "R-35 (error) domain=[FUNC] stage=7", "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", "RC-11 (warning) domain=[SYS] stage=12", "RC-12 (warning) domain=[FLOW] stage=12", "RC-13 (warning) domain=[FUNC] 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", "RD-06 (warning) domain=[REQ] stage=3", "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", "UC-07 (warning) domain=[FCHAIN,UC] stage=4", "VR-01 (info) domain=[TEST] stage=11"];
25
25
  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)", "RC-11 (warning)", "RC-12 (warning)", "RC-13 (warning)"];
26
26
  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}", "needNameTerms = [\"KI\",\"MCP\",\"Gate\",\"Lauf\",\"Ziel\"]", "riskRpn = 100"];
27
- readonly ruleHelp: readonly ["AF-01", "AF-02", "AF-03", "AF-04", "AF-05", "BQ-01", "BQ-02", "BQ-03", "BQ-04", "BQ-07", "BW-02", "CL-01", "CR-01", "CR-R01", "CR-R03", "FC-03", "FC-04", "FC-05", "FC-06", "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", "R-35", "RC-01", "RC-02", "RC-03", "RC-04", "RC-05", "RC-06", "RC-07", "RC-08", "RC-09", "RC-10", "RC-11", "RC-12", "RC-13", "RD-01", "RD-02", "RD-04", "RD-05", "SC-02", "UC-01", "UC-02", "UC-03", "UC-04", "UC-07", "VR-01"];
27
+ readonly ruleHelp: readonly ["AF-01", "AF-02", "AF-03", "AF-04", "AF-05", "BQ-01", "BQ-02", "BQ-03", "BQ-04", "BQ-07", "BW-02", "CL-01", "CR-01", "CR-R01", "CR-R03", "FC-03", "FC-04", "FC-05", "FC-06", "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", "R-35", "RC-01", "RC-02", "RC-03", "RC-04", "RC-05", "RC-06", "RC-07", "RC-08", "RC-09", "RC-10", "RC-11", "RC-12", "RC-13", "RD-01", "RD-02", "RD-04", "RD-05", "RD-06", "SC-02", "UC-01", "UC-02", "UC-03", "UC-04", "UC-07", "VR-01"];
28
28
  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", "CallEdgeSchema", "CallSiteSchema", "ChainMetrics", "CodeFactsSchema", "ConstraintCarriers", "DEFAULT_METRIC_POLICY", "ELEMENT_ATTRIBUTES", "ELEMENT_DEFINITIONS", "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_DEFINITIONS", "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", "bq03Singular", "bq04Necessary", "bq07Complete", "bw02WhiteboxWidth", "callCoverage", "chainMetrics", "chainRoles", "chainsByFunc", "cl01ConopsCompleteness", "constraintCarriers", "contractsOfFlow", "cr01CrossingFlowCount", "crossingContractCount", "decomposedFuncs", "evaluateAFRules", "evaluateAORules", "evaluateAllRules", "evaluateBQRules", "evaluateCRRules", "evaluateConformanceRules", "evaluateFCRules", "evaluateFMRules", "evaluateMTRules", "evaluateNDRules", "evaluateRules", "evaluateSCRules", "evaluateUCRules", "evaluateViewRules", "extractFormatE", "fc03FchainFlat", "fc04ActorBounded", "fc05ChainConnected", "fc06OneTrigger", "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", "uc07NameStatesNeed", "unbuiltElementIds", "unwiredFuncs", "vr01TestNoResult", "whiteboxContractCount"];
29
29
  };
@@ -13,7 +13,7 @@ export const GRAMMAR_SNAPSHOT = {
13
13
  versions: {
14
14
  ontology: "13.0.0",
15
15
  metaModel: "6.0.0",
16
- rules: "50.1.0",
16
+ rules: "53.0.0",
17
17
  },
18
18
  elementTypes: [
19
19
  "ACTOR",
@@ -186,7 +186,7 @@ export const GRAMMAR_SNAPSHOT = {
186
186
  "R-21 (warning) domain=[FCHAIN,FUNC] stage=9",
187
187
  "R-22 (warning) domain=[FUNC] stage=7 role=existence",
188
188
  "R-23 (warning) domain=[MOD] stage=7",
189
- "R-26 (warning) domain=[SCHEMA] stage=11",
189
+ "R-26 (warning) domain=[SCHEMA] stage=8 role=existence",
190
190
  "R-29 (error) domain=[TEST] stage=11",
191
191
  "R-30 (warning) domain=[FUNC] stage=5",
192
192
  "R-31 (warning) domain=[FUNC] stage=6 role=existence",
@@ -210,6 +210,7 @@ export const GRAMMAR_SNAPSHOT = {
210
210
  "RD-02 (warning) domain=[REQ] stage=3",
211
211
  "RD-04 (warning) domain=[FUNC,MOD,SYS] stage=7",
212
212
  "RD-05 (warning) domain=[FUNC,MOD] stage=7",
213
+ "RD-06 (warning) domain=[REQ] stage=3",
213
214
  "SC-02 (warning) domain=[SCHEMA] stage=8",
214
215
  "UC-01 (warning) domain=[UC] stage=3 role=existence",
215
216
  "UC-02 (warning) domain=[UC] stage=2 role=existence",
@@ -318,6 +319,7 @@ export const GRAMMAR_SNAPSHOT = {
318
319
  "RD-02",
319
320
  "RD-04",
320
321
  "RD-05",
322
+ "RD-06",
321
323
  "SC-02",
322
324
  "UC-01",
323
325
  "UC-02",
@@ -5,7 +5,7 @@
5
5
  /** Ontology schema version (element types + trace types). */
6
6
  export declare const ONTOLOGY_VERSION = "13.0.0";
7
7
  /** Rules engine version (validation rules incl. RC conformance). */
8
- export declare const RULES_VERSION = "50.1.0";
8
+ export declare const RULES_VERSION = "53.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';
package/dist/se/index.js CHANGED
@@ -5,7 +5,7 @@
5
5
  /** Ontology schema version (element types + trace types). */
6
6
  export const ONTOLOGY_VERSION = '13.0.0'; // MAJOR (CR-SM-440): das Attribut `CR.architectureOnly` entfaellt ersatzlos (Entscheidung des Auftraggebers 2026-10-07 in CR-GC-755, Freigabe 2026-11-14); sein einziger Leser war CR-R02. Formal breaking wie CR-SM-393, am Bestand folgenlos: ein Graph mit dem Attribut laedt weiter, `attributes` ist ein freier Sack, R-08 prueft nur die Spalten von `OntologyElement` (Test `cr-commitref-entfaellt`). Prior: // MAJOR (CR-SM-439): `ELEMENT_DESCRIPTIONS` entfaellt ersatzlos, an seine Stelle tritt `ELEMENT_DEFINITIONS` (je ElementType Name, Satz, Beispiele aus der Paketstation, Gegenbeispiel mit Grund, Quelle) samt `TRACE_DEFINITIONS` (je TraceType Name und Bedeutung); Entscheidung des Autors 2026-11-13. Die alten Etiketten widersprachen dem Artefakt (FCHAIN „UC->FN Verknuepfung“, SCHEMA „Datenschema (Zod)“). Kein Alias. Einziger Leser ausserhalb contracts: graphcode `tests/claims.conformance.test.ts` (zaehlt die Schluessel; Nachzug beim Upgrade, `Object.keys(ELEMENT_DEFINITIONS).length`). Bestand der Graphen unberuehrt: keine Element- oder Kantenart und kein Attribut aendert sich. Prior: // MINOR (CR-SM-426): +`CR.attributes.maxFiles: number` — stand in 100 CR-Knoten der Familie, kam ueber Format-E aber als String zurueck, weil die Deklaration fehlte. `concept` und `deferred` bleiben undeklariert (CR-SM-393: wirkungslos, kein Leser). Prior: MAJOR (CR-SM-393): das Attribut `concept` entfaellt an TEST, REQ, FUNC, MOD und SCHEMA (Entscheidung des Autors 2026-10-05: Konzept war nur als Zwischenstand gedacht, um mitten im Bau nicht mit Fehlermeldungen ueberhaeuft zu werden; gemessen setzt der lokale Agent es an JEDES Element). Ein Bestandsgraph, der es traegt, laedt weiter: `attributes` ist ein freier Sack, das Attribut ist wirkungslos; ueber Format-E kommt `@concept true` jetzt als String an (kein deklarierter Typ). Bestand: 444 Elemente in 23 von 35 Graphen tragen es (TEST 221, FUNC 113, SCHEMA 99, MOD 11, REQ 0). Prior: // MINOR (CR-SM-391): +`REQ.attributes.concept: boolean` — das fuenfte Element mit dem Schalter (TEST, FUNC, MOD, SCHEMA). Gelesen von R-01: nur eine Konzept-REQ darf ausschliesslich Konzept-TESTs tragen. Anders als an den vier anderen ist er KEINE Ausnahme von einer Bindungspflicht (eine REQ hat keinen realRef), sondern die Erklaerung, dass der Nachweis noch nicht faellig ist; ein `verify` braucht auch sie. Bestand: kein Graph der Familie traegt `concept` an einer REQ (35 Graphen, gemessen 2026-10-05), keine Migration. Prior: // MINOR (CR-SM-386): +`CR.attributes.architectureOnly: boolean`. CR-R02 las den Schalter identitaetsscharf (`=== true`), er stand aber nicht in ELEMENT_ATTRIBUTES — die typ-geleitete Hydrierung (CR-SM-251) liess `@architectureOnly true` als String "true" stehen, die Ausnahme war ueber Format-E unerreichbar. Bestand: bereits gespeicherte Strings "true" bleiben im Store Strings, bis der Knoten neu geschrieben oder per Export-Reimport hydriert wird; keine Migration. Prior: // BREAKING innerhalb des unveroeffentlichten 10.x (CR-SM-366): `ReqKind` 6 -> 2 Werte {functional, non-functional}, genau EIN Wert je REQ. Entfallen: precondition/postcondition (Vorbedingung = Eingangs-FLOW der Kette, Nachbedingung = UC-Ziel, geprueft ueber R-21; Leser UC-05/06 seit CR-SM-357 weg) und risk/mitigation (-> `REQ.attributes.role`, CR-SM-365). Die Zeichenkette bleibt 10.1.0: die Enum-WERTE stehen in keiner Oberflaeche von grammar-snapshot.ts (nur die Spalte `OntologyElement.kinds`), `check:grammar` verlangt also keine Bewegung; gegen die Registry (9.1.0) ist 10.x der eine Major dieses Zugs. Migration (graphcode CR-GC-669): pre/post-REQ je REQ auf functional|non-functional oder aufloesen, risk/mitigation -> role. Prior: // MINOR (CR-SM-365): +`REQ.attributes.role` (Enum `ReqRole` risk|mitigation, Leser `readReqRole`) — die FMEA-Rolle einer Anforderung, satisfy-neutral. Reine Ergaenzung an der Oberflaeche (ReqKind unveraendert; die Entfernung von risk/mitigation aus `kinds` ist CR-SM-366). Kein eigener Major: 10.0.0 ist unveroeffentlicht (Registry 9.1.0), 10.x ist EIN Major gegen die Registry; `check:grammar` vergleicht je Commit gegen HEAD und erzwingt daher eine Bewegung der Zeichenkette. Prior: // MAJOR (CR-SM-364): FLOW traegt genau ein Realisierungsattribut `sync` (Enum sync|async, fehlend = unbekannt, kein Default; Leser `readFlowSync`, Enum `FlowSync`). `protocol` und `qos` entfallen — formal breaking, am Bestand folgenlos: 0 von 186 Familien-FLOWs (bok, SM, GVE, GC, graphify) setzen eines davon, kein Leser ausser ontology.ts/grammar-snapshot.ts. Prior: // MINOR (CR-SM-355): `AnalysisFreshnessStampSchema.crRefs?: string[]` — die aus einem Task hervorgegangenen CRs, atomar mit dem Stempel; TR-01/IR-01 lesen es. Prior: // BREAKING (CR-SM-294): das Feld `asil` entfaellt ersatzlos, zusammen mit dem Enum `AsilLevel`. Sein einziger Leser war R-03 (ASIL isolation), und die Messung ueber 19 Familiengraphen (4540 Elemente) zeigt: 0 von 305 MOD tragen `asil` ueberhaupt. Ein Feld ohne Schreiber ist eine Regel, die nie feuert -- Gate 3 der Grammatik-Review. Mit R-03 fallen im selben Zug RT-01, PH-01, R-27 (alle drei lesen `attributes.kind === 'physical'`, 0 von 305 MOD tragen es) und CA-01 (`attributes.requires` / `attributes.capability`, 0/0). Die physische Ebene der Ontologie war nie in Gebrauch: kein Mitglied der Familie modelliert Hardware oder funktionale Sicherheit. `kind`, `requires` und `capability` brauchen KEINEN Schema-Eingriff -- sie lagen im freien `attributes`-Sack und sind nach der Streichung ihrer Leser schlicht unbenutzte Schluessel. Migration: ein Graph, der `asil` traegt, verliert das Feld beim naechsten Reseed; kein Element und keine Kante faellt (0 -> 0 Befunde ueber alle 19 Graphen). Prior: BREAKING (CR-SM-266a): drei Enums schrumpfen, und alle drei sind ENTFERNUNGEN. (1) ElementType 13 -> 12: `SESSION` entfaellt. (2) TraceType 7 -> 6: `produces` entfaellt. Beide trugen genau EIN Pattern (`SESSION -produces-> *`), und die Messung hat es widerlegt: 0 produces-Kanten und 0 SESSION-Knoten in ALLEN 9 aktiven Familie-Graphen, auch im graphcode-Selbstmodell nach 195 gegateten Versionen. Die reale Provenance lebt seit CR-GC-347 in `.graphcode/audit.jsonl` -- audit_trail/audit_stats lesen die DATEI, nie den Graphen; einziger Schreiber war ein toter Pfad (CR-195d in graph-api-core), Leser mit Wirkung keiner. Der urspruengliche CR-Entwurf hielt das Pattern fuer die Provenance-Kante und wollte es BEHALTEN ('Nicht-Befund'); die Zaehlung hat den Nicht-Befund kassiert -- Gate 1 verlangt fuer das Wiederaufmachen einer Entscheidung eine Messung, und hier war sie es. (3) Mit `produces` faellt `TraceCategory` und `Trace.category`. Das ist die wichtigste Haelfte: R-08 und R-18 haben `category === 'audit'` UEBERSPRUNGEN, also haette nach D5 jede Kante mit diesem selbstgesetzten Attribut die komplette Pattern-Matrix UND die Referenzintegritaet umgangen. Ein Attribut, das eine Strukturpruefung abschaltet, ist die Klasse aus CR-SM-263/-257; hier zusaetzlich der billige Zweitweg aus CR-GC-366, nur ohne Kante. Gemessen: 0 von 0 Traces aller 9 Graphen tragen `category` -- die Entfernung nimmt niemandem etwas weg. (4) ReqKind 7 -> 6: `negative` entfaellt. Ein Verbots-REQ ist auch eine Anforderung -- die Implementierung muss Regeln abfragen oder Sicherungen einbauen, das ist `functional`. Der Wert hatte NULL Leser (anders als risk/mitigation -> FM-01..03, pre/postcondition -> UC-05/06, non-functional -> NFR-01) und haette durch die neuen where-Praedikate per AUSLASSUNG erstmals Wirkung bekommen: er stand in keiner der vier Listen und waere nur noch per FCHAIN erfuellbar gewesen. Die sechs verbleibenden Werte partitionieren die where-Listen VOLLSTAENDIG. Migration `negative`: 3 REQs, alle graphcode, Ziel-kind je REQ statt pauschal -- REQ-dashboard-readonly und REQ-readonly-bridge nach `non-functional` (Architektur-Constraint an der Modulgrenze, konsistent mit D2), REQ-no-extraction nach `functional`. Rest-Reject dabei: genau 1 (`FUNC-serve-sse -satisfy-> REQ-readonly-bridge`), aufzuloesen durch Loeschen oder Heben auf die FCHAIN. Prior: BREAKING (CR-GC-366): das Trace-Pattern `FUNC -satisfy-> UC` entfaellt ersatzlos. Es war ein zweiter Weg vom Verhalten zum Use Case neben dem einzig tragenden `UC -compose-> FCHAIN -compose-> FUNC` — und der billigere: eine FUNC konnte einen UC bedienen, ohne in dessen Wirkkette zu stehen, womit IO-01 (FLOW-Pfade je Kettenpaar) und R-21 (Integrationstest je Kette) sie nie sahen. Die Abkuerzung umging genau die Pruefungen, die die Anbindung belastbar machen. Am graphcode-Selbstmodell waren 10 der 26 solchen Kanten reine Dopplung (die FUNC stand ohnehin in der FCHAIN), die restlichen 13 sind der Migrationsanlass. Jeder Graph mit solchen Kanten faellt jetzt R-18 (error) zur Last und muss migriert werden: FUNC in die FCHAIN des UC aufnehmen, satisfy-Kante loeschen. Prior: BREAKING (CR-SM-231b): das knotenweite `testResult` entfaellt — das Ergebnis haengt PRO `testRefs`-Eintrag (`result`, `ranAt`, `evidence`), aus demselben Grund wie `tool`. Ein einzelnes Ergebnis am Knoten konnte bei n Laeufen nicht sagen, welcher gemeint ist, und "einer rot, einer gruen" war gar nicht darstellbar — genau der Zustand, den ein Gate wissen muss. FM-03 liest jetzt "jeder Eintrag passed": "irgendeiner gruen" haette einen gruenen Unit-Lauf einen roten Visual-Lauf verdecken lassen. Ein Eintrag ohne Ergebnis ist nicht bestanden. VR-01 meldet die Dateien ohne Ergebnis statt nur den Knoten. Prior: BREAKING (CR-SM-231): `testRef` (Objekt) entfaellt ersatzlos zugunsten von `testRefs` (Array, min 1) — eine Abnahme, n Testdateien. Kein Union, kein Alias: ein Graph mit dem alten Attribut faellt R-19 zur Last und muss migriert werden. Anlass war ein Zaehl-Audit (537 laufende Tests in 67 Dateien, 14 TEST-Knoten mit je genau einer Datei, 53 Dateien an keine Abnahme gebunden) plus ein belegter Ausweichweg: dieselbe Spec-Datei stand im testRef ZWEIER TEST-Knoten, womit die Relation faktisch n:m war — ein roter Lauf keiner Abnahme mehr eindeutig zuordenbar, der TRR-Gate zaehlte dieselbe Evidenz doppelt. `tool` bleibt PRO EINTRAG: eine Abnahme mischt real die Runner (vitest + playwright). +AttributeSpec.type 'array' (testRefs ist das erste Listen-Attribut). Prior: BREAKING: `SemanticId` (`Name.TypeAbbr.Counter`) deleted, `ElementUid` (`<TYPE>-<slug>`) is the family canon — the old canon was used by no production graph of the family while 626 of 1145 elements already carried TYPE-slug (CR-SM-217); realRef unifies codeRef+schemaRef (+physical-MOD CAD ref), symbol optional; testRef stays separate (CR-228 C); +RepoRelativePathSchema on testRef/realRef .file — no absolute/`..` paths (CR-GC-255)
7
7
  /** Rules engine version (validation rules incl. RC conformance). */
8
- export const RULES_VERSION = '50.1.0'; // MINOR (CR-SM-440): CR-R02 „Done requires commit“ entfaellt (Entscheidung des Auftraggebers 2026-10-07 in CR-GC-755, Freigabe 2026-11-14: der Commit steht in git und ist ueber die Auftragsnummer auffindbar). MINOR wie bei BQ-06 (CR-SM-433) und FC-02 (CR-SM-412): kein Urteil wird strenger, nur ein Befund faellt weg; keine Marke aendert sich. Die Kennung wird nicht wiederverwendet. Entfernt: `RULE_HELP['CR-R02']`, `ALL_RULE_DEFS` 81 -> 80 Regeln, Eintrag in der Klassifikation von se-engine. `status` am CR bleibt. Prior: // MAJOR (CR-SM-434): neue Warnung UC-07 „Name states the need“ (UC- und FCHAIN-Name ohne Woerter aus `policy.needNameTerms`, Vorgabe KI, MCP, Gate, Lauf, Ziel) und neues PFLICHTFELD `needNameTerms` an `MetricPolicy` (Praezedenz CR-SM-283, CR-SM-314: ein Host mit vollstaendiger Policy, z. B. graphcode.config.jsonc, muss das Feld setzen). Das Urteil wird strenger: an 37 Modelldateien der Familie ohne eigene Liste 8 neue Warnungen (Lauf 4, Gate 3, Ziel 1). Davor 49.4.0: MINOR (CR-SM-433): BQ-06 „Conforming“ entfaellt (Entscheidung des Autors 2026-11-11, CR-SM-431: ein Modalverb sagt nichts ueber die Qualitaet, „Das System muss robust sein“ besteht die Regel). Am graphcode-Modell meldete sie 165 von 198 Anforderungen. MINOR wie bei FC-02 (CR-SM-412), nicht MAJOR wie bei TR-01 (CR-SM-400): kein Urteil wird strenger, nur ein Befund faellt weg, und kein Modell bekommt dadurch einen neuen; keine Marke aendert sich (BQ-06 war warning, Stufe 3, ohne Rolle). Kein Sachverhalt geht verloren: die REQ ohne `description` meldet BQ-07 weiter, das Modalverb zaehlt BQ-03 weiter. Gemessen am graphcode-Modell: BQ-06 165 -> 0, BQ-02 66, BQ-03 6 und BQ-07 0 unveraendert, Befunde gesamt 740 -> 577. Am Selbstmodell (SSOT) 11 -> 0. Entfernt: Export `bq06Conforming`, `RULE_HELP['BQ-06']`, `ALL_RULE_DEFS` 81 -> 80 Regeln, Task `anforderungsqualitaet` 6 -> 5 Regeln. Kein Leser des Exports in graphcode, graph-view-edit, graphify (src, scripts); graphcode-Tests, die BQ-06 nennen, zieht graphcode beim Upgrade nach. Prior: MINOR (CR-SM-430, CR-SM-432): BQ-02 prueft nur REQ mit `kinds: non-functional` (eine funktionale wird am Ergebnis geprueft, eine ohne `kinds` meldet BQ-07; graphcode-Modell 160 -> 66 Befunde), und die neue Regel BQ-03 „Singular“ (warning, Stufe 3, Domaene REQ) meldet eine REQ mit mehr als einer Zusage, gezaehlt ueber die Modalverben shall, must, must not, soll, muss, darf nicht (graphcode-Modell: 6 REQ). Kein neues Attribut. Das Urteil von BQ-02 wird schwaecher, kein Modell bekommt einen Befund weniger als Fehler. Prior: MINOR (CR-SM-420): neue Regel FC-06 (warning, Stufe 8, Domaene FCHAIN) — die Kette hat EINEN Ausloeser, abgeleitet aus io-Kanten und `sync` (`chainRoles`); mehrere Ausloeser nur am selben Glied mit demselben Vertrag (Freigabe des Autors 2026-10-28). Kein neues Attribut. Prior: MINOR (CR-SM-415): zwei neue Regeln, beide warning, Stufe 12 — RC-12 („Sync flow has a call“, Domaene FLOW: ein FLOW mit `sync: sync` ohne Aufrufweg zwischen Erzeuger- und Abnehmer-FUNC, hoechstens 3 Kanten, eine der beiden Richtungen, oder ohne gueltigen Beleg `FLOW.realRef`) und RC-13 („Call between anchored functions has a flow“, Domaene FUNC: ein Aufrufweg zwischen zwei verankerten FUNCs ohne FLOW; innerster Anker, Weg endet an der ersten anderen verankerten FUNC). Beide lesen das neue optionale Feld `CodeFacts.callEdges`/`callScope` und schweigen ohne es; kein bestehendes Modell bekommt einen Befund, bis ein Lieferant die Kanten liefert (graphcode CR-GC-846). Dazu die Messung `callCoverage` neben `importCoverage`. Davor 49.0.0: MAJOR (CR-SM-405): neue Regel RC-11 („Code file belongs to a module“, warning, Stufe 12, Domaene SYS): je Import-Endpunkt, der zu keinem MOD aufloest, ein Befund am SYS — dieselbe Aufloesung wie RC-05 und `importCoverage` (Entscheidung des Autors 2026-10-15/19: Variante A, keine Ausnahmeliste; warning, weil RC nie am Gate laeuft, CR-SM-353, und auf Stufe 12 jeder Befund Bau haelt). Das Urteil wird strenger: ein Modell mit unzugeordnetem Code erreicht Bau nicht mehr. Vorbedingung graphcode 147518d7 (ITEM-2026-948): Tests und Nicht-Code sind keine Import-Endpunkte mehr. Davor 48.0.0: MAJOR (CR-SM-413): R-22 prueft nur noch Blattfunktionen, und die neue Regel R-35 („Block is not allocated to a module“, error, Stufe 7) meldet einen Block (FUNC mit FUNC-Kindern), der eine `allocate`-Kante auf ein MOD traegt (Entscheidung des Autors 2026-10-14/15: „mod ist mod, warum kommen da ueberhaupt func. und schon gar keine aggregierten“; eigene Kennung, weil die Regel MOD braucht, also Stufe 7, nicht Stufe 5 wie FC-03). Das Urteil wird strenger: ein Modell mit zugeordnetem Block bekommt einen Fehler, der PDR haelt. Vorher gerichtet: graphcode 15 Kanten, graph-view-edit 1. Bewusst nicht gerichtet (Entscheidung des Autors 2026-10-15, „fehler akzeptieren“): sirail, bok, sigllm, energymanager, agentdiary-frontier. Davor 47.1.0: MINOR (CR-SM-412): FC-02 („Leaf UC has FCHAIN“) entfaellt, UC-03 uebernimmt seine Blatt-Bedingung (ein UC mit `compose → UC`-Kindern braucht keine eigene Kette). Beide meldeten denselben Sachverhalt, weil `UC -compose-> UC` nicht in der Matrix steht: 36 von 36 Befunden doppelt ueber 36 Graphen. Kein Sachverhalt geht verloren, kein Urteil wird strenger, keine Marke aendert sich (FC-02 trug keine Rolle, UC-03 haelt wie bisher). Export `fc02LeafUcHasFchain` faellt, kein Leser in graphcode/graph-view-edit. Davor 47.0.0: MAJOR (CR-SM-411): R-08 bekommt unter derselben Kennung und Schwere den zweiten Fall — ein Element traegt in einem Feld einen Wert, den der Element-Vertrag (`OntologyElement`) nicht kennt; dazu `role` an REQ (Entscheidung des Autors 2026-10-12: der Stand ist ein Fehler, den eine Regel als Befund meldet; das Modell wird nicht beim Laden abgelehnt). Bis hierher pruefte das nur das graphcode-Gate an dem, was ein Zug schreibt (lokal `SCHEMA-02`); Altbestand nannte keine Regel, und die Messung in graphcode brach daran ab (CR-GC-786). Das Urteil wird strenger: gezaehlt ueber 36 Modelldateien der Familie 100 neue Fehler in 6 Dateien (98 an `kinds` aus der Zeit vor CR-SM-366, 2 an `status`). Kein Export faellt; ein Modell mit Altbestand laedt weiter, das Gate weist nur neu eingefuehrte Fehler ab. An R-08 statt einer eigenen Kennung: Stufe `immer`, Menge `all` und Schwere sind dieselben, die Aussage auch (der Bestand widerspricht seinem Schema). Der Regelname lautet jetzt „Data integrity“. Davor 46.0.0: MAJOR (CR-SM-410): FC-03 (Block als Glied einer Kette) wird vom Hinweis zum FEHLER (Entscheidung des Autors 2026-10-11: „Block als Glied oder Erfuellen ist ein Fehler, dann muessen die bestehenden Repos eben gerichtet werden"). Als Fehler haelt der Befund die Marke PDR, und ein Gate, das neue Fehler abweist, nimmt eine Kette mit Block nicht mehr an. Nachgezaehlt ueber 30 Modelle der Familie nach dem Richten (graph-view-edit 30faf80, graphcode c20b2afd): 41 Bloecke, 0 Befunde. Unter derselben Kennung der zweite Fall: ein Block, der eine Anforderung erfuellt (`FUNC -satisfy-> REQ` an einer FUNC mit FUNC-Kindern), ist derselbe Fehler — bis hierher meldete das keine Regel. An FC-03 statt an R-02, weil eine Kennung keine zwei Schweren traegt (R-02 bleibt Warnung). Der Regelname lautet jetzt „Block is neither chain member nor satisfier". Davor 45.0.0: MAJOR (CR-SM-409): FC-05 (Kette haengt zusammen) bekommt die Rolle `existence` und haelt damit die Marke PDR (Entscheidung des Autors 2026-10-11). Kein Eintrag entfaellt, kein Befund aendert sich — aber das Urteil wird strenger: ein Modell mit zerfallener Kette, das PDR erreichte, erreicht sie nicht mehr. Gezaehlt ueber 30 Modelle der Familie: FC-05 meldet 2 Ketten in 1 Modell (graph-view-edit), dort haelt IO-02 die Marke schon; heute verliert kein Modell eine Marke. R-30 und FC-04 bleiben ohne Rolle. Davor 44.0.0: MAJOR (CR-SM-401): Stufe statt Dimension, Befunde zaehlen statt Prozent (Entscheidung des Autors 2026-10-07). ENTFERNT: `RULE_TO_DIMENSION`, `ReadinessDimension`, `ReadinessScore`, `ReadinessReport` (contracts; `SteerSpace`/`SteerTerm` bleiben), `DIMENSION_READINESS_NAME`, `DIMENSION_READINESS_DELTA_NAME`; in se-engine `computeReadiness` und `coreTypesOf`. Es gibt EINE Einteilung der Regeln, die Stufe; die Zahl der Befunde je Stufe liefert `countByStage` in @sigloch/graphcode-client. Keine Regel, keine Stufe, keine Marke aendert sich — Befunde und Marken ueber 38 Graphen identisch (gemessen). Davor 43.0.0 (CR-SM-400): eine Entscheidung ist ein erledigter Auftrag (Entscheidungen des Autors 2026-10-07). (a) `hasOpenOrder` filtert nicht mehr auf `relation [label: decides]`: ein offener CR ist ein Auftrag, ohne Ersatz. 3 offene CRs im Bestand tragen die Kante; in der Rig-Referenz `frontier` eroeffnen zwei davon jetzt den Bau, bis sie als erledigt gefuehrt sind. (b) Regel TR-01 („Trade decision recorded as CR“) ist ENTFERNT, mit ihr das Feld `crRefs` am Analyse-Vermerk und die Exporte `tradeDecisionRecorded`, `TASK_OUTCOME_RULES`, `evaluateTaskOutcomeRules` — 1 Befund an 38 Graphen. Der Vermerk ist `{ graphVersion }`; ein Alt-Vermerk mit `crRefs` laedt weiter (nicht-striktes Schema, das Feld wird abgestreift). Kein Kerntyp und kein Score je Dimension wandert (gemessen). (c) Der Hinweis von AF-02 nennt den erledigten CR mit relation-Kanten statt der `decides`-Kante. Katalog 77 → 76 Regeln. NICHT enthalten: CR-R02, `commitRef`, `architectureOnly` (warten auf den Autor, CR-SM-400 §4). Davor 42.0.0 (CR-SM-399): sechs Streichungen aus dem Sonderwissen der Steuerung (IR-01, `reqRefs`, `READINESS_SCORED_PROFILES`, `readFlowSync`, `codeRef`-Rueckfall, `fields`).
8
+ export const RULES_VERSION = '53.0.0'; // MAJOR (CR-SM-438): FC-04 zaehlt einen antwortenden Akteur (alle seine Eingaenge in die Kette tragen die Rolle `answer`) nicht mehr als Ausgang der Kette — das Urteil wird strenger. `chainRoles` prueft `answer` vor `trigger` und verlangt, dass die Anfrage vor der Antwort liegt; eine Antwort am ersten Glied galt vorher als zweiter Ausloeser (FC-06). `ChainRoles.triggersAgree` entfaellt, FC-06 rechnet es selbst (einziger Leser) — `chainRoles` liest kein SCHEMA mehr, FC-04 bleibt Stufe 6 ohne Ausnahme. Gemessen: 38 Graphen, FC-04 und FC-06 unveraendert (der Fall kommt heute 0-mal vor). Migration: keine; ein Modell mit antwortendem Akteur braucht einen echten Empfaenger der Kette. Prior: // MAJOR (CR-SM-435): neue Warnung RD-06 „Single satisfier“ (REQ mit mehr als einer eingehenden `satisfy`-Kante, ein Befund je REQ, Erfueller in `context.also_affects`; Stufe 3). Das Urteil wird strenger (Praezedenz CR-SM-434 UC-07). Hinweise von R-02 und FC-03 nennen die Zerlegung statt eines weiteren Erfuellers. Kein Attribut, kein Muster, `META_MODEL_VERSION` unveraendert. Migration: jede REQ mit mehreren Erfuellern zerlegen (je Kind-REQ ein Erfueller), als NFR an das kleinste gemeinsame Element haengen oder die Kante eines Zwischenschritts streichen. Prior: // MAJOR (CR-SM-437): R-26 „SCHEMA must have realRef“ von Stufe 11 auf Stufe 8 mit Rolle `existence` — das Zod-Schema im Code ist Spezifikation (Code as Spec, Entscheidung des Autors 2026-11-17). Das Urteil wird strenger: R-26 ist ohne eroeffneten Bau faellig und haelt CDR, TRR und Bau; vorher hielt es nur Bau. Benannte Ausnahme B1 `R-26: 8 ≠ 11` (Review in ITEM-2026-1413). Migration: jedes SCHEMA bekommt `realRef` auf sein Zod-Schema oder `external: true`. Prior: // MINOR (CR-SM-440): CR-R02 „Done requires commit“ entfaellt (Entscheidung des Auftraggebers 2026-10-07 in CR-GC-755, Freigabe 2026-11-14: der Commit steht in git und ist ueber die Auftragsnummer auffindbar). MINOR wie bei BQ-06 (CR-SM-433) und FC-02 (CR-SM-412): kein Urteil wird strenger, nur ein Befund faellt weg; keine Marke aendert sich. Die Kennung wird nicht wiederverwendet. Entfernt: `RULE_HELP['CR-R02']`, `ALL_RULE_DEFS` 81 -> 80 Regeln, Eintrag in der Klassifikation von se-engine. `status` am CR bleibt. Prior: // MAJOR (CR-SM-434): neue Warnung UC-07 „Name states the need“ (UC- und FCHAIN-Name ohne Woerter aus `policy.needNameTerms`, Vorgabe KI, MCP, Gate, Lauf, Ziel) und neues PFLICHTFELD `needNameTerms` an `MetricPolicy` (Praezedenz CR-SM-283, CR-SM-314: ein Host mit vollstaendiger Policy, z. B. graphcode.config.jsonc, muss das Feld setzen). Das Urteil wird strenger: an 37 Modelldateien der Familie ohne eigene Liste 8 neue Warnungen (Lauf 4, Gate 3, Ziel 1). Davor 49.4.0: MINOR (CR-SM-433): BQ-06 „Conforming“ entfaellt (Entscheidung des Autors 2026-11-11, CR-SM-431: ein Modalverb sagt nichts ueber die Qualitaet, „Das System muss robust sein“ besteht die Regel). Am graphcode-Modell meldete sie 165 von 198 Anforderungen. MINOR wie bei FC-02 (CR-SM-412), nicht MAJOR wie bei TR-01 (CR-SM-400): kein Urteil wird strenger, nur ein Befund faellt weg, und kein Modell bekommt dadurch einen neuen; keine Marke aendert sich (BQ-06 war warning, Stufe 3, ohne Rolle). Kein Sachverhalt geht verloren: die REQ ohne `description` meldet BQ-07 weiter, das Modalverb zaehlt BQ-03 weiter. Gemessen am graphcode-Modell: BQ-06 165 -> 0, BQ-02 66, BQ-03 6 und BQ-07 0 unveraendert, Befunde gesamt 740 -> 577. Am Selbstmodell (SSOT) 11 -> 0. Entfernt: Export `bq06Conforming`, `RULE_HELP['BQ-06']`, `ALL_RULE_DEFS` 81 -> 80 Regeln, Task `anforderungsqualitaet` 6 -> 5 Regeln. Kein Leser des Exports in graphcode, graph-view-edit, graphify (src, scripts); graphcode-Tests, die BQ-06 nennen, zieht graphcode beim Upgrade nach. Prior: MINOR (CR-SM-430, CR-SM-432): BQ-02 prueft nur REQ mit `kinds: non-functional` (eine funktionale wird am Ergebnis geprueft, eine ohne `kinds` meldet BQ-07; graphcode-Modell 160 -> 66 Befunde), und die neue Regel BQ-03 „Singular“ (warning, Stufe 3, Domaene REQ) meldet eine REQ mit mehr als einer Zusage, gezaehlt ueber die Modalverben shall, must, must not, soll, muss, darf nicht (graphcode-Modell: 6 REQ). Kein neues Attribut. Das Urteil von BQ-02 wird schwaecher, kein Modell bekommt einen Befund weniger als Fehler. Prior: MINOR (CR-SM-420): neue Regel FC-06 (warning, Stufe 8, Domaene FCHAIN) — die Kette hat EINEN Ausloeser, abgeleitet aus io-Kanten und `sync` (`chainRoles`); mehrere Ausloeser nur am selben Glied mit demselben Vertrag (Freigabe des Autors 2026-10-28). Kein neues Attribut. Prior: MINOR (CR-SM-415): zwei neue Regeln, beide warning, Stufe 12 — RC-12 („Sync flow has a call“, Domaene FLOW: ein FLOW mit `sync: sync` ohne Aufrufweg zwischen Erzeuger- und Abnehmer-FUNC, hoechstens 3 Kanten, eine der beiden Richtungen, oder ohne gueltigen Beleg `FLOW.realRef`) und RC-13 („Call between anchored functions has a flow“, Domaene FUNC: ein Aufrufweg zwischen zwei verankerten FUNCs ohne FLOW; innerster Anker, Weg endet an der ersten anderen verankerten FUNC). Beide lesen das neue optionale Feld `CodeFacts.callEdges`/`callScope` und schweigen ohne es; kein bestehendes Modell bekommt einen Befund, bis ein Lieferant die Kanten liefert (graphcode CR-GC-846). Dazu die Messung `callCoverage` neben `importCoverage`. Davor 49.0.0: MAJOR (CR-SM-405): neue Regel RC-11 („Code file belongs to a module“, warning, Stufe 12, Domaene SYS): je Import-Endpunkt, der zu keinem MOD aufloest, ein Befund am SYS — dieselbe Aufloesung wie RC-05 und `importCoverage` (Entscheidung des Autors 2026-10-15/19: Variante A, keine Ausnahmeliste; warning, weil RC nie am Gate laeuft, CR-SM-353, und auf Stufe 12 jeder Befund Bau haelt). Das Urteil wird strenger: ein Modell mit unzugeordnetem Code erreicht Bau nicht mehr. Vorbedingung graphcode 147518d7 (ITEM-2026-948): Tests und Nicht-Code sind keine Import-Endpunkte mehr. Davor 48.0.0: MAJOR (CR-SM-413): R-22 prueft nur noch Blattfunktionen, und die neue Regel R-35 („Block is not allocated to a module“, error, Stufe 7) meldet einen Block (FUNC mit FUNC-Kindern), der eine `allocate`-Kante auf ein MOD traegt (Entscheidung des Autors 2026-10-14/15: „mod ist mod, warum kommen da ueberhaupt func. und schon gar keine aggregierten“; eigene Kennung, weil die Regel MOD braucht, also Stufe 7, nicht Stufe 5 wie FC-03). Das Urteil wird strenger: ein Modell mit zugeordnetem Block bekommt einen Fehler, der PDR haelt. Vorher gerichtet: graphcode 15 Kanten, graph-view-edit 1. Bewusst nicht gerichtet (Entscheidung des Autors 2026-10-15, „fehler akzeptieren“): sirail, bok, sigllm, energymanager, agentdiary-frontier. Davor 47.1.0: MINOR (CR-SM-412): FC-02 („Leaf UC has FCHAIN“) entfaellt, UC-03 uebernimmt seine Blatt-Bedingung (ein UC mit `compose → UC`-Kindern braucht keine eigene Kette). Beide meldeten denselben Sachverhalt, weil `UC -compose-> UC` nicht in der Matrix steht: 36 von 36 Befunden doppelt ueber 36 Graphen. Kein Sachverhalt geht verloren, kein Urteil wird strenger, keine Marke aendert sich (FC-02 trug keine Rolle, UC-03 haelt wie bisher). Export `fc02LeafUcHasFchain` faellt, kein Leser in graphcode/graph-view-edit. Davor 47.0.0: MAJOR (CR-SM-411): R-08 bekommt unter derselben Kennung und Schwere den zweiten Fall — ein Element traegt in einem Feld einen Wert, den der Element-Vertrag (`OntologyElement`) nicht kennt; dazu `role` an REQ (Entscheidung des Autors 2026-10-12: der Stand ist ein Fehler, den eine Regel als Befund meldet; das Modell wird nicht beim Laden abgelehnt). Bis hierher pruefte das nur das graphcode-Gate an dem, was ein Zug schreibt (lokal `SCHEMA-02`); Altbestand nannte keine Regel, und die Messung in graphcode brach daran ab (CR-GC-786). Das Urteil wird strenger: gezaehlt ueber 36 Modelldateien der Familie 100 neue Fehler in 6 Dateien (98 an `kinds` aus der Zeit vor CR-SM-366, 2 an `status`). Kein Export faellt; ein Modell mit Altbestand laedt weiter, das Gate weist nur neu eingefuehrte Fehler ab. An R-08 statt einer eigenen Kennung: Stufe `immer`, Menge `all` und Schwere sind dieselben, die Aussage auch (der Bestand widerspricht seinem Schema). Der Regelname lautet jetzt „Data integrity“. Davor 46.0.0: MAJOR (CR-SM-410): FC-03 (Block als Glied einer Kette) wird vom Hinweis zum FEHLER (Entscheidung des Autors 2026-10-11: „Block als Glied oder Erfuellen ist ein Fehler, dann muessen die bestehenden Repos eben gerichtet werden"). Als Fehler haelt der Befund die Marke PDR, und ein Gate, das neue Fehler abweist, nimmt eine Kette mit Block nicht mehr an. Nachgezaehlt ueber 30 Modelle der Familie nach dem Richten (graph-view-edit 30faf80, graphcode c20b2afd): 41 Bloecke, 0 Befunde. Unter derselben Kennung der zweite Fall: ein Block, der eine Anforderung erfuellt (`FUNC -satisfy-> REQ` an einer FUNC mit FUNC-Kindern), ist derselbe Fehler — bis hierher meldete das keine Regel. An FC-03 statt an R-02, weil eine Kennung keine zwei Schweren traegt (R-02 bleibt Warnung). Der Regelname lautet jetzt „Block is neither chain member nor satisfier". Davor 45.0.0: MAJOR (CR-SM-409): FC-05 (Kette haengt zusammen) bekommt die Rolle `existence` und haelt damit die Marke PDR (Entscheidung des Autors 2026-10-11). Kein Eintrag entfaellt, kein Befund aendert sich — aber das Urteil wird strenger: ein Modell mit zerfallener Kette, das PDR erreichte, erreicht sie nicht mehr. Gezaehlt ueber 30 Modelle der Familie: FC-05 meldet 2 Ketten in 1 Modell (graph-view-edit), dort haelt IO-02 die Marke schon; heute verliert kein Modell eine Marke. R-30 und FC-04 bleiben ohne Rolle. Davor 44.0.0: MAJOR (CR-SM-401): Stufe statt Dimension, Befunde zaehlen statt Prozent (Entscheidung des Autors 2026-10-07). ENTFERNT: `RULE_TO_DIMENSION`, `ReadinessDimension`, `ReadinessScore`, `ReadinessReport` (contracts; `SteerSpace`/`SteerTerm` bleiben), `DIMENSION_READINESS_NAME`, `DIMENSION_READINESS_DELTA_NAME`; in se-engine `computeReadiness` und `coreTypesOf`. Es gibt EINE Einteilung der Regeln, die Stufe; die Zahl der Befunde je Stufe liefert `countByStage` in @sigloch/graphcode-client. Keine Regel, keine Stufe, keine Marke aendert sich — Befunde und Marken ueber 38 Graphen identisch (gemessen). Davor 43.0.0 (CR-SM-400): eine Entscheidung ist ein erledigter Auftrag (Entscheidungen des Autors 2026-10-07). (a) `hasOpenOrder` filtert nicht mehr auf `relation [label: decides]`: ein offener CR ist ein Auftrag, ohne Ersatz. 3 offene CRs im Bestand tragen die Kante; in der Rig-Referenz `frontier` eroeffnen zwei davon jetzt den Bau, bis sie als erledigt gefuehrt sind. (b) Regel TR-01 („Trade decision recorded as CR“) ist ENTFERNT, mit ihr das Feld `crRefs` am Analyse-Vermerk und die Exporte `tradeDecisionRecorded`, `TASK_OUTCOME_RULES`, `evaluateTaskOutcomeRules` — 1 Befund an 38 Graphen. Der Vermerk ist `{ graphVersion }`; ein Alt-Vermerk mit `crRefs` laedt weiter (nicht-striktes Schema, das Feld wird abgestreift). Kein Kerntyp und kein Score je Dimension wandert (gemessen). (c) Der Hinweis von AF-02 nennt den erledigten CR mit relation-Kanten statt der `decides`-Kante. Katalog 77 → 76 Regeln. NICHT enthalten: CR-R02, `commitRef`, `architectureOnly` (warten auf den Autor, CR-SM-400 §4). Davor 42.0.0 (CR-SM-399): sechs Streichungen aus dem Sonderwissen der Steuerung (IR-01, `reqRefs`, `READINESS_SCORED_PROFILES`, `readFlowSync`, `codeRef`-Rueckfall, `fields`).
9
9
  /** Meta-model version (trace pattern constraints + format-e parser). */
10
10
  export const META_MODEL_VERSION = '6.0.0'; // MAJOR (CR-SM-366): satisfy-where je Erfueller genau ein kind — FUNC {functional}, MOD/SYS {non-functional}, und NEU `FCHAIN -satisfy-> REQ where target.kinds in {non-functional}` (bisher ohne where). Eine functional-REQ an der Kette hatte keine FUNC und damit keinen realRef; jetzt R-18 `kinds-mismatch` mit candidate_sources [FUNC]. Bestand (5 Familien-Snapshots, 2026-09-27): 27 functional-REQ an FCHAIN, 53 satisfy-Kanten auf pre/postcondition-REQ, 4 auf risk/mitigation-REQ; ungueltige satisfy-Kanten 7 -> 91. Prior: // MINOR (CR-SM-341): `CR -relation-> SCHEMA` ergaenzt -- reine Erweiterung, keine Bestandskante wird ungueltig. Die Kante war der einzige Punkt, an dem zwei Regeln DESSELBEN Katalogs einander widersprachen: CR-R01 verlangt einen Umfang und nennt SCHEMA ausdruecklich (SCOPE_TYPES = FUNC/MOD/SCHEMA/REQ/UC, cr-quality-rules.ts), R-18 wies genau diese Kante ab, weil die Matrix fuer CR nur MS/UC/REQ/FUNC/MOD kannte. Gemessen an zwei Audit-Logs: 6 Ablehnungen in graphcode, 3 in sigllm -- jedes Mal ein CR, dessen Umfang ein Vertrag ist. Erweitert statt den fixHint zu kuerzen: ein CR, der eine Schnittstelle schneidet, hat genau dort seinen Umfang. Gleicher Zug, ohne Oberflaechenwirkung: R-18 haengt seinen Ablehnungsgrund als `context.trace_rejection` an den Befund (neuer Export `admittingAlternatives`). Prior: // MINOR (CR-SM-317, ITEM-2026-064): neues Muster `TEST -verify-> SCHEMA` — der Vertragstest haengt am Vertrag, nicht an einer Hilfs-REQ; additiv, kein bestehender Graph faellt. Prior: // BREAKING (CR-SM-271 Teil 2): `FLOW -relation-> SCHEMA` wird `1..1` — die erste DURCHGESETZTE Untergrenze (minOccurs/REQUIRED_PATTERNS; nur exakt-`1`, die `1..*`-compose-Untergrenzen bleiben Vollstaendigkeits-Warnungen ihrer Regeln). Migrationsbestand vorab abgetragen: graphcode 2, sigloch-modules 4, graph-view-edit 5 (je durchs Gate), urbanmobility-Fixture geloescht (39, Spike ohne Referenzen); sirail 4 offen (EXPORT_PENDING-Divergenz seit 2026-08-18).
11
11
  export * from './ontology.js';
@@ -66,7 +66,8 @@ export const RULE_HELP = {
66
66
  },
67
67
  'AF-05': {
68
68
  plain: "Parts of the model are not built yet and nobody has ordered the work → derive the build order.",
69
- se: "Unbuilt elements exist (`TEST` / `FUNC` / `SCHEMA` without a binding, the exemptions of R-19/R-20/R-26 apply) and no `CR` has `status: open`. The plan is the set of open CRs, not a stamp; it falls due again with every change (CR-SM-395).",
69
+ se: "Unbuilt elements exist (`TEST` / `FUNC` / `SCHEMA` without a binding, the exemptions of R-19/R-20/R-26 apply) and no `CR` has `status: open`. The plan is the set of open CRs, not a stamp; it falls due again with every change (CR-SM-395)." +
70
+ " One finding for the whole graph, at the `SYS`; the message names the unbuilt elements.",
70
71
  prompt: "se-plan",
71
72
  },
72
73
  'BQ-01': {
@@ -116,17 +117,18 @@ export const RULE_HELP = {
116
117
  },
117
118
  'CR-R03': {
118
119
  plain: "Several open changes touch the same thing, so they will collide → sequence them or merge them.",
119
- se: "One element tracked by more than one `CR` with `status` open/in-progress.",
120
+ se: "One element tracked by more than one `CR` with `status` open/in-progress." +
121
+ " One finding per set of CRs, not per element: the first element in sort order carries it, the others stand in the message and in `context.also_affects`.",
120
122
  vorschlag: 'Kläre, welcher der offenen Änderungsaufträge an {n} zuerst ändert.',
121
123
  },
122
124
  'FC-03': {
123
125
  plain: "A step that contains further steps is used as if it were a single step: it sits in a sequence, or it is named as the one that fulfils a requirement. A container only collects steps → put its inner steps into the chain, and attach the requirement to the inner step that really carries it.",
124
- se: "`FUNC` that `compose`s other `FUNC`s (a block) and is a member of an `FCHAIN` or `satisfy`s a `REQ`. A block is neither chain member nor satisfier: chains are flat, and a requirement hangs on the leaf function that carries it (a requirement of the whole belongs to `MOD`, `FCHAIN` or `SYS`). Error (CR-SM-410).",
126
+ se: "`FUNC` that `compose`s other `FUNC`s (a block) and is a member of an `FCHAIN` or `satisfy`s a `REQ`. A block is neither chain member nor satisfier: chains are flat, and a requirement hangs on the leaf function that carries it: one child `REQ` per leaf (`REQ` `compose` `REQ`), or the requirement is non-functional and belongs to `MOD`, `FCHAIN` or `SYS` (CR-SM-435). Error (CR-SM-410).",
125
127
  vorschlag: 'Nimm statt der Blöcke {n} ihre inneren Schritte in die Kette und hänge ihre Anforderung an den Schritt, der sie trägt.',
126
128
  },
127
129
  'FC-04': {
128
130
  plain: "A sequence either has nobody starting it or nothing coming back out → wire both ends to whoever uses it.",
129
- se: "`FCHAIN` lacking an entry (`ACTOR -io-> FLOW -io-> FUNC∈chain`) or an exit (`FUNC∈chain -io-> FLOW -io-> ACTOR`). Stricter than FC-01: both directions, at FUNC/FLOW level, no UC-level bypass.",
131
+ se: "`FCHAIN` lacking an entry (`ACTOR -io-> FLOW -io-> FUNC∈chain`) or an exit (`FUNC∈chain -io-> FLOW -io-> ACTOR`). Stricter than FC-01: both directions, at FUNC/FLOW level, no UC-level bypass. An actor whose entries into the chain all have the role `answer` (`chainRoles`: it answers `sync` a request of the chain) is no exit — the request to it does not count (CR-SM-438).",
130
132
  vorschlag: 'Verbinde Anfang und Ende der Funktionsketten {n} mit dem Nutzer.',
131
133
  },
132
134
  'FC-05': {
@@ -158,9 +160,9 @@ export const RULE_HELP = {
158
160
  vorschlag: 'Gib den hohen Risiken {n} einen Test.',
159
161
  },
160
162
  'IO-01': {
161
- plain: "Two steps in the same sequence have no described data passing between them → add the data one hands to the other.",
162
- se: "A `FUNC` pair inside one `FCHAIN` with no `io` path (`FUNC -io-> FLOW -io-> FUNC`) connecting them.",
163
- vorschlag: 'Ergänze den Datenfluss zwischen den Schritten {n}.',
163
+ plain: "A step of this sequence is not connected to the others by any data passing → check in the code whether it hands data to the sequence; if it does, add that data, if not, take the step out of the sequence.",
164
+ se: "A `FUNC` of an `FCHAIN` that has `io` edges but no path `FUNC -io-> FLOW -io-> FUNC` to the largest connected group of members. One finding per cut-off member, not per pair; a member with no `io` edge at all is R-31's. Often the member does not belong in the chain.",
165
+ vorschlag: 'Prüfe am Code, ob die Schritte {n} Daten an ihre Kette übergeben: ergänze dann den Datenfluss, sonst nimm sie aus der Kette.',
164
166
  },
165
167
  'IO-02': {
166
168
  plain: "Two different places write into the same flow, so a reader cannot tell which version arrives \u2192 give each source its own flow; they may keep sharing one contract.",
@@ -188,9 +190,10 @@ export const RULE_HELP = {
188
190
  vorschlag: 'Prüfe die Abhängigkeiten des Moduls {n}.',
189
191
  },
190
192
  'MT-02': {
191
- plain: "The parts inside this module never talk to each other → it is really several modules in one.",
192
- se: "LCOM4 over the BOXES of this module whitebox: its sub-MODs (`MOD -compose-> MOD`) plus its directly allocated `FUNC`s. A box owns its whole subtree, so a decomposed block carries the contracts of its leaves — the same ownership chain R-04 (CR-SM-282), BW-02 (CR-SM-283) and R-23 (CR-SM-321) use; without it a container counted as an empty group of its own and the number grew with decomposition DEPTH (CR-SM-326). Connected means a shared CONTRACT (`FLOW -relation-> SCHEMA`, else the untyped flow) — the same counting base as CR-01/R-04/MT-01 since CR-SM-274/276, not FLOW identity. CR-SM-297 dropped `satisfy`: two FUNCs meeting the same requirement can be fully decoupled at runtime, and if they share one, the REQUIREMENT is what needs decomposing. `null` (no judgement) below two boxes and where no box carries a contract at all — an unwired FUNC is R-31's statement, at the element. `info` from `metricPolicy.lcom4.info`, `warning` from `.warning` (CR-GC-329).",
193
- vorschlag: 'Teile das Modul {n}, seine Teile arbeiten nicht zusammen.',
193
+ plain: "The parts inside this module never talk to each other → it may be several modules in one; check the role and the fit of the parts, and split it only if they belong apart.",
194
+ se: "LCOM4 over the BOXES of this module whitebox: its sub-MODs (`MOD -compose-> MOD`) plus its directly allocated `FUNC`s. A box owns its whole subtree, so a decomposed block carries the contracts of its leaves — the same ownership chain R-04 (CR-SM-282), BW-02 (CR-SM-283) and R-23 (CR-SM-321) use; without it a container counted as an empty group of its own and the number grew with decomposition DEPTH (CR-SM-326). Connected means a shared CONTRACT (`FLOW -relation-> SCHEMA`, else the untyped flow) — the same counting base as CR-01/R-04/MT-01 since CR-SM-274/276, not FLOW identity. CR-SM-297 dropped `satisfy`: two FUNCs meeting the same requirement can be fully decoupled at runtime, and if they share one, the REQUIREMENT is what needs decomposing. `null` (no judgement) below two boxes and where no box carries a contract at all — an unwired FUNC is R-31's statement, at the element. `info` from `metricPolicy.lcom4.info`, `warning` from `.warning` (CR-GC-329)." +
195
+ " The number alone is no reason to split: the role of the module and the fit of its parts decide.",
196
+ vorschlag: 'Prüfe Rolle und Passung der Teile von Modul {n}; teile es nur, wenn sie fachlich nicht zusammengehören.',
194
197
  },
195
198
  'MT-04': {
196
199
  plain: "This block's parts never talk to each other → it is really two blocks that happen to sit under one name.",
@@ -198,12 +201,14 @@ export const RULE_HELP = {
198
201
  },
199
202
  'ND-01': {
200
203
  plain: "Two functions look like the same function written twice → merge them, or make clear what each one does differently.",
201
- se: "Near-duplicate `FUNC` above 0.85 similarity (name, description and legal trace partners). Since CR-SM-286 the similarity is computed IN the rule, cached per graph — before that it had to be injected, and without injection the rule returned green, indistinguishable from \"no duplicates\".",
204
+ se: "Near-duplicate `FUNC` above 0.85 similarity (name, description and legal trace partners). Since CR-SM-286 the similarity is computed IN the rule, cached per graph — before that it had to be injected, and without injection the rule returned green, indistinguishable from \"no duplicates\"." +
205
+ " It finds copies and semantic duplicates in the model, not parallel paths in the code: two ways to do the same task share a bottleneck, not a name (spike CR-GC-637).",
202
206
  vorschlag: 'Führe die doppelten Funktionen {n} zusammen oder grenze sie ab.',
203
207
  },
204
208
  'ND-02': {
205
209
  plain: "Two data contracts describe the same thing twice → merge them, or say what distinguishes them.",
206
- se: "Near-duplicate `SCHEMA` above 0.85 similarity (name, description and legal trace partners). Partners are filtered through `isValidTrace`: a rule must not reach its verdict via an edge R-18 rejects (CR-SM-286).",
210
+ se: "Near-duplicate `SCHEMA` above 0.85 similarity (name, description and legal trace partners). Partners are filtered through `isValidTrace`: a rule must not reach its verdict via an edge R-18 rejects (CR-SM-286)." +
211
+ " Likewise only copies; a second translator of one contract is RC-09's.",
207
212
  vorschlag: 'Führe die doppelten Datenformate {n} zusammen oder grenze sie ab.',
208
213
  },
209
214
  'NFR-01': {
@@ -213,13 +218,13 @@ export const RULE_HELP = {
213
218
  },
214
219
  'R-01': {
215
220
  plain: "A feature you've promised has no test proving it's met, so you can't show it works → add or author a test for it.",
216
- se: "`REQ` with no incoming `verify` trace (test→requirement coverage, INCOSE V&V).",
221
+ se: "`REQ` with no incoming `verify` trace (test→requirement coverage, INCOSE V&V). The `TEST` may still be unbound: R-19 asks for its `testRefs` once the build is open.",
217
222
  prompt: "se:close-violations",
218
223
  vorschlag: 'Ergänze Tests für die Anforderungen {n}.',
219
224
  },
220
225
  'R-02': {
221
226
  plain: "A function isn't linked to any feature it's meant to build, so it may be dead code → link it to the feature it serves, or delete it.",
222
- se: "`FUNC` with no `satisfy` trace to a `REQ` (design→requirement traceability).",
227
+ se: "`FUNC` with no `satisfy` trace to a `REQ` (design→requirement traceability). Write an own functional `REQ` for what the function does (se:author-req); hanging it on an existing `REQ` as a further satisfier is RD-06 (CR-SM-435).",
223
228
  vorschlag: 'Ordne die Funktionen {n} den Anforderungen zu, die sie erfüllen.',
224
229
  },
225
230
  'R-04': {
@@ -275,25 +280,29 @@ export const RULE_HELP = {
275
280
  },
276
281
  'R-18': {
277
282
  plain: "You connected two items in a combination that isn't allowed → use an allowed link, or fix what's at each end.",
278
- se: "Trace whose (source-type, target-type) pair isn't an allowed combination in the metamodel of legal links.",
283
+ se: "Four cases under one id: (1) a pair, trace type, label or `kinds` condition that no pattern allows; a pattern with a `kinds` condition (for example `satisfy` onto a `REQ`) also rejects wrong or undeclared `kinds`, although the pair exists; (2) a `FUNC` or `MOD` with two `compose` parents; (3) more traces than the upper bound allows (for example a `FUNC` with two `allocate`); (4) a `FLOW` without exactly one `relation` to a `SCHEMA`.",
279
284
  vorschlag: 'Korrigiere die unzulässigen Verbindungen an {n}.',
280
285
  },
281
286
  'R-19': {
282
287
  plain: "Building has started, and a test doesn't point to a test file yet → add the link to the test file.",
283
288
  se: "`TEST` with no valid `testRefs` `[{file, case?, tool}, …]` (at least one entry)." +
289
+ " Presence and shape only: whether the file and the case exist is RC-02's question." +
284
290
  " Stage 11: due only once the build is open — an open CR or a first `realRef`/`testRefs` in the graph; before that it is not evaluated, not passed (CR-SM-395).",
285
291
  vorschlag: 'Verbinde die Tests {n} mit ihren Testdateien.',
286
292
  },
287
293
  'R-20': {
288
294
  plain: "Building has started, and a function doesn't point to its code yet → add the link to its code; or mark it as coming from an outside library.",
289
295
  se: "`FUNC` with no valid `realRef` `{file, symbol}` (graph↔code binding); else `external:true`." +
296
+ " Presence and shape only: whether file and symbol exist is RC-01's question." +
297
+ " `external` frees only from the binding rules (R-26, RC-01, RC-03, RC-10), not from the structure rules R-02, R-30 and R-31." +
290
298
  " Stage 11: due only once the build is open — an open CR or a first `realRef`/`testRefs` in the graph; before that it is not evaluated, not passed (CR-SM-395).",
291
299
  vorschlag: 'Verbinde die Funktionen {n} mit ihrem Code.',
292
300
  },
293
301
  'R-21': {
294
302
  plain: "Two functions hand data over, but they are not in one chain together — or they are, and the chain is not covered: some function in it has no requirement, and no end-to-end test checks the chain → give each function of the chain a requirement it fulfils, or give the chain an end-to-end quality requirement and a test for it.",
295
- se: "FUNC↔FUNC handover (`FUNC` ─io→ `FLOW` ─io→ `FUNC`), two findings. (a) endpoints share NO `FCHAIN` → finding at the PRODUCER: no integration scope is declared. (b) endpoints share one, but no shared chain is covered → finding at the chain, naming the member FUNCs without a REQ. A chain is covered either (1) through its members — EVERY member FUNC (`FCHAIN` ─compose→ `FUNC`) satisfies at least one `REQ`; verifying those REQs is R-01's job (CR-SM-376) — or (2) end-to-end — a verified integration test (`TEST` ─verify→ `REQ` ←satisfy─ `FCHAIN`); an `FCHAIN` satisfies only non-functional REQs (CR-SM-366). SILENT when either endpoint is in no chain at all (that is R-30's statement) and when either is infrastructure (`chains >= policy.criticality.infrastructure`): a handover into a function that runs through every chain is a bus, not a missing test.",
296
- vorschlag: 'Bringe die Übergaben an {n} in eine Funktionskette, deren Funktionen Anforderungen erfüllen oder die ein Integrationstest prüft.',
303
+ se: "FUNC↔FUNC handover (`FUNC` ─io→ `FLOW` ─io→ `FUNC`), two findings. (a) endpoints share NO `FCHAIN` → finding at the PRODUCER: no integration scope is declared. (b) endpoints share one, but no shared chain is covered → finding at the chain, naming the member FUNCs without a REQ. A chain is covered either (1) through its members — EVERY member FUNC (`FCHAIN` ─compose→ `FUNC`) satisfies at least one `REQ`; verifying those REQs is R-01's job (CR-SM-376) — or (2) end-to-end — a verified integration test (`TEST` ─verify→ `REQ` ←satisfy─ `FCHAIN`); an `FCHAIN` satisfies only non-functional REQs (CR-SM-366). SILENT when either endpoint is in no chain at all (that is R-30's statement) and when either is infrastructure (`chains >= policy.criticality.infrastructure`): a handover into a function that runs through every chain is a bus, not a missing test." +
304
+ " Check in the code first that the hand-over exists: if no code path joins the two functions, remove or re-hang the edge instead of building a chain around it; if it exists, also through a file, give it its own chain with a test.",
305
+ vorschlag: 'Prüfe am Code, ob die Übergaben an {n} existieren: entferne sonst die Kante, andernfalls gib ihnen eine Kette mit Test.',
297
306
  },
298
307
  'R-22': {
299
308
  plain: "A function isn't assigned to any building block, so it has no home in the structure → put it on a module.",
@@ -311,14 +320,14 @@ export const RULE_HELP = {
311
320
  vorschlag: 'Gib den Modulen {n} Funktionen oder entferne sie.',
312
321
  },
313
322
  'R-26': {
314
- plain: "Building has started, and a data format in the model isn't linked to the schema code that defines it yet → link it to the schema (or mark it as defined outside).",
323
+ plain: "A data format in the model isn't linked to the schema code that defines it yet. The schema code is part of the specification, so the design is not complete without it → write the schema and link it (or mark it as defined outside).",
315
324
  se: "`SCHEMA` with no valid `realRef` `{file, symbol}` (graph↔Zod binding); else `external:true` (CR-211/228)." +
316
- " Stage 11: due only once the build is open — an open CR or a first `realRef`/`testRefs` in the graph; before that it is not evaluated, not passed (CR-SM-395).",
325
+ " Stage 8, role existence: the Zod schema is part of the specification and holds CDR (CR-SM-437, code as spec).",
317
326
  vorschlag: 'Verbinde die Datenformate {n} mit ihrem Schema im Code.',
318
327
  },
319
328
  'R-29': {
320
329
  plain: "Two acceptances claim the same test file, so a red run cannot be traced to one of them and the gate counts that evidence twice → give the file to the one acceptance it really proves, or split it.",
321
- se: "Test file exclusivity (CR-SM-231): every file in `attributes.testRefs` belongs to at most one `TEST`. An acceptance may name n files (1:n) — a file may not name n acceptances. Severity `error`, deliberately sharper than R-19/R-20: a doubly claimed file makes gate numbers wrong, which is a mis-measurement, not a completeness signal. Purely structural — the file need not exist to be claimed twice.",
330
+ se: "Test file exclusivity (CR-SM-231): every file in `attributes.testRefs` belongs to at most one `TEST`. An acceptance may name n files (1:n) — a file may not name n acceptances. Severity `error`, deliberately sharper than R-19/R-20: a doubly claimed file makes gate numbers wrong, which is a mis-measurement, not a completeness signal. Purely structural — the file need not exist to be claimed twice. A further requirement the file proves hangs on the same `TEST` by one more `verify` trace; it needs no second `TEST`.",
322
331
  vorschlag: 'Gib jede Testdatei von {n} nur einem Test.',
323
332
  },
324
333
  'R-30': {
@@ -328,7 +337,9 @@ export const RULE_HELP = {
328
337
  },
329
338
  'R-31': {
330
339
  plain: "This function has no input or no output, so it is a dead block in the picture — only an actor is allowed to be an end point → connect it to a flow on the missing side.",
331
- se: "FUNC is wired (CR-GC-366): a `FUNC` needs at least one incoming `FLOW -io-> FUNC` and one outgoing `FUNC -io-> FLOW`. Only an `ACTOR` may terminate a chain. R-10 asks the same question from the FLOW side ('does this flow have a producer and a consumer?') and therefore never sees a function with no io edge at all — it does not appear in the FLOW loop. IO-01 presupposes chain membership and misses it too. One finding per FUNC naming the missing side(s), not one per side: otherwise the counter exceeds its own denominator contribution, the mis-measurement documented in CR-SM-242.",
340
+ se: "FUNC is wired (CR-GC-366): a `FUNC` needs at least one incoming `FLOW -io-> FUNC` and one outgoing `FUNC -io-> FLOW`. Only an `ACTOR` may terminate a chain. R-10 asks the same question from the FLOW side ('does this flow have a producer and a consumer?') and therefore never sees a function with no io edge at all — it does not appear in the FLOW loop. IO-01 presupposes chain membership and misses it too. One finding per FUNC naming the missing side(s), not one per side: otherwise the counter exceeds its own denominator contribution, the mis-measurement documented in CR-SM-242." +
341
+ " A decomposed block is not judged (its io edges hang on its children); no other exception exists, neither for a composition root nor for an `external` FUNC." +
342
+ " Where real information passes, model it as `FLOW` plus `SCHEMA`; where none passes, the warning stays. Do not add a flow or a chain to silence it.",
332
343
  vorschlag: 'Verbinde die Funktionen {n} auf der fehlenden Seite mit einem Datenfluss.',
333
344
  },
334
345
  'RC-01': {
@@ -347,8 +358,10 @@ export const RULE_HELP = {
347
358
  vorschlag: 'Korrigiere die Code-Verweise der Datenformate {n}, sie zeigen ins Leere.',
348
359
  },
349
360
  'RC-04': {
350
- plain: "A data format is defined but the function on that interface never actually checks incoming data against it → validate with it there.",
351
- se: "Bound `SCHEMA` whose symbol is not imported+parsed (`.parse`/`.safeParse`) in any realized `FUNC` io-connected to it (CR-211); warn — the parse may sit in a framework layer.",
361
+ plain: "A data format is defined but the function on that interface never actually checks data against it → parse with it there: its output at the producer, its input at the reader.",
362
+ se: "Bound `SCHEMA` whose symbol is not imported+parsed (`.parse`/`.safeParse`) in any realized `FUNC` io-connected to it (CR-211); warn." +
363
+ " The check reads the file of each such function for the literal `X.parse(` or `X.safeParse(` and accepts either side, the producer's output or the reader's input; a generic helper that parses inside is not seen." +
364
+ " `external` is not exempt; a foreign-API contract held as a Zod schema in our code is parsed at the boundary too.",
352
365
  vorschlag: 'Lies die Datenformate {n} im Code an der Schnittstelle, an der das Modell sie führt.',
353
366
  },
354
367
  'RC-05': {
@@ -388,7 +401,8 @@ export const RULE_HELP = {
388
401
  },
389
402
  'RC-12': {
390
403
  plain: "The model says one function hands data to another and waits, but in the code neither calls the other → point the flow at the pair that really calls each other, or note in the flow where the hand-over happens.",
391
- se: "`FLOW` with `sync: sync` whose producer and consumer `FUNC` both carry a `realRef` symbol in a file of `callScope`, yet `callEdges` holds no path of at most 3 calls between them in either direction (the answer flows from callee to caller). Silent when the `FLOW` carries a `realRef` whose symbol is declared (hand-over by callback, registry or socket, checked by the author). Pairs without binding, outside `callScope`, `async` or without `sync` are not judged; `callCoverage` counts them. Absent `callEdges` is SILENCE (CR-SM-415).",
404
+ se: "`FLOW` with `sync: sync` whose producer and consumer `FUNC` both carry a `realRef` symbol in a file of `callScope`, yet `callEdges` holds no path of at most 3 calls between them in either direction (the answer flows from callee to caller). Silent when the `FLOW` carries a `realRef` whose symbol is declared (hand-over by callback, registry or socket, checked by the author). Pairs without binding, outside `callScope`, `async` or without `sync` are not judged; `callCoverage` counts them. Absent `callEdges` is SILENCE (CR-SM-415)." +
405
+ " A finding asks the author to check; it is not proof of a model error, because the extractor does not see every hand-over (callback, registry, socket).",
392
406
  vorschlag: 'Prüfe die Flüsse {n} gegen die Aufrufe im Code.',
393
407
  },
394
408
  'RC-13': {
@@ -407,15 +421,26 @@ export const RULE_HELP = {
407
421
  se: "Parent `REQ` (has `compose`→`REQ` children) carrying a direct `FUNC` `satisfy`; the satisfy belongs on the children.",
408
422
  vorschlag: 'Lass die Anforderungen {n} nur über ihre Teilanforderungen erfüllen.',
409
423
  },
424
+ 'RD-06': {
425
+ plain: "Several things together fulfil one feature, so no single test can show it is done → split the feature so each part has exactly one thing that fulfils it.",
426
+ se: "`REQ` with more than one incoming `satisfy` (CR-SM-435); the satisfiers stand in `context.also_affects`. Four checks, in this order:" +
427
+ " (1) every child `REQ` would have the same text → a constraint over a set: `non-functional` on the smallest common element (`MOD`, `FCHAIN`, `SYS`), or a shared `FUNC` is missing from the model;" +
428
+ " (2) the text describes a sequence of steps → split along the chain, quality (time, determinism) as NFR on the `FCHAIN`;" +
429
+ " (3) several promises → one child `REQ` each (`REQ` `compose` `REQ`), each with one satisfier;" +
430
+ " (4) a satisfier does only an intermediate step → remove its `satisfy`." +
431
+ " RD-02 judges a `REQ` already split; RD-06 asks for the split.",
432
+ vorschlag: 'Teile die Anforderungen {n} so, dass jede genau einen Erfüller hat.',
433
+ },
410
434
  'RD-04': {
411
435
  plain: "One thing has more than 9 parts directly under it → group them, so each level stays readable.",
412
436
  se: "Decomposition breadth above `metricPolicy.decompositionBreadth.warning` children on one level — `FUNC` `compose` `FUNC`, `SYS` `compose` `MOD`, a `MOD`'s sub-`MOD`s plus its own leaf `FUNC` (`allocate`), and the root `FUNC` forest anchored at `SYS` (CR-SM-282). Default 9, the upper end of 7±2 (CR-SM-296). CR-SM-311: a module level counts its own functions again — breadth, not size; module coupling is R-04. The lower bound is RD-05.",
413
437
  vorschlag: 'Gruppiere die Teile unter {n}, es sind zu viele auf einer Ebene.',
414
438
  },
415
439
  'RD-05': {
416
- plain: "A level has only one or two parts under it → it groups nothing; fold it into the level above, or gather the parts that belong together under it.",
417
- se: "Decomposition breadth below `metricPolicy.decompositionBreadth.min` (default 3, exclusive) on one level, counted exactly like RD-04 (CR-SM-311, Z3). A level abstracts nothing below it. The finding carries no `value`/`threshold` and does not enter the steering score: it is readability, not boundary width. A level with no children at all is not this rule (empty MOD: R-23; FUNC without children is a leaf). The root level directly under `SYS` (`SYS` `compose` `MOD`, root `FUNC` forest) is exempt — there is no level above it, and one module or one root function is an architecture decision (CR-SM-388); RD-04 still applies there.",
418
- vorschlag: 'Löse die Ebene {n} in die Ebene darüber auf oder sammle unter ihr, was zusammengehört.',
440
+ plain: "A level has only one or two parts under it → it may group nothing; check the role and the fit of the parts, fold the level into the one above only if they belong there, or gather the parts that belong together under it.",
441
+ se: "Decomposition breadth below `metricPolicy.decompositionBreadth.min` (default 3, exclusive) on one level, counted exactly like RD-04 (CR-SM-311, Z3). A level abstracts nothing below it. The finding carries no `value`/`threshold` and does not enter the steering score: it is readability, not boundary width. A level with no children at all is not this rule (empty MOD: R-23; FUNC without children is a leaf). The root level directly under `SYS` (`SYS` `compose` `MOD`, root `FUNC` forest) is exempt — there is no level above it, and one module or one root function is an architecture decision (CR-SM-388); RD-04 still applies there." +
442
+ " The count alone is no reason to fold or cut: the role of the level and the fit of its parts decide.",
443
+ vorschlag: 'Prüfe Rolle und Passung der Teile von Ebene {n}: löse sie nur auf, wenn die Teile darüber gehören, sonst sammle Zusammengehöriges unter ihr.',
419
444
  },
420
445
  'SC-02': {
421
446
  plain: "A data format is defined but nothing uses it → connect it to the data it describes, or drop it.",
package/dist/se/rules.js CHANGED
@@ -279,7 +279,7 @@ function funcMustSatisfyReq(graph) {
279
279
  severity: 'warning',
280
280
  element_id: fn.id,
281
281
  message: `${fn.id} does not satisfy any requirement`,
282
- fix_hint: 'Link to a REQ via satisfy trace',
282
+ fix_hint: 'Write an own functional REQ for what this function does (se:author-req); do not add it as a further satisfier to an existing REQ',
283
283
  context: {
284
284
  element_type: fn.type,
285
285
  element_name: fn.name,
@@ -723,6 +723,36 @@ function decompositionConsistency(graph) {
723
723
  context: { element_type: req.type, element_name: req.name },
724
724
  }));
725
725
  }
726
+ // ---------------------------------------------------------------------------
727
+ // RD-06: Single satisfier (CR-SM-435) — eine Anforderung hat genau einen Erfueller.
728
+ // Entscheidung des Autors 2026-11-12: kann es eine Funktion nicht allein, traegt es ein hoeheres, aber
729
+ // eindeutiges Element (FCHAIN, MOD, SYS); sonst ist die Anforderung nicht testbar. Ein Befund je REQ
730
+ // (CR-SM-242), die Erfueller in `also_affects`. Liest den Typ der Erfueller nur fuer die Legalitaet der
731
+ // Kante (wie R-18), nicht als Menge einer spaeteren Stufe: Stufe 3. RD-02 urteilt ueber die schon zerlegte REQ, RD-06 verlangt die Zerlegung erst.
732
+ // ---------------------------------------------------------------------------
733
+ function singleSatisfier(graph) {
734
+ const idx = indexOf(graph);
735
+ return idx.elementsOfType('REQ').flatMap(req => {
736
+ // Nur legale Erfueller: eine grammatikwidrige satisfy-Kante meldet R-18; hier mitgezaehlt, gaebe
737
+ // dieselbe Ursache einen zweiten Befund (Gate 4, Doppelzaehlung).
738
+ const satisfiers = [...new Set(idx.in(req.id, 'satisfy')
739
+ .filter(t => { const type = idx.typeOf(t.source); return !!type && isValidTrace({ source: type, target: 'REQ', type: 'satisfy', targetKinds: req.kinds }); })
740
+ .map(t => t.source))].sort();
741
+ if (satisfiers.length < 2)
742
+ return [];
743
+ return [{
744
+ rule_id: 'RD-06',
745
+ severity: 'warning',
746
+ element_id: req.id,
747
+ message: `${req.id} has ${satisfiers.length} satisfiers (${satisfiers.join(', ')}); a requirement has exactly one`,
748
+ fix_hint: 'Same text for every child: non-functional on the smallest common element, or model the missing shared FUNC. ' +
749
+ 'A sequence of steps: split along the chain, quality as NFR on the FCHAIN. ' +
750
+ 'Several promises: one child REQ each (REQ compose REQ), each with one satisfier. ' +
751
+ 'A satisfier does only an intermediate step: remove its satisfy trace.',
752
+ context: { element_type: req.type, element_name: req.name, also_affects: satisfiers },
753
+ }];
754
+ });
755
+ }
726
756
  function breadthCounts(graph) {
727
757
  const idx = indexOf(graph);
728
758
  // CR-SM-264: `typeOf` und `byId` baute diese Regel je Aufruf selbst — der Index hat beide.
@@ -1807,7 +1837,7 @@ export function unbuiltElementIds(graph) {
1807
1837
  .map(v => v.element_id);
1808
1838
  }
1809
1839
  // CR-SM-395: die Faelligkeit haengt am KATALOG (`whenDue`), nicht am Auswerter und nicht im
1810
- // Regelkoerper — die Regeln der Stufe 11 (R-19, R-20, R-26, R-29) schweigen, bis der Bau eroeffnet ist.
1840
+ // Regelkoerper — die Regeln der Stufe 11 (R-19, R-20, R-29) schweigen, bis der Bau eroeffnet ist.
1811
1841
  export const V3_RULES = whenDue([
1812
1842
  { id: 'R-33', name: 'Graph must have a SYS', severity: 'warning', stage: 1, role: 'existence', evaluate: graphMustHaveSystem, domain: ['graph'] },
1813
1843
  { id: 'R-01', name: 'REQ must have verification', severity: 'error', stage: 9, role: 'existence', evaluate: reqMustHaveVerification, domain: ['REQ'] },
@@ -1835,10 +1865,14 @@ export const V3_RULES = whenDue([
1835
1865
  { id: 'R-22', name: 'FUNC must be allocated to MOD', severity: 'warning', stage: 7, role: 'existence', evaluate: funcMustBeAllocated, domain: ['FUNC'] },
1836
1866
  { id: 'R-35', name: 'Block is not allocated to a module', severity: 'error', stage: 7, evaluate: blockMustNotBeAllocated, domain: ['FUNC'] },
1837
1867
  { id: 'R-23', name: 'MOD must have allocated FUNC', severity: 'warning', stage: 7, evaluate: modMustHaveAllocatedFunc, domain: ['MOD'] },
1838
- { id: 'R-26', name: 'SCHEMA must have realRef', severity: 'warning', stage: 11, evaluate: schemaMustHaveSchemaRef, domain: ['SCHEMA'] },
1868
+ // CR-SM-437: das Zod-Schema im Code ist Teil der Spezifikation (Code as Spec, Entscheidung des Autors 2026-11-17).
1869
+ // Stufe 8 statt der abgeleiteten 11 ist eine benannte Ausnahme (B1, ITEM-2026-1413). `existence`, damit die Regel
1870
+ // CDR haelt — als Warnung ohne Rolle hielte sie auf Stufe 8 keine Marke.
1871
+ { id: 'R-26', name: 'SCHEMA must have realRef', severity: 'warning', stage: 8, role: 'existence', evaluate: schemaMustHaveSchemaRef, domain: ['SCHEMA'] },
1839
1872
  { id: 'R-32', name: 'SCHEMA must have contract TEST', severity: 'warning', stage: 9, role: 'existence', evaluate: schemaMustHaveContractTest, domain: ['SCHEMA'] },
1840
1873
  { id: 'RD-01', name: 'Unresolved requirement', severity: 'warning', stage: 3, evaluate: unresolvedRequirement, domain: ['REQ'] },
1841
1874
  { id: 'RD-02', name: 'Decomposition consistency', severity: 'warning', stage: 3, evaluate: decompositionConsistency, domain: ['REQ'] },
1875
+ { id: 'RD-06', name: 'Single satisfier', severity: 'warning', stage: 3, evaluate: singleSatisfier, domain: ['REQ'] },
1842
1876
  { id: 'RD-04', name: 'Decomposition breadth', severity: 'warning', stage: 7, evaluate: decompositionBreadth, domain: ['FUNC', 'MOD', 'SYS'] },
1843
1877
  { id: 'RD-05', name: 'Decomposition too narrow', severity: 'warning', stage: 7, evaluate: decompositionNarrow, domain: ['FUNC', 'MOD'] },
1844
1878
  { id: 'MS-01', name: 'Milestone empty scope', severity: 'warning', stage: 10, evaluate: msEmptyScope, domain: ['MS'] },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sigloch/contracts",
3
- "version": "12.13.0",
3
+ "version": "12.14.0",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",