@sigloch/contracts 12.12.0 → 12.13.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/se/cr-quality-rules.js +0 -28
- package/dist/se/definitions.d.ts +35 -0
- package/dist/se/definitions.js +106 -0
- package/dist/se/flat-graph.js +1 -1
- package/dist/se/grammar-snapshot.d.ts +6 -6
- package/dist/se/grammar-snapshot.js +4 -6
- package/dist/se/index.d.ts +3 -2
- package/dist/se/index.js +3 -2
- package/dist/se/ontology.d.ts +0 -2
- package/dist/se/ontology.js +0 -16
- package/dist/se/rule-help.js +37 -27
- package/package.json +1 -1
|
@@ -65,33 +65,6 @@ function crMustTrack(graph) {
|
|
|
65
65
|
}));
|
|
66
66
|
}
|
|
67
67
|
// ---------------------------------------------------------------------------
|
|
68
|
-
// CR-R02: CR with status=done must have commitRef (unless architectureOnly)
|
|
69
|
-
// ---------------------------------------------------------------------------
|
|
70
|
-
function crDoneRequiresCommit(graph) {
|
|
71
|
-
const crs = graph.elements.filter(e => e.type === 'CR');
|
|
72
|
-
return crs
|
|
73
|
-
.filter(cr => {
|
|
74
|
-
const status = cr.attributes?.status;
|
|
75
|
-
if (status !== 'done')
|
|
76
|
-
return false;
|
|
77
|
-
if (cr.attributes?.architectureOnly === true)
|
|
78
|
-
return false;
|
|
79
|
-
const ref = cr.attributes?.commitRef;
|
|
80
|
-
return !ref || (Array.isArray(ref) && ref.length === 0);
|
|
81
|
-
})
|
|
82
|
-
.map(cr => ({
|
|
83
|
-
rule_id: 'CR-R02',
|
|
84
|
-
severity: 'warning',
|
|
85
|
-
element_id: cr.id,
|
|
86
|
-
message: `${cr.id} is done but has no commitRef`,
|
|
87
|
-
fix_hint: 'Add commitRef with Git SHA, or set architectureOnly=true',
|
|
88
|
-
context: {
|
|
89
|
-
element_type: cr.type,
|
|
90
|
-
element_name: cr.name,
|
|
91
|
-
},
|
|
92
|
-
}));
|
|
93
|
-
}
|
|
94
|
-
// ---------------------------------------------------------------------------
|
|
95
68
|
// CR-R03: No concurrent mutation — warn if two open CRs track the same node
|
|
96
69
|
// ---------------------------------------------------------------------------
|
|
97
70
|
function noConcurrentMutation(graph) {
|
|
@@ -182,7 +155,6 @@ function crShouldHaveMilestone(graph) {
|
|
|
182
155
|
// ---------------------------------------------------------------------------
|
|
183
156
|
export const CR_RULES = [
|
|
184
157
|
{ id: 'CR-R01', name: 'CR must track', severity: 'warning', stage: 10, evaluate: crMustTrack, domain: ['CR'] },
|
|
185
|
-
{ id: 'CR-R02', name: 'Done requires commit', severity: 'warning', stage: 10, evaluate: crDoneRequiresCommit, domain: ['CR'] },
|
|
186
158
|
// CR-SM-243: domain ist 'all', nicht CR — die Regel meldet am getrackten ZIELKNOTEN
|
|
187
159
|
// ("dieser Knoten wird von 2 offenen CRs angefasst"), und der kann jeden Typ haben. Eine
|
|
188
160
|
// Aufzaehlung waere eine Momentaufnahme der heute getrackten Typen, kein Modell; 'all'
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Definitionen der 12 Elementarten und Bedeutung der 6 Kantenarten (CR-SM-439).
|
|
3
|
+
*
|
|
4
|
+
* EINE Quelle fuer Agent, Hilfe und Artefakt. Die Beispiele stammen alle aus einem System, der
|
|
5
|
+
* Paketstation; ein Name steht ueberall gleich geschrieben (Test `se-definitions.test.ts`).
|
|
6
|
+
* Die erlaubten Paare je Kantenart stehen in `TRACE_PATTERNS` (meta-model.ts), nicht hier.
|
|
7
|
+
* Fliesstexte (Was/Wie, Blackbox/Whitebox, Treppe) gehoeren nicht hierher.
|
|
8
|
+
*/
|
|
9
|
+
import type { ElementType, TraceType } from './ontology.js';
|
|
10
|
+
export interface ElementDefinition {
|
|
11
|
+
/** Anzeigename, wie ihn der Nutzer liest. */
|
|
12
|
+
name: string;
|
|
13
|
+
/** Die verbindliche Definition in einem Satz. */
|
|
14
|
+
satz: string;
|
|
15
|
+
/** Namen aus der Paketstation, mindestens einer. */
|
|
16
|
+
beispiele: string[];
|
|
17
|
+
/** Was es nicht ist, mit Grund. */
|
|
18
|
+
gegenbeispiel?: {
|
|
19
|
+
text: string;
|
|
20
|
+
grund: string;
|
|
21
|
+
};
|
|
22
|
+
/** Standarddefinition, der der Satz entspricht. */
|
|
23
|
+
quelle?: {
|
|
24
|
+
norm: string;
|
|
25
|
+
zitat: string;
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
export interface TraceDefinition {
|
|
29
|
+
/** Anzeigename, wie ihn der Nutzer liest. */
|
|
30
|
+
name: string;
|
|
31
|
+
/** Was die Kantenart aussagt. */
|
|
32
|
+
bedeutung: string;
|
|
33
|
+
}
|
|
34
|
+
export declare const ELEMENT_DEFINITIONS: Record<ElementType, ElementDefinition>;
|
|
35
|
+
export declare const TRACE_DEFINITIONS: Record<TraceType, TraceDefinition>;
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
export const ELEMENT_DEFINITIONS = {
|
|
2
|
+
SYS: {
|
|
3
|
+
name: 'System',
|
|
4
|
+
satz: 'Das Ganze mit seiner Grenze nach außen.',
|
|
5
|
+
beispiele: ['Paketstation'],
|
|
6
|
+
quelle: { norm: 'ISO/IEC/IEEE 15288', zitat: 'combination of interacting elements organized to achieve one or more stated purposes' },
|
|
7
|
+
},
|
|
8
|
+
ACTOR: {
|
|
9
|
+
name: 'Akteur',
|
|
10
|
+
satz: 'Wer von außen etwas über die Grenze gibt oder bekommt.',
|
|
11
|
+
beispiele: ['Empfänger', 'Zusteller', 'Versand-Server'],
|
|
12
|
+
gegenbeispiel: { text: 'Bedienfeld', grund: 'ein Teil, kein Akteur' },
|
|
13
|
+
quelle: { norm: 'UML/SysML', zitat: 'a role played by a user or any other system that interacts with the subject' },
|
|
14
|
+
},
|
|
15
|
+
UC: {
|
|
16
|
+
name: 'Anwendungsfall',
|
|
17
|
+
satz: 'Ein Nutzen, den ein Akteur über die Grenze bekommt.',
|
|
18
|
+
beispiele: ['Paket abholen', 'Paket einlegen'],
|
|
19
|
+
gegenbeispiel: { text: 'Code prüfen', grund: 'ein Schritt' },
|
|
20
|
+
quelle: { norm: 'IREB', zitat: 'A set of possible interactions between external actors and a system that provide a benefit for the actor(s) involved.' },
|
|
21
|
+
},
|
|
22
|
+
REQ: {
|
|
23
|
+
name: 'Anforderung',
|
|
24
|
+
satz: 'Was ein Element an seiner Grenze tut oder einhält, prüfbar, ohne zu sagen wie.',
|
|
25
|
+
beispiele: ['Fach öffnet höchstens 2 s nach gültigem Code'],
|
|
26
|
+
gegenbeispiel: { text: 'Die Steuerung sendet den Öffnungsbefehl über CAN', grund: 'ein Wie' },
|
|
27
|
+
quelle: { norm: 'ISO/IEC/IEEE 29148', zitat: 'statement that translates or expresses a need and its associated constraints and conditions' },
|
|
28
|
+
},
|
|
29
|
+
FCHAIN: {
|
|
30
|
+
name: 'Wirkkette',
|
|
31
|
+
satz: 'Der Weg eines Anwendungsfalls durch die Schritte, vom Auslöser bis zum Ergebnis.',
|
|
32
|
+
beispiele: ['Abholung: Code eingeben, prüfen, entriegeln, Fach offen'],
|
|
33
|
+
quelle: { norm: 'Arcadia, Functional Chain', zitat: 'one possible path among all the paths forming the dataflow, in the context of implementing a capability' },
|
|
34
|
+
},
|
|
35
|
+
FUNC: {
|
|
36
|
+
name: 'Funktion',
|
|
37
|
+
satz: 'Ein Schritt, der Eingaben in Ausgaben wandelt.',
|
|
38
|
+
beispiele: ['Code prüfen', 'Fach entriegeln'],
|
|
39
|
+
gegenbeispiel: { text: 'Steuerung', grund: 'ein Teil, kein Schritt' },
|
|
40
|
+
quelle: { norm: 'SEBoK', zitat: 'defined by the transformation of input flows to output flows, with defined performance' },
|
|
41
|
+
},
|
|
42
|
+
FLOW: {
|
|
43
|
+
name: 'Datenfluss',
|
|
44
|
+
satz: 'Eine Übergabe von einem Schritt zum nächsten: Daten, ein Signal, auch Material oder Kraft.',
|
|
45
|
+
beispiele: ['Abholcode', 'Öffnungsbefehl'],
|
|
46
|
+
quelle: { norm: 'Arcadia, Functional Exchange', zitat: 'interaction between a source function and a destination function, likely to transmit exchange items' },
|
|
47
|
+
},
|
|
48
|
+
SCHEMA: {
|
|
49
|
+
name: 'Datenformat',
|
|
50
|
+
satz: 'Die Vereinbarung, wie die Übergabe aussieht.',
|
|
51
|
+
beispiele: ['6 Ziffern, 0 bis 9', 'Fachnummer 1 bis 48', '12 V, 300 ms'],
|
|
52
|
+
gegenbeispiel: { text: 'über Bluetooth', grund: 'der Kanal, nicht der Inhalt' },
|
|
53
|
+
quelle: { norm: 'Arcadia, Interface', zitat: 'exchange items … according to a communication ‚contract‘ shared between them' },
|
|
54
|
+
},
|
|
55
|
+
MOD: {
|
|
56
|
+
name: 'Modul',
|
|
57
|
+
satz: 'Ein Teil, in dem Schritte umgesetzt sind.',
|
|
58
|
+
beispiele: ['Steuerung', 'Bedienfeld', 'Schließmechanik'],
|
|
59
|
+
quelle: { norm: 'ISO/IEC 25010, component', zitat: 'entity with discrete structure, such as an assembly or software module' },
|
|
60
|
+
},
|
|
61
|
+
TEST: {
|
|
62
|
+
name: 'Test',
|
|
63
|
+
satz: 'Eingabe, Bedingung und erwartetes Ergebnis für eine Zusage.',
|
|
64
|
+
beispiele: ['Gültiger Code, Tür zu, Fach offen nach höchstens 2 s'],
|
|
65
|
+
gegenbeispiel: { text: 'Öffnung funktioniert', grund: 'kein erwartetes Ergebnis' },
|
|
66
|
+
quelle: { norm: 'IEEE 1012', zitat: 'set of test inputs, execution conditions, and expected results developed for a particular objective' },
|
|
67
|
+
},
|
|
68
|
+
CR: {
|
|
69
|
+
name: 'Auftrag',
|
|
70
|
+
satz: 'Eine abgegrenzte Änderung am Modell.',
|
|
71
|
+
beispiele: ['Abholung per App ergänzen'],
|
|
72
|
+
quelle: { norm: 'PMBOK', zitat: 'a formal proposal to modify any document, deliverable, or baseline' },
|
|
73
|
+
},
|
|
74
|
+
MS: {
|
|
75
|
+
name: 'Meilenstein',
|
|
76
|
+
satz: 'Ein Termin, dem Aufträge zugeordnet sind.',
|
|
77
|
+
beispiele: ['Pilotstation', 'Serienfreigabe'],
|
|
78
|
+
quelle: { norm: 'ISO/IEC/IEEE 24765', zitat: 'scheduled event used to measure progress' },
|
|
79
|
+
},
|
|
80
|
+
};
|
|
81
|
+
export const TRACE_DEFINITIONS = {
|
|
82
|
+
compose: {
|
|
83
|
+
name: 'besteht aus',
|
|
84
|
+
bedeutung: 'Vom Ganzen zum Teil. Die Bausteine bilden damit Bäume: oben das System, unten die Teile. Jedes Teil hat genau ein Ganzes über sich.',
|
|
85
|
+
},
|
|
86
|
+
io: {
|
|
87
|
+
name: 'gibt ab · nimmt auf',
|
|
88
|
+
bedeutung: 'Der Weg, den eine Übergabe nimmt. Er führt immer über einen Datenfluss, nie direkt von Funktion zu Funktion. Darum hat jede Übergabe ein Format.',
|
|
89
|
+
},
|
|
90
|
+
satisfy: {
|
|
91
|
+
name: 'erfüllt',
|
|
92
|
+
bedeutung: 'Wer eine Anforderung einlöst. Ein Verhalten erfüllt eine Funktion: sie löst die Anforderung ein. Eine Güte wie Zeit, Gewicht oder Durchsatz erfüllt die Wirkkette (Ende zu Ende), ein Modul (lokales Budget) oder das System.',
|
|
93
|
+
},
|
|
94
|
+
verify: {
|
|
95
|
+
name: 'prüft',
|
|
96
|
+
bedeutung: 'Welcher Test welche Zusage belegt. Ein Datenformat bekommt einen eigenen Vertragstest, der auch die Fälle prüft, die es ablehnen muss.',
|
|
97
|
+
},
|
|
98
|
+
allocate: {
|
|
99
|
+
name: 'ist umgesetzt in',
|
|
100
|
+
bedeutung: 'Wo eine Funktion wohnt. Jede unterste Funktion liegt in genau einem Modul. Die Kopplung zwischen Modulen wird daraus berechnet, nicht behauptet.',
|
|
101
|
+
},
|
|
102
|
+
relation: {
|
|
103
|
+
name: 'gehört zu',
|
|
104
|
+
bedeutung: 'Zuordnungen ohne Hierarchie: ein Fluss zu seinem Format, ein Auftrag zu seinem Meilenstein und zu den Bausteinen, die er ändert, ein Meilenstein zu seinem Nachfolger.',
|
|
105
|
+
},
|
|
106
|
+
};
|
package/dist/se/flat-graph.js
CHANGED
|
@@ -36,7 +36,7 @@ function nestAttributes(entry, canonical) {
|
|
|
36
36
|
(canonical.has(key) ? top : attributes)[key] = value;
|
|
37
37
|
}
|
|
38
38
|
// `status` lebt in BEIDEN Welten: als Top-Level-Feld am Schema und unter `attributes`, wo
|
|
39
|
-
// CR-
|
|
39
|
+
// CR-R03/CR-R04 es lesen. Die Kuzu-Projektion liefert beides, also spiegelt die
|
|
40
40
|
// Hebung es ebenfalls — sonst lesen genau die CR-Regeln wieder ins Leere.
|
|
41
41
|
if (entry.status !== undefined)
|
|
42
42
|
attributes.status = entry.status;
|
|
@@ -11,19 +11,19 @@
|
|
|
11
11
|
*/
|
|
12
12
|
export declare const GRAMMAR_SNAPSHOT: {
|
|
13
13
|
readonly versions: {
|
|
14
|
-
readonly ontology: "
|
|
14
|
+
readonly ontology: "13.0.0";
|
|
15
15
|
readonly metaModel: "6.0.0";
|
|
16
|
-
readonly rules: "50.
|
|
16
|
+
readonly rules: "50.1.0";
|
|
17
17
|
};
|
|
18
18
|
readonly elementTypes: readonly ["ACTOR", "CR", "FCHAIN", "FLOW", "FUNC", "MOD", "MS", "REQ", "SCHEMA", "SYS", "TEST", "UC"];
|
|
19
19
|
readonly traceTypes: readonly ["allocate", "compose", "io", "relation", "satisfy", "verify"];
|
|
20
20
|
readonly patterns: readonly ["ACTOR -io-> FLOW", "CR -relation-> FUNC", "CR -relation-> MOD", "CR -relation-> MS", "CR -relation-> REQ", "CR -relation-> SCHEMA", "CR -relation-> UC", "FCHAIN -compose-> FUNC [1..*]", "FCHAIN -satisfy-> REQ where target.kinds in {non-functional}", "FLOW -io-> ACTOR", "FLOW -io-> FUNC", "FLOW -relation-> SCHEMA [1]", "FUNC -allocate-> MOD [0..1]", "FUNC -compose-> FUNC [0..*]", "FUNC -io-> FLOW", "FUNC -satisfy-> REQ where target.kinds in {functional}", "MOD -compose-> MOD [0..*]", "MOD -satisfy-> REQ where target.kinds in {non-functional}", "MS -compose-> FUNC", "MS -compose-> REQ", "MS -compose-> UC", "MS -relation-> MS label=depends-on", "REQ -compose-> REQ [0..*]", "SYS -compose-> MOD [0..*]", "SYS -compose-> REQ [0..*]", "SYS -compose-> SYS [0..*]", "SYS -compose-> UC [1..*]", "SYS -satisfy-> REQ where target.kinds in {non-functional}", "TEST -verify-> REQ", "TEST -verify-> SCHEMA", "UC -compose-> FCHAIN [1..*]", "UC -compose-> REQ [1..*]"];
|
|
21
21
|
readonly elementColumns: readonly ["OntologyElement.attributes", "OntologyElement.created_at", "OntologyElement.description", "OntologyElement.id", "OntologyElement.kinds", "OntologyElement.method", "OntologyElement.name", "OntologyElement.status", "OntologyElement.type", "OntologyElement.updated_at", "Trace.attributes", "Trace.created_at", "Trace.label", "Trace.source", "Trace.target", "Trace.type", "Trace.verified_at", "Trace.weight"];
|
|
22
|
-
readonly attributes: readonly ["CR.
|
|
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-
|
|
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"];
|
|
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-
|
|
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", "
|
|
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"];
|
|
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
|
};
|
|
@@ -11,9 +11,9 @@
|
|
|
11
11
|
*/
|
|
12
12
|
export const GRAMMAR_SNAPSHOT = {
|
|
13
13
|
versions: {
|
|
14
|
-
ontology: "
|
|
14
|
+
ontology: "13.0.0",
|
|
15
15
|
metaModel: "6.0.0",
|
|
16
|
-
rules: "50.
|
|
16
|
+
rules: "50.1.0",
|
|
17
17
|
},
|
|
18
18
|
elementTypes: [
|
|
19
19
|
"ACTOR",
|
|
@@ -92,7 +92,6 @@ export const GRAMMAR_SNAPSHOT = {
|
|
|
92
92
|
"Trace.weight",
|
|
93
93
|
],
|
|
94
94
|
attributes: [
|
|
95
|
-
"CR.architectureOnly: boolean",
|
|
96
95
|
"CR.maxFiles: number",
|
|
97
96
|
"CR.rationale: string",
|
|
98
97
|
"CR.spike: boolean",
|
|
@@ -152,7 +151,6 @@ export const GRAMMAR_SNAPSHOT = {
|
|
|
152
151
|
"CL-01 (warning) domain=[ACTOR] stage=2",
|
|
153
152
|
"CR-01 (warning) domain=[MOD] stage=7",
|
|
154
153
|
"CR-R01 (warning) domain=[CR] stage=10",
|
|
155
|
-
"CR-R02 (warning) domain=[CR] stage=10",
|
|
156
154
|
"CR-R03 (warning) domain=[all] stage=immer",
|
|
157
155
|
"FC-03 (error) domain=[FUNC] stage=5",
|
|
158
156
|
"FC-04 (warning) domain=[FCHAIN] stage=6",
|
|
@@ -261,7 +259,6 @@ export const GRAMMAR_SNAPSHOT = {
|
|
|
261
259
|
"CL-01",
|
|
262
260
|
"CR-01",
|
|
263
261
|
"CR-R01",
|
|
264
|
-
"CR-R02",
|
|
265
262
|
"CR-R03",
|
|
266
263
|
"FC-03",
|
|
267
264
|
"FC-04",
|
|
@@ -351,7 +348,7 @@ export const GRAMMAR_SNAPSHOT = {
|
|
|
351
348
|
"ConstraintCarriers",
|
|
352
349
|
"DEFAULT_METRIC_POLICY",
|
|
353
350
|
"ELEMENT_ATTRIBUTES",
|
|
354
|
-
"
|
|
351
|
+
"ELEMENT_DEFINITIONS",
|
|
355
352
|
"ElementType",
|
|
356
353
|
"ElementUid",
|
|
357
354
|
"FC_RULES",
|
|
@@ -392,6 +389,7 @@ export const GRAMMAR_SNAPSHOT = {
|
|
|
392
389
|
"SteerTerm",
|
|
393
390
|
"TASK_ENTRY",
|
|
394
391
|
"TASK_OWNED_RULES",
|
|
392
|
+
"TRACE_DEFINITIONS",
|
|
395
393
|
"TRACE_PATTERNS",
|
|
396
394
|
"TestRefSchema",
|
|
397
395
|
"TestRefsSchema",
|
package/dist/se/index.d.ts
CHANGED
|
@@ -3,12 +3,13 @@
|
|
|
3
3
|
* Single source of truth for SE ontology schemas across all projects.
|
|
4
4
|
*/
|
|
5
5
|
/** Ontology schema version (element types + trace types). */
|
|
6
|
-
export declare const ONTOLOGY_VERSION = "
|
|
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.
|
|
8
|
+
export declare const RULES_VERSION = "50.1.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';
|
|
12
|
+
export * from './definitions.js';
|
|
12
13
|
export * from './rules.js';
|
|
13
14
|
export * from './conformance-rules.js';
|
|
14
15
|
export { callCoverage, type CallCoverage } from './call-rules.js';
|
package/dist/se/index.js
CHANGED
|
@@ -3,12 +3,13 @@
|
|
|
3
3
|
* Single source of truth for SE ontology schemas across all projects.
|
|
4
4
|
*/
|
|
5
5
|
/** Ontology schema version (element types + trace types). */
|
|
6
|
-
export const ONTOLOGY_VERSION = '11.1.0'; // 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)
|
|
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.
|
|
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`).
|
|
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';
|
|
12
|
+
export * from './definitions.js';
|
|
12
13
|
export * from './rules.js';
|
|
13
14
|
export * from './conformance-rules.js';
|
|
14
15
|
// CR-SM-415: RC-12/RC-13 liegen in call-rules.ts; nach aussen geht nur die Messung, die Regeln laufen ueber
|
package/dist/se/ontology.d.ts
CHANGED
|
@@ -460,8 +460,6 @@ export declare const OntologyGraph: z.ZodObject<{
|
|
|
460
460
|
}, z.core.$strip>>;
|
|
461
461
|
}, z.core.$strip>;
|
|
462
462
|
export type OntologyGraph = z.infer<typeof OntologyGraph>;
|
|
463
|
-
/** Human-readable descriptions for each ElementType. */
|
|
464
|
-
export declare const ELEMENT_DESCRIPTIONS: Record<ElementType, string>;
|
|
465
463
|
/** Element types used in modeling (user-visible). Excludes the planning type CR. */
|
|
466
464
|
export declare const MODELING_ELEMENT_TYPES: ElementType[];
|
|
467
465
|
export interface AttributeSpec {
|
package/dist/se/ontology.js
CHANGED
|
@@ -361,21 +361,6 @@ export const OntologyGraph = z.object({
|
|
|
361
361
|
// ---------------------------------------------------------------------------
|
|
362
362
|
// Ontology metadata — single source of truth for plugin generators (CR-190)
|
|
363
363
|
// ---------------------------------------------------------------------------
|
|
364
|
-
/** Human-readable descriptions for each ElementType. */
|
|
365
|
-
export const ELEMENT_DESCRIPTIONS = {
|
|
366
|
-
SYS: 'System (Wurzel)',
|
|
367
|
-
UC: 'Use Case',
|
|
368
|
-
ACTOR: 'Akteur (Mensch, System, Geraet)',
|
|
369
|
-
FCHAIN: 'Funktionskette (UC->FN Verknuepfung)',
|
|
370
|
-
FUNC: 'Funktion (implementierbare Einheit)',
|
|
371
|
-
FLOW: 'Datenfluss / Zustandsuebergang',
|
|
372
|
-
REQ: 'Requirement (funktional oder nicht-funktional)',
|
|
373
|
-
TEST: 'Testfall',
|
|
374
|
-
MOD: 'Modul (SW-Paket oder HW-Baugruppe)',
|
|
375
|
-
SCHEMA: 'Datenschema (Zod)',
|
|
376
|
-
CR: 'Change Request',
|
|
377
|
-
MS: 'Meilenstein',
|
|
378
|
-
};
|
|
379
364
|
/** Element types used in modeling (user-visible). Excludes the planning type CR. */
|
|
380
365
|
export const MODELING_ELEMENT_TYPES = ElementType.options.filter(t => t !== 'CR');
|
|
381
366
|
/**
|
|
@@ -416,7 +401,6 @@ export const ELEMENT_ATTRIBUTES = {
|
|
|
416
401
|
{ key: 'rationale', type: 'string', description: 'Reason for the change' },
|
|
417
402
|
{ key: 'spike', type: 'boolean', description: 'CR is a spike/exploration' },
|
|
418
403
|
{ key: 'maxFiles', type: 'number', description: 'Upper bound of files the CR may touch, from the cut in se-plan (CR-SM-426)' },
|
|
419
|
-
{ key: 'architectureOnly', type: 'boolean', description: 'Done CR without code change (model/architecture only): exempt from the CR-R02 commitRef requirement (CR-SM-386)' },
|
|
420
404
|
],
|
|
421
405
|
// CR-SM-364: genau ein Realisierungsattribut. `protocol`/`qos` entfielen — freie Strings, in
|
|
422
406
|
// 0 von 186 Familien-FLOWs gesetzt, ohne Leser. Abweichende Kopplung je Verbraucher ⇒ FLOW teilen.
|
package/dist/se/rule-help.js
CHANGED
|
@@ -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': {
|
|
@@ -114,14 +115,10 @@ export const RULE_HELP = {
|
|
|
114
115
|
se: "`CR` with no `relation` traces. It tracks nothing, so it is not traceable evidence.",
|
|
115
116
|
vorschlag: 'Verbinde die Änderungsaufträge {n} mit dem, was sie ändern.',
|
|
116
117
|
},
|
|
117
|
-
'CR-R02': {
|
|
118
|
-
plain: "A change is marked finished but there is no commit proving it → record the commit, or set it back to open.",
|
|
119
|
-
se: "`CR` with `status:done` and no `commitRef` attribute. This is the graph-vs-reality check for change history: \"done\" without evidence.",
|
|
120
|
-
vorschlag: 'Trage bei den erledigten Änderungsaufträgen {n} den Commit nach.',
|
|
121
|
-
},
|
|
122
118
|
'CR-R03': {
|
|
123
119
|
plain: "Several open changes touch the same thing, so they will collide → sequence them or merge them.",
|
|
124
|
-
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`.",
|
|
125
122
|
vorschlag: 'Kläre, welcher der offenen Änderungsaufträge an {n} zuerst ändert.',
|
|
126
123
|
},
|
|
127
124
|
'FC-03': {
|
|
@@ -163,9 +160,9 @@ export const RULE_HELP = {
|
|
|
163
160
|
vorschlag: 'Gib den hohen Risiken {n} einen Test.',
|
|
164
161
|
},
|
|
165
162
|
'IO-01': {
|
|
166
|
-
plain: "
|
|
167
|
-
se: "A `FUNC`
|
|
168
|
-
vorschlag: '
|
|
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.',
|
|
169
166
|
},
|
|
170
167
|
'IO-02': {
|
|
171
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.",
|
|
@@ -193,9 +190,10 @@ export const RULE_HELP = {
|
|
|
193
190
|
vorschlag: 'Prüfe die Abhängigkeiten des Moduls {n}.',
|
|
194
191
|
},
|
|
195
192
|
'MT-02': {
|
|
196
|
-
plain: "The parts inside this module never talk to each other → it
|
|
197
|
-
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)."
|
|
198
|
-
|
|
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.',
|
|
199
197
|
},
|
|
200
198
|
'MT-04': {
|
|
201
199
|
plain: "This block's parts never talk to each other → it is really two blocks that happen to sit under one name.",
|
|
@@ -203,12 +201,14 @@ export const RULE_HELP = {
|
|
|
203
201
|
},
|
|
204
202
|
'ND-01': {
|
|
205
203
|
plain: "Two functions look like the same function written twice → merge them, or make clear what each one does differently.",
|
|
206
|
-
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).",
|
|
207
206
|
vorschlag: 'Führe die doppelten Funktionen {n} zusammen oder grenze sie ab.',
|
|
208
207
|
},
|
|
209
208
|
'ND-02': {
|
|
210
209
|
plain: "Two data contracts describe the same thing twice → merge them, or say what distinguishes them.",
|
|
211
|
-
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.",
|
|
212
212
|
vorschlag: 'Führe die doppelten Datenformate {n} zusammen oder grenze sie ab.',
|
|
213
213
|
},
|
|
214
214
|
'NFR-01': {
|
|
@@ -218,7 +218,7 @@ export const RULE_HELP = {
|
|
|
218
218
|
},
|
|
219
219
|
'R-01': {
|
|
220
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.",
|
|
221
|
-
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.",
|
|
222
222
|
prompt: "se:close-violations",
|
|
223
223
|
vorschlag: 'Ergänze Tests für die Anforderungen {n}.',
|
|
224
224
|
},
|
|
@@ -280,25 +280,29 @@ export const RULE_HELP = {
|
|
|
280
280
|
},
|
|
281
281
|
'R-18': {
|
|
282
282
|
plain: "You connected two items in a combination that isn't allowed → use an allowed link, or fix what's at each end.",
|
|
283
|
-
se: "
|
|
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`.",
|
|
284
284
|
vorschlag: 'Korrigiere die unzulässigen Verbindungen an {n}.',
|
|
285
285
|
},
|
|
286
286
|
'R-19': {
|
|
287
287
|
plain: "Building has started, and a test doesn't point to a test file yet → add the link to the test file.",
|
|
288
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." +
|
|
289
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).",
|
|
290
291
|
vorschlag: 'Verbinde die Tests {n} mit ihren Testdateien.',
|
|
291
292
|
},
|
|
292
293
|
'R-20': {
|
|
293
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.",
|
|
294
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." +
|
|
295
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).",
|
|
296
299
|
vorschlag: 'Verbinde die Funktionen {n} mit ihrem Code.',
|
|
297
300
|
},
|
|
298
301
|
'R-21': {
|
|
299
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.",
|
|
300
|
-
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."
|
|
301
|
-
|
|
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.',
|
|
302
306
|
},
|
|
303
307
|
'R-22': {
|
|
304
308
|
plain: "A function isn't assigned to any building block, so it has no home in the structure → put it on a module.",
|
|
@@ -323,7 +327,7 @@ export const RULE_HELP = {
|
|
|
323
327
|
},
|
|
324
328
|
'R-29': {
|
|
325
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.",
|
|
326
|
-
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`.",
|
|
327
331
|
vorschlag: 'Gib jede Testdatei von {n} nur einem Test.',
|
|
328
332
|
},
|
|
329
333
|
'R-30': {
|
|
@@ -333,7 +337,9 @@ export const RULE_HELP = {
|
|
|
333
337
|
},
|
|
334
338
|
'R-31': {
|
|
335
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.",
|
|
336
|
-
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.",
|
|
337
343
|
vorschlag: 'Verbinde die Funktionen {n} auf der fehlenden Seite mit einem Datenfluss.',
|
|
338
344
|
},
|
|
339
345
|
'RC-01': {
|
|
@@ -352,8 +358,10 @@ export const RULE_HELP = {
|
|
|
352
358
|
vorschlag: 'Korrigiere die Code-Verweise der Datenformate {n}, sie zeigen ins Leere.',
|
|
353
359
|
},
|
|
354
360
|
'RC-04': {
|
|
355
|
-
plain: "A data format is defined but the function on that interface never actually checks
|
|
356
|
-
se: "Bound `SCHEMA` whose symbol is not imported+parsed (`.parse`/`.safeParse`) in any realized `FUNC` io-connected to it (CR-211); warn
|
|
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.",
|
|
357
365
|
vorschlag: 'Lies die Datenformate {n} im Code an der Schnittstelle, an der das Modell sie führt.',
|
|
358
366
|
},
|
|
359
367
|
'RC-05': {
|
|
@@ -393,7 +401,8 @@ export const RULE_HELP = {
|
|
|
393
401
|
},
|
|
394
402
|
'RC-12': {
|
|
395
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.",
|
|
396
|
-
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).",
|
|
397
406
|
vorschlag: 'Prüfe die Flüsse {n} gegen die Aufrufe im Code.',
|
|
398
407
|
},
|
|
399
408
|
'RC-13': {
|
|
@@ -418,9 +427,10 @@ export const RULE_HELP = {
|
|
|
418
427
|
vorschlag: 'Gruppiere die Teile unter {n}, es sind zu viele auf einer Ebene.',
|
|
419
428
|
},
|
|
420
429
|
'RD-05': {
|
|
421
|
-
plain: "A level has only one or two parts under it → it
|
|
422
|
-
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."
|
|
423
|
-
|
|
430
|
+
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.",
|
|
431
|
+
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." +
|
|
432
|
+
" The count alone is no reason to fold or cut: the role of the level and the fit of its parts decide.",
|
|
433
|
+
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.',
|
|
424
434
|
},
|
|
425
435
|
'SC-02': {
|
|
426
436
|
plain: "A data format is defined but nothing uses it → connect it to the data it describes, or drop it.",
|