@sigloch/contracts 10.14.0 → 11.0.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.
@@ -5,6 +5,7 @@
5
5
  import type { OntologyGraph } from './ontology.js';
6
6
  import type { RuleViolation } from './rules.js';
7
7
  import type { MetricPolicy } from './policy.js';
8
+ import { type MarkType, type RuleRole, type RuleStage } from './readiness.js';
8
9
  /**
9
10
  * All prescribed rule definitions (single source of truth for the catalog).
10
11
  *
@@ -22,6 +23,10 @@ export declare const ALL_RULE_DEFS: ReadonlyArray<{
22
23
  domain: readonly string[];
23
24
  /** CR-SM-285: das Profil reist mit der Regel, statt aus ihrer ID geraten zu werden. */
24
25
  profile: Exclude<ProfileId, 'default'>;
26
+ /** CR-SM-395: Stufe und Rolle von der Regeldefinition; `mark` ist daraus BERECHNET (`null` bei `'immer'`). */
27
+ stage: RuleStage;
28
+ role?: RuleRole;
29
+ mark: MarkType | null;
25
30
  }>;
26
31
  export declare function getRuleDefsForProfile(profile: ProfileId): typeof ALL_RULE_DEFS;
27
32
  /**
@@ -12,6 +12,7 @@ import { AO_RULES } from './ao-rules.js';
12
12
  import { BQ_RULES } from './quality-rules.js';
13
13
  import { AF_RULES, TASK_OUTCOME_RULES } from './analysis-freshness-rules.js';
14
14
  import { CODE_CONFORMANCE_RULES } from './conformance-rules.js';
15
+ import { markOfStage } from './readiness.js';
15
16
  /**
16
17
  * CR-SM-285: das Profil haengt am KATALOG, nicht am ID-Praefix.
17
18
  *
@@ -61,7 +62,7 @@ const CATALOGS = [
61
62
  */
62
63
  { profile: 'conformance', rules: CODE_CONFORMANCE_RULES },
63
64
  ];
64
- export const ALL_RULE_DEFS = CATALOGS.flatMap(({ profile, rules }) => rules.map(r => ({ id: r.id, name: r.name, severity: r.severity, domain: r.domain, profile })));
65
+ export const ALL_RULE_DEFS = CATALOGS.flatMap(({ profile, rules }) => rules.map(r => ({ id: r.id, name: r.name, severity: r.severity, domain: r.domain, profile, stage: r.stage, role: r.role, mark: markOfStage(r.stage) })));
65
66
  export function getRuleDefsForProfile(profile) {
66
67
  if (profile === 'default')
67
68
  return ALL_RULE_DEFS;
@@ -230,13 +230,13 @@ export function fc05ChainConnected(graph) {
230
230
  // Aggregated
231
231
  // ---------------------------------------------------------------------------
232
232
  export const FC_RULES = [
233
- { id: 'FC-02', name: 'Leaf UC has FCHAIN', severity: 'warning', evaluate: fc02LeafUcHasFchain, domain: ['UC'] },
233
+ { id: 'FC-02', name: 'Leaf UC has FCHAIN', severity: 'warning', stage: 2, evaluate: fc02LeafUcHasFchain, domain: ['UC'] },
234
234
  // CR-SM-243: domain ist FUNC, nicht FCHAIN — die Regel meldet am FUNC mit der
235
235
  // verschachtelten Zerlegung. Die FCHAIN ist der Suchraum, nicht die Grundgesamtheit:
236
236
  // eine Kette mit n verschachtelten FUNCs erzeugt n Verstoesse gegen einen Beitrag von 1.
237
- { id: 'FC-03', name: 'FCHAIN is flat', severity: 'warning', evaluate: fc03FchainFlat, domain: ['FUNC'] },
238
- { id: 'FC-04', name: 'FCHAIN actor-bounded (trigger+consumer)', severity: 'warning', evaluate: fc04ActorBounded, domain: ['FCHAIN'] },
239
- { id: 'FC-05', name: 'FCHAIN is connected (producer -> consumer)', severity: 'warning', evaluate: fc05ChainConnected, domain: ['FCHAIN'] },
237
+ { id: 'FC-03', name: 'FCHAIN is flat', severity: 'warning', stage: 5, evaluate: fc03FchainFlat, domain: ['FUNC'] },
238
+ { id: 'FC-04', name: 'FCHAIN actor-bounded (trigger+consumer)', severity: 'warning', stage: 6, evaluate: fc04ActorBounded, domain: ['FCHAIN'] },
239
+ { id: 'FC-05', name: 'FCHAIN is connected (producer -> consumer)', severity: 'warning', stage: 6, evaluate: fc05ChainConnected, domain: ['FCHAIN'] },
240
240
  ];
241
241
  // CR-SM-236: `policy` wird durchgereicht, auch wo diese Familie heute keine Schwelle hat —
242
242
  // ein Sonderweg je Familie waere genau der zweite Pfad, den der Regelsatz verbietet.
@@ -174,14 +174,14 @@ export function nfr01BudgetOvershoot(graph) {
174
174
  // Aggregated array & convenience runner
175
175
  // ---------------------------------------------------------------------------
176
176
  export const FM_RULES = [
177
- { id: 'FM-01', name: 'RiskReqFmeaAttributes', severity: 'warning', evaluate: fm01MissingFmeaAttributes, domain: ['REQ'] },
178
- { id: 'FM-02', name: 'RiskReqMitigation', severity: 'warning', evaluate: fm02MissingMitigation, domain: ['REQ'] },
179
- { id: 'FM-03', name: 'HighRiskVerification', severity: 'warning', evaluate: fm03HighRiskUnverified, domain: ['REQ'] },
177
+ { id: 'FM-01', name: 'RiskReqFmeaAttributes', severity: 'warning', stage: 3, evaluate: fm01MissingFmeaAttributes, domain: ['REQ'] },
178
+ { id: 'FM-02', name: 'RiskReqMitigation', severity: 'warning', stage: 3, evaluate: fm02MissingMitigation, domain: ['REQ'] },
179
+ { id: 'FM-03', name: 'HighRiskVerification', severity: 'warning', stage: 9, evaluate: fm03HighRiskUnverified, domain: ['REQ'] },
180
180
  // CR-SM-243: die Regel prueft drei Typen, nicht einen — physische Budgets am MOD
181
181
  // (PHYSICAL_BUDGET_TYPES), Verhaltensbudgets an FUNC und FCHAIN (BEHAVIORAL_BUDGET_TYPES).
182
182
  // Die domain nennt dieselben Mengen wie die beiden Konstanten oben; wer eine davon
183
183
  // erweitert, zieht diese Zeile mit.
184
- { id: 'NFR-01', name: 'BudgetOvershoot', severity: 'warning', evaluate: nfr01BudgetOvershoot, domain: ['MOD', 'FUNC', 'FCHAIN'] },
184
+ { id: 'NFR-01', name: 'BudgetOvershoot', severity: 'warning', stage: 7, evaluate: nfr01BudgetOvershoot, domain: ['MOD', 'FUNC', 'FCHAIN'] },
185
185
  ];
186
186
  export function evaluateFMRules(graph, policy) {
187
187
  return FM_RULES.flatMap(rule => rule.evaluate(graph, policy));
@@ -65,7 +65,7 @@ export function attributeTypeOf(elementType, key) {
65
65
  export function hydrateAttrValue(raw, declaredType) {
66
66
  // CR-SM-251: `concept:true` kam als String "true" an, und alle 11 Vergleiche in
67
67
  // rules.ts/conformance-rules.ts pruefen identitaetsscharf (`=== true`). Damit war jeder
68
- // Ausnahme-Schalter (concept/external/safety_relevant/spike) ueber Format-E unerreichbar:
68
+ // Ausnahme-Schalter (damals concept, heute external/safety_relevant/spike) ueber Format-E unerreichbar:
69
69
  // der Autor befolgt den fix_hint woertlich, und die Warnung bleibt stehen. Ein Export-Reimport
70
70
  // entwertete zusaetzlich jede bestehende Ausnahme still.
71
71
  if (declaredType === 'boolean') {
@@ -11,18 +11,18 @@
11
11
  */
12
12
  export declare const GRAMMAR_SNAPSHOT: {
13
13
  readonly versions: {
14
- readonly ontology: "10.2.0";
14
+ readonly ontology: "11.0.0";
15
15
  readonly metaModel: "6.0.0";
16
- readonly rules: "34.1.0";
16
+ readonly rules: "41.0.0";
17
17
  };
18
18
  readonly elementTypes: readonly ["ACTOR", "CR", "FCHAIN", "FLOW", "FUNC", "MOD", "MS", "REQ", "SCHEMA", "SYS", "TEST", "UC"];
19
19
  readonly traceTypes: readonly ["allocate", "compose", "io", "relation", "satisfy", "verify"];
20
20
  readonly patterns: readonly ["ACTOR -io-> FLOW", "CR -relation-> FUNC", "CR -relation-> MOD", "CR -relation-> MS", "CR -relation-> REQ", "CR -relation-> SCHEMA", "CR -relation-> UC", "FCHAIN -compose-> FUNC [1..*]", "FCHAIN -satisfy-> REQ where target.kinds in {non-functional}", "FLOW -io-> ACTOR", "FLOW -io-> FUNC", "FLOW -relation-> SCHEMA [1]", "FUNC -allocate-> MOD [0..1]", "FUNC -compose-> FUNC [0..*]", "FUNC -io-> FLOW", "FUNC -satisfy-> REQ where target.kinds in {functional}", "MOD -compose-> MOD [0..*]", "MOD -satisfy-> REQ where target.kinds in {non-functional}", "MS -compose-> FUNC", "MS -compose-> REQ", "MS -compose-> UC", "MS -relation-> MS label=depends-on", "REQ -compose-> REQ [0..*]", "SYS -compose-> MOD [0..*]", "SYS -compose-> REQ [0..*]", "SYS -compose-> SYS [0..*]", "SYS -compose-> UC [1..*]", "SYS -satisfy-> REQ where target.kinds in {non-functional}", "TEST -verify-> REQ", "TEST -verify-> SCHEMA", "UC -compose-> FCHAIN [1..*]", "UC -compose-> REQ [1..*]"];
21
21
  readonly elementColumns: readonly ["OntologyElement.attributes", "OntologyElement.created_at", "OntologyElement.description", "OntologyElement.id", "OntologyElement.kinds", "OntologyElement.method", "OntologyElement.name", "OntologyElement.status", "OntologyElement.type", "OntologyElement.updated_at", "Trace.attributes", "Trace.created_at", "Trace.label", "Trace.source", "Trace.target", "Trace.type", "Trace.verified_at", "Trace.weight"];
22
- readonly attributes: readonly ["CR.architectureOnly: boolean", "CR.rationale: string", "CR.spike: boolean", "CR.status: enum", "FLOW.sync: enum", "FUNC.concept: boolean", "FUNC.external: boolean", "FUNC.measuredMs: number", "FUNC.realRef: object", "FUNC.safety_relevant: boolean", "FUNC.sourceFile: string", "FUNC.timingBudgetMs: number", "MOD.concept: boolean", "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.concept: boolean", "SCHEMA.contract: string", "SCHEMA.external: boolean", "SCHEMA.realRef: object", "TEST.concept: boolean", "TEST.sourceFile: string", "TEST.testRefs: array", "UC.operatingMode: string"];
23
- readonly rules: readonly ["AF-01 (warning) domain=[graph]", "AF-02 (warning) domain=[graph]", "AF-03 (warning) domain=[graph]", "AF-04 (warning) domain=[graph]", "AF-05 (warning) domain=[graph]", "BQ-01 (warning) domain=[REQ]", "BQ-02 (warning) domain=[REQ]", "BQ-04 (warning) domain=[REQ]", "BQ-06 (warning) domain=[REQ]", "BQ-07 (warning) domain=[REQ]", "BW-02 (warning) domain=[FUNC]", "CL-01 (warning) domain=[ACTOR]", "CR-01 (warning) domain=[MOD]", "CR-R01 (warning) domain=[CR]", "CR-R02 (warning) domain=[CR]", "CR-R03 (warning) domain=[all]", "CR-R05 (warning) domain=[REQ]", "FC-02 (warning) domain=[UC]", "FC-03 (warning) domain=[FUNC]", "FC-04 (warning) domain=[FCHAIN]", "FC-05 (warning) domain=[FCHAIN]", "FM-01 (warning) domain=[REQ]", "FM-02 (warning) domain=[REQ]", "FM-03 (warning) domain=[REQ]", "IO-01 (warning) domain=[FUNC]", "IO-02 (error) domain=[FLOW]", "IR-01 (warning) domain=[graph]", "MS-01 (warning) domain=[MS]", "MS-02 (warning) domain=[MS]", "MS-03 (info) domain=[CR]", "MT-01 (warning) domain=[MOD]", "MT-02 (warning) domain=[MOD]", "MT-04 (info) domain=[FUNC]", "ND-01 (warning) domain=[FUNC]", "ND-02 (warning) domain=[SCHEMA]", "NFR-01 (warning) domain=[FCHAIN,FUNC,MOD]", "R-01 (error) domain=[REQ]", "R-02 (warning) domain=[FUNC]", "R-04 (warning) domain=[MOD]", "R-05 (warning) domain=[TEST]", "R-08 (error) domain=[all]", "R-10 (warning) domain=[FLOW]", "R-12 (warning) domain=[FUNC]", "R-15 (warning) domain=[FCHAIN]", "R-16 (warning) domain=[ACTOR]", "R-17 (warning) domain=[SYS]", "R-18 (error) domain=[all]", "R-19 (warning) domain=[TEST]", "R-20 (warning) domain=[FUNC]", "R-21 (warning) domain=[FCHAIN,FUNC]", "R-22 (warning) domain=[FUNC]", "R-23 (warning) domain=[MOD]", "R-26 (warning) domain=[SCHEMA]", "R-29 (error) domain=[TEST]", "R-30 (warning) domain=[FUNC]", "R-31 (warning) domain=[FUNC]", "R-32 (warning) domain=[SCHEMA]", "RC-01 (warning) domain=[FUNC]", "RC-02 (warning) domain=[TEST]", "RC-03 (warning) domain=[SCHEMA]", "RC-04 (warning) domain=[SCHEMA]", "RC-05 (warning) domain=[MOD]", "RC-06 (warning) domain=[FUNC,MOD,SCHEMA]", "RC-07 (warning) domain=[CR,SYS]", "RC-08 (warning) domain=[SCHEMA]", "RC-09 (warning) domain=[SCHEMA]", "RC-10 (warning) domain=[MOD]", "RD-01 (warning) domain=[REQ]", "RD-02 (warning) domain=[REQ]", "RD-04 (warning) domain=[FUNC,MOD,SYS]", "RD-05 (warning) domain=[FUNC,MOD]", "SC-02 (warning) domain=[SCHEMA]", "TR-01 (warning) domain=[graph]", "UC-01 (warning) domain=[UC]", "UC-02 (warning) domain=[UC]", "UC-03 (warning) domain=[UC]", "UC-04 (warning) domain=[UC]", "VR-01 (info) domain=[TEST]"];
22
+ readonly attributes: readonly ["CR.architectureOnly: boolean", "CR.rationale: string", "CR.spike: boolean", "CR.status: enum", "FLOW.sync: enum", "FUNC.external: boolean", "FUNC.measuredMs: number", "FUNC.realRef: object", "FUNC.safety_relevant: boolean", "FUNC.sourceFile: string", "FUNC.timingBudgetMs: number", "MOD.external: boolean", "MOD.kind: string", "MOD.path: string", "MOD.realRef: object", "REQ.detection: number", "REQ.occurrence: number", "REQ.role: enum", "REQ.severity: number", "SCHEMA.contract: string", "SCHEMA.external: boolean", "SCHEMA.realRef: object", "TEST.sourceFile: string", "TEST.testRefs: array", "UC.operatingMode: string"];
23
+ readonly rules: readonly ["AF-01 (warning) domain=[graph] stage=3 role=analysis", "AF-02 (warning) domain=[graph] stage=7 role=analysis", "AF-03 (warning) domain=[graph] stage=7 role=analysis", "AF-04 (warning) domain=[graph] stage=8 role=analysis", "AF-05 (warning) domain=[graph] stage=10 role=existence", "BQ-01 (warning) domain=[REQ] stage=3", "BQ-02 (warning) domain=[REQ] stage=3", "BQ-04 (warning) domain=[REQ] stage=3", "BQ-06 (warning) domain=[REQ] stage=3", "BQ-07 (warning) domain=[REQ] stage=3", "BW-02 (warning) domain=[FUNC] stage=5", "CL-01 (warning) domain=[ACTOR] stage=2", "CR-01 (warning) domain=[MOD] stage=7", "CR-R01 (warning) domain=[CR] stage=10", "CR-R02 (warning) domain=[CR] stage=10", "CR-R03 (warning) domain=[all] stage=immer", "FC-02 (warning) domain=[UC] stage=2", "FC-03 (warning) domain=[FUNC] stage=5", "FC-04 (warning) domain=[FCHAIN] stage=6", "FC-05 (warning) domain=[FCHAIN] stage=6", "FM-01 (warning) domain=[REQ] stage=3", "FM-02 (warning) domain=[REQ] stage=3", "FM-03 (warning) domain=[REQ] stage=9", "IO-01 (warning) domain=[FUNC] stage=5", "IO-02 (error) domain=[FLOW] stage=6", "IR-01 (warning) domain=[graph] stage=7 role=analysis", "MS-01 (warning) domain=[MS] stage=10", "MS-02 (warning) domain=[MS] stage=10", "MS-03 (info) domain=[CR] stage=10", "MT-01 (warning) domain=[MOD] stage=7", "MT-02 (warning) domain=[MOD] stage=7", "MT-04 (info) domain=[FUNC] stage=5", "ND-01 (warning) domain=[FUNC] stage=5", "ND-02 (warning) domain=[SCHEMA] stage=8", "NFR-01 (warning) domain=[FCHAIN,FUNC,MOD] stage=7", "R-01 (error) domain=[REQ] stage=9 role=existence", "R-02 (warning) domain=[FUNC] stage=5", "R-04 (warning) domain=[MOD] stage=7", "R-05 (warning) domain=[TEST] stage=9", "R-08 (error) domain=[all] stage=immer", "R-10 (warning) domain=[FLOW] stage=6", "R-12 (warning) domain=[FUNC] stage=5", "R-15 (warning) domain=[FCHAIN] stage=5 role=existence", "R-16 (warning) domain=[ACTOR] stage=2", "R-17 (warning) domain=[SYS] stage=2 role=existence", "R-18 (error) domain=[all] stage=immer", "R-19 (warning) domain=[TEST] stage=11", "R-20 (warning) domain=[FUNC] stage=11", "R-21 (warning) domain=[FCHAIN,FUNC] stage=9", "R-22 (warning) domain=[FUNC] stage=7 role=existence", "R-23 (warning) domain=[MOD] stage=7", "R-26 (warning) domain=[SCHEMA] stage=11", "R-29 (error) domain=[TEST] stage=11", "R-30 (warning) domain=[FUNC] stage=5", "R-31 (warning) domain=[FUNC] stage=6 role=existence", "R-32 (warning) domain=[SCHEMA] stage=9 role=existence", "R-33 (warning) domain=[graph] stage=1 role=existence", "RC-01 (warning) domain=[FUNC] stage=12", "RC-02 (warning) domain=[TEST] stage=12", "RC-03 (warning) domain=[SCHEMA] stage=12", "RC-04 (warning) domain=[SCHEMA] stage=12", "RC-05 (warning) domain=[MOD] stage=10", "RC-06 (warning) domain=[FUNC,MOD,SCHEMA] stage=12", "RC-07 (warning) domain=[CR,SYS] stage=10", "RC-08 (warning) domain=[SCHEMA] stage=12", "RC-09 (warning) domain=[SCHEMA] stage=12", "RC-10 (warning) domain=[MOD] stage=12", "RD-01 (warning) domain=[REQ] stage=3", "RD-02 (warning) domain=[REQ] stage=3", "RD-04 (warning) domain=[FUNC,MOD,SYS] stage=7", "RD-05 (warning) domain=[FUNC,MOD] stage=7", "SC-02 (warning) domain=[SCHEMA] stage=8", "TR-01 (warning) domain=[graph] stage=7 role=analysis", "UC-01 (warning) domain=[UC] stage=3 role=existence", "UC-02 (warning) domain=[UC] stage=2 role=existence", "UC-03 (warning) domain=[UC] stage=4 role=existence", "UC-04 (warning) domain=[UC] stage=2", "VR-01 (info) domain=[TEST] stage=11"];
24
24
  readonly conformanceRules: readonly ["RC-01 (warning)", "RC-02 (warning)", "RC-03 (warning)", "RC-04 (warning)", "RC-05 (warning)", "RC-06 (warning)", "RC-07 (warning)", "RC-08 (warning)", "RC-09 (warning)", "RC-10 (warning)"];
25
25
  readonly policy: readonly ["apTable = null", "boundaryWidth = {warning:5}", "criticality = {infrastructure:3}", "crossingFlows = {warning:3}", "decompositionBreadth = {min:3,warning:9}", "instability = null", "lcom4 = {info:4,warning:6}", "riskRpn = 100"];
26
- readonly ruleHelp: readonly ["AF-01", "AF-02", "AF-03", "AF-04", "AF-05", "BQ-01", "BQ-02", "BQ-04", "BQ-06", "BQ-07", "BW-02", "CL-01", "CR-01", "CR-R01", "CR-R02", "CR-R03", "CR-R05", "FC-02", "FC-03", "FC-04", "FC-05", "FM-01", "FM-02", "FM-03", "IO-01", "IO-02", "IR-01", "MS-01", "MS-02", "MS-03", "MT-01", "MT-02", "MT-04", "ND-01", "ND-02", "NFR-01", "R-01", "R-02", "R-04", "R-05", "R-08", "R-10", "R-12", "R-15", "R-16", "R-17", "R-18", "R-19", "R-20", "R-21", "R-22", "R-23", "R-26", "R-29", "R-30", "R-31", "R-32", "RC-01", "RC-02", "RC-03", "RC-04", "RC-05", "RC-06", "RC-07", "RC-08", "RC-09", "RC-10", "RD-01", "RD-02", "RD-04", "RD-05", "SC-02", "TR-01", "UC-01", "UC-02", "UC-03", "UC-04", "VR-01"];
27
- readonly exports: readonly ["ACCEPTED_FINDINGS_ATTRIBUTE", "AF_RULES", "ALL_RULE_DEFS", "AO_RULES", "AcceptedFindingSchema", "ActionPriority", "AnalysisArtifactId", "AnalysisFreshnessStampSchema", "ApTableSchema", "BOUNDED_PATTERNS", "BQ_RULES", "CLOSED_STATUS", "CODE_CONFORMANCE_RULES", "CR_RULES", "CodeFactsSchema", "DEFAULT_METRIC_POLICY", "DIMENSION_READINESS_DELTA_NAME", "DIMENSION_READINESS_NAME", "ELEMENT_ATTRIBUTES", "ELEMENT_DESCRIPTIONS", "ElementType", "ElementUid", "FC_RULES", "FM_RULES", "FileFactsSchema", "FlowSync", "FunctionCriticality", "ImportEdgeSchema", "MAX_SLUG_LENGTH", "META_MODEL_VERSION", "MODELING_ELEMENT_TYPES", "MT_RULES", "MetricPolicySchema", "ModuleMetrics", "ND_RULES", "ONTOLOGY_VERSION", "OntologyElement", "OntologyGraph", "PHASE_READINESS_NAME", "PhaseGate", "READINESS_SCORED_PROFILES", "REQUIRED_PATTERNS", "RULES_VERSION", "RULE_HELP", "RULE_PRECONDITION", "RULE_TASKS", "RULE_TO_DIMENSION", "RULE_TO_PHASE", "ReadinessDimension", "ReadinessReport", "ReadinessScore", "RealRefSchema", "RepoRelativePathSchema", "ReqKind", "ReqRole", "RuleSeverity", "RuleViolation", "SC_RULES", "SteerSpace", "SteerTerm", "TASK_ENTRY", "TASK_OUTCOME_RULES", "TASK_OWNED_RULES", "TRACE_PATTERNS", "TestRefSchema", "TestRefsSchema", "TestResult", "Trace", "TraceType", "UC_RULES", "V3_RULES", "VIEW_RULES", "VerificationMethod", "ViolationCandidate", "ViolationContext", "acceptedRuleIds", "actionPriority", "admittingAlternatives", "allocationCohesion", "apMethod", "assumptionReviewPromoted", "attributeTypeOf", "boxContracts", "bq01Unambiguous", "bq02Verifiable", "bq04Necessary", "bq06Conforming", "bq07Complete", "bw02WhiteboxWidth", "chainsByFunc", "cl01ConopsCompleteness", "cr01CrossingFlowCount", "crossingContractCount", "decomposedFuncs", "evaluateAFRules", "evaluateAORules", "evaluateAllRules", "evaluateBQRules", "evaluateCRRules", "evaluateConformanceRules", "evaluateFCRules", "evaluateFMRules", "evaluateMTRules", "evaluateNDRules", "evaluateRules", "evaluateSCRules", "evaluateTaskOutcomeRules", "evaluateUCRules", "evaluateViewRules", "extractFormatE", "fc02LeafUcHasFchain", "fc03FchainFlat", "fc04ActorBounded", "fc05ChainConnected", "flowProducers", "fm01MissingFmeaAttributes", "fm02MissingMitigation", "fm03HighRiskUnverified", "funcSimilarity", "funcSubtree", "functionCriticality", "getRuleDefsForProfile", "hydrateAttrValue", "importCoverage", "indexOf", "io01CrossModuleCompleteness", "isElementUid", "isValidTrace", "jaccard", "maxOccurs", "minOccurs", "moduleCrossings", "moduleMetrics", "mt01Instability", "mt02Lcom4", "mt04WhiteboxLcom4", "nd01FuncNearDuplicate", "nd02SchemaNearDuplicate", "nfr01BudgetOvershoot", "normalizeReqKinds", "pairsAbove", "parseElementUid", "readFlowSync", "readRealRef", "readReqRole", "readTestRefs", "ruleApplies", "sc02IsReferenced", "schemaSimilarity", "setBQ04SimilarityMatrix", "subtreeFuncs", "taskOf", "toElementUid", "toEvaluableGraph", "tokens", "traceRejection", "tradeDecisionRecorded", "tryParseElementUid", "uc01HasRequirements", "uc02HasActor", "uc03HasScenario", "uc04GoalDefined", "vr01TestNoResult", "whiteboxContractCount"];
26
+ readonly ruleHelp: readonly ["AF-01", "AF-02", "AF-03", "AF-04", "AF-05", "BQ-01", "BQ-02", "BQ-04", "BQ-06", "BQ-07", "BW-02", "CL-01", "CR-01", "CR-R01", "CR-R02", "CR-R03", "FC-02", "FC-03", "FC-04", "FC-05", "FM-01", "FM-02", "FM-03", "IO-01", "IO-02", "IR-01", "MS-01", "MS-02", "MS-03", "MT-01", "MT-02", "MT-04", "ND-01", "ND-02", "NFR-01", "R-01", "R-02", "R-04", "R-05", "R-08", "R-10", "R-12", "R-15", "R-16", "R-17", "R-18", "R-19", "R-20", "R-21", "R-22", "R-23", "R-26", "R-29", "R-30", "R-31", "R-32", "R-33", "RC-01", "RC-02", "RC-03", "RC-04", "RC-05", "RC-06", "RC-07", "RC-08", "RC-09", "RC-10", "RD-01", "RD-02", "RD-04", "RD-05", "SC-02", "TR-01", "UC-01", "UC-02", "UC-03", "UC-04", "VR-01"];
27
+ readonly exports: readonly ["ACCEPTED_FINDINGS_ATTRIBUTE", "AF_RULES", "ALL_RULE_DEFS", "AO_RULES", "AcceptedFindingSchema", "ActionPriority", "AnalysisArtifactId", "AnalysisFreshnessStampSchema", "ApTableSchema", "BOUNDED_PATTERNS", "BQ_RULES", "CLOSED_STATUS", "CODE_CONFORMANCE_RULES", "CR_RULES", "CodeFactsSchema", "DEFAULT_METRIC_POLICY", "DIMENSION_READINESS_DELTA_NAME", "DIMENSION_READINESS_NAME", "ELEMENT_ATTRIBUTES", "ELEMENT_DESCRIPTIONS", "ElementType", "ElementUid", "FC_RULES", "FM_RULES", "FileFactsSchema", "FlowSync", "FunctionCriticality", "GRAPH_ANCHOR", "ImportEdgeSchema", "MARK_STAGE", "MAX_SLUG_LENGTH", "META_MODEL_VERSION", "MODELING_ELEMENT_TYPES", "MT_RULES", "Mark", "MetricPolicySchema", "ModuleMetrics", "ND_RULES", "ONTOLOGY_VERSION", "OntologyElement", "OntologyGraph", "PHASE_READINESS_NAME", "READINESS_SCORED_PROFILES", "REQUIRED_PATTERNS", "RULES_VERSION", "RULE_HELP", "RULE_TASKS", "RULE_TO_DIMENSION", "ReadinessDimension", "ReadinessReport", "ReadinessScore", "RealRefSchema", "RepoRelativePathSchema", "ReqKind", "ReqRole", "RuleSeverity", "RuleViolation", "SC_RULES", "STAGE_SETS", "SteerSpace", "SteerTerm", "TASK_ENTRY", "TASK_OUTCOME_RULES", "TASK_OWNED_RULES", "TRACE_PATTERNS", "TestRefSchema", "TestRefsSchema", "TestResult", "Trace", "TraceType", "UC_RULES", "V3_RULES", "VIEW_RULES", "VerificationMethod", "ViolationCandidate", "ViolationContext", "acceptedRuleIds", "actionPriority", "admittingAlternatives", "allocationCohesion", "apMethod", "assumptionReviewRequirementsExist", "attributeTypeOf", "boxContracts", "bq01Unambiguous", "bq02Verifiable", "bq04Necessary", "bq06Conforming", "bq07Complete", "bw02WhiteboxWidth", "chainsByFunc", "cl01ConopsCompleteness", "cr01CrossingFlowCount", "crossingContractCount", "decomposedFuncs", "evaluateAFRules", "evaluateAORules", "evaluateAllRules", "evaluateBQRules", "evaluateCRRules", "evaluateConformanceRules", "evaluateFCRules", "evaluateFMRules", "evaluateMTRules", "evaluateNDRules", "evaluateRules", "evaluateSCRules", "evaluateTaskOutcomeRules", "evaluateUCRules", "evaluateViewRules", "extractFormatE", "fc02LeafUcHasFchain", "fc03FchainFlat", "fc04ActorBounded", "fc05ChainConnected", "flowProducers", "fm01MissingFmeaAttributes", "fm02MissingMitigation", "fm03HighRiskUnverified", "funcSimilarity", "funcSubtree", "functionCriticality", "getRuleDefsForProfile", "hydrateAttrValue", "importCoverage", "indexOf", "io01CrossModuleCompleteness", "isDue", "isElementUid", "isValidTrace", "jaccard", "markOfStage", "maxOccurs", "minOccurs", "moduleCrossings", "moduleMetrics", "mt01Instability", "mt02Lcom4", "mt04WhiteboxLcom4", "nd01FuncNearDuplicate", "nd02SchemaNearDuplicate", "nfr01BudgetOvershoot", "normalizeReqKinds", "pairsAbove", "parseElementUid", "readAnalysisStamp", "readFlowSync", "readRealRef", "readReqRole", "readTestRefs", "sc02IsReferenced", "schemaSimilarity", "setBQ04SimilarityMatrix", "subtreeFuncs", "taskOf", "toElementUid", "toEvaluableGraph", "tokens", "traceRejection", "tradeDecisionRecorded", "tryParseElementUid", "uc01HasRequirements", "uc02HasActor", "uc03HasScenario", "uc04GoalDefined", "unbuiltElementIds", "vr01TestNoResult", "whiteboxContractCount"];
28
28
  };
@@ -11,9 +11,9 @@
11
11
  */
12
12
  export const GRAMMAR_SNAPSHOT = {
13
13
  versions: {
14
- ontology: "10.2.0",
14
+ ontology: "11.0.0",
15
15
  metaModel: "6.0.0",
16
- rules: "34.1.0",
16
+ rules: "41.0.0",
17
17
  },
18
18
  elementTypes: [
19
19
  "ACTOR",
@@ -97,14 +97,12 @@ export const GRAMMAR_SNAPSHOT = {
97
97
  "CR.spike: boolean",
98
98
  "CR.status: enum",
99
99
  "FLOW.sync: enum",
100
- "FUNC.concept: boolean",
101
100
  "FUNC.external: boolean",
102
101
  "FUNC.measuredMs: number",
103
102
  "FUNC.realRef: object",
104
103
  "FUNC.safety_relevant: boolean",
105
104
  "FUNC.sourceFile: string",
106
105
  "FUNC.timingBudgetMs: number",
107
- "MOD.concept: boolean",
108
106
  "MOD.external: boolean",
109
107
  "MOD.kind: string",
110
108
  "MOD.path: string",
@@ -113,94 +111,92 @@ export const GRAMMAR_SNAPSHOT = {
113
111
  "REQ.occurrence: number",
114
112
  "REQ.role: enum",
115
113
  "REQ.severity: number",
116
- "SCHEMA.concept: boolean",
117
114
  "SCHEMA.contract: string",
118
115
  "SCHEMA.external: boolean",
119
116
  "SCHEMA.realRef: object",
120
- "TEST.concept: boolean",
121
117
  "TEST.sourceFile: string",
122
118
  "TEST.testRefs: array",
123
119
  "UC.operatingMode: string",
124
120
  ],
125
121
  rules: [
126
- "AF-01 (warning) domain=[graph]",
127
- "AF-02 (warning) domain=[graph]",
128
- "AF-03 (warning) domain=[graph]",
129
- "AF-04 (warning) domain=[graph]",
130
- "AF-05 (warning) domain=[graph]",
131
- "BQ-01 (warning) domain=[REQ]",
132
- "BQ-02 (warning) domain=[REQ]",
133
- "BQ-04 (warning) domain=[REQ]",
134
- "BQ-06 (warning) domain=[REQ]",
135
- "BQ-07 (warning) domain=[REQ]",
136
- "BW-02 (warning) domain=[FUNC]",
137
- "CL-01 (warning) domain=[ACTOR]",
138
- "CR-01 (warning) domain=[MOD]",
139
- "CR-R01 (warning) domain=[CR]",
140
- "CR-R02 (warning) domain=[CR]",
141
- "CR-R03 (warning) domain=[all]",
142
- "CR-R05 (warning) domain=[REQ]",
143
- "FC-02 (warning) domain=[UC]",
144
- "FC-03 (warning) domain=[FUNC]",
145
- "FC-04 (warning) domain=[FCHAIN]",
146
- "FC-05 (warning) domain=[FCHAIN]",
147
- "FM-01 (warning) domain=[REQ]",
148
- "FM-02 (warning) domain=[REQ]",
149
- "FM-03 (warning) domain=[REQ]",
150
- "IO-01 (warning) domain=[FUNC]",
151
- "IO-02 (error) domain=[FLOW]",
152
- "IR-01 (warning) domain=[graph]",
153
- "MS-01 (warning) domain=[MS]",
154
- "MS-02 (warning) domain=[MS]",
155
- "MS-03 (info) domain=[CR]",
156
- "MT-01 (warning) domain=[MOD]",
157
- "MT-02 (warning) domain=[MOD]",
158
- "MT-04 (info) domain=[FUNC]",
159
- "ND-01 (warning) domain=[FUNC]",
160
- "ND-02 (warning) domain=[SCHEMA]",
161
- "NFR-01 (warning) domain=[FCHAIN,FUNC,MOD]",
162
- "R-01 (error) domain=[REQ]",
163
- "R-02 (warning) domain=[FUNC]",
164
- "R-04 (warning) domain=[MOD]",
165
- "R-05 (warning) domain=[TEST]",
166
- "R-08 (error) domain=[all]",
167
- "R-10 (warning) domain=[FLOW]",
168
- "R-12 (warning) domain=[FUNC]",
169
- "R-15 (warning) domain=[FCHAIN]",
170
- "R-16 (warning) domain=[ACTOR]",
171
- "R-17 (warning) domain=[SYS]",
172
- "R-18 (error) domain=[all]",
173
- "R-19 (warning) domain=[TEST]",
174
- "R-20 (warning) domain=[FUNC]",
175
- "R-21 (warning) domain=[FCHAIN,FUNC]",
176
- "R-22 (warning) domain=[FUNC]",
177
- "R-23 (warning) domain=[MOD]",
178
- "R-26 (warning) domain=[SCHEMA]",
179
- "R-29 (error) domain=[TEST]",
180
- "R-30 (warning) domain=[FUNC]",
181
- "R-31 (warning) domain=[FUNC]",
182
- "R-32 (warning) domain=[SCHEMA]",
183
- "RC-01 (warning) domain=[FUNC]",
184
- "RC-02 (warning) domain=[TEST]",
185
- "RC-03 (warning) domain=[SCHEMA]",
186
- "RC-04 (warning) domain=[SCHEMA]",
187
- "RC-05 (warning) domain=[MOD]",
188
- "RC-06 (warning) domain=[FUNC,MOD,SCHEMA]",
189
- "RC-07 (warning) domain=[CR,SYS]",
190
- "RC-08 (warning) domain=[SCHEMA]",
191
- "RC-09 (warning) domain=[SCHEMA]",
192
- "RC-10 (warning) domain=[MOD]",
193
- "RD-01 (warning) domain=[REQ]",
194
- "RD-02 (warning) domain=[REQ]",
195
- "RD-04 (warning) domain=[FUNC,MOD,SYS]",
196
- "RD-05 (warning) domain=[FUNC,MOD]",
197
- "SC-02 (warning) domain=[SCHEMA]",
198
- "TR-01 (warning) domain=[graph]",
199
- "UC-01 (warning) domain=[UC]",
200
- "UC-02 (warning) domain=[UC]",
201
- "UC-03 (warning) domain=[UC]",
202
- "UC-04 (warning) domain=[UC]",
203
- "VR-01 (info) domain=[TEST]",
122
+ "AF-01 (warning) domain=[graph] stage=3 role=analysis",
123
+ "AF-02 (warning) domain=[graph] stage=7 role=analysis",
124
+ "AF-03 (warning) domain=[graph] stage=7 role=analysis",
125
+ "AF-04 (warning) domain=[graph] stage=8 role=analysis",
126
+ "AF-05 (warning) domain=[graph] stage=10 role=existence",
127
+ "BQ-01 (warning) domain=[REQ] stage=3",
128
+ "BQ-02 (warning) domain=[REQ] stage=3",
129
+ "BQ-04 (warning) domain=[REQ] stage=3",
130
+ "BQ-06 (warning) domain=[REQ] stage=3",
131
+ "BQ-07 (warning) domain=[REQ] stage=3",
132
+ "BW-02 (warning) domain=[FUNC] stage=5",
133
+ "CL-01 (warning) domain=[ACTOR] stage=2",
134
+ "CR-01 (warning) domain=[MOD] stage=7",
135
+ "CR-R01 (warning) domain=[CR] stage=10",
136
+ "CR-R02 (warning) domain=[CR] stage=10",
137
+ "CR-R03 (warning) domain=[all] stage=immer",
138
+ "FC-02 (warning) domain=[UC] stage=2",
139
+ "FC-03 (warning) domain=[FUNC] stage=5",
140
+ "FC-04 (warning) domain=[FCHAIN] stage=6",
141
+ "FC-05 (warning) domain=[FCHAIN] stage=6",
142
+ "FM-01 (warning) domain=[REQ] stage=3",
143
+ "FM-02 (warning) domain=[REQ] stage=3",
144
+ "FM-03 (warning) domain=[REQ] stage=9",
145
+ "IO-01 (warning) domain=[FUNC] stage=5",
146
+ "IO-02 (error) domain=[FLOW] stage=6",
147
+ "IR-01 (warning) domain=[graph] stage=7 role=analysis",
148
+ "MS-01 (warning) domain=[MS] stage=10",
149
+ "MS-02 (warning) domain=[MS] stage=10",
150
+ "MS-03 (info) domain=[CR] stage=10",
151
+ "MT-01 (warning) domain=[MOD] stage=7",
152
+ "MT-02 (warning) domain=[MOD] stage=7",
153
+ "MT-04 (info) domain=[FUNC] stage=5",
154
+ "ND-01 (warning) domain=[FUNC] stage=5",
155
+ "ND-02 (warning) domain=[SCHEMA] stage=8",
156
+ "NFR-01 (warning) domain=[FCHAIN,FUNC,MOD] stage=7",
157
+ "R-01 (error) domain=[REQ] stage=9 role=existence",
158
+ "R-02 (warning) domain=[FUNC] stage=5",
159
+ "R-04 (warning) domain=[MOD] stage=7",
160
+ "R-05 (warning) domain=[TEST] stage=9",
161
+ "R-08 (error) domain=[all] stage=immer",
162
+ "R-10 (warning) domain=[FLOW] stage=6",
163
+ "R-12 (warning) domain=[FUNC] stage=5",
164
+ "R-15 (warning) domain=[FCHAIN] stage=5 role=existence",
165
+ "R-16 (warning) domain=[ACTOR] stage=2",
166
+ "R-17 (warning) domain=[SYS] stage=2 role=existence",
167
+ "R-18 (error) domain=[all] stage=immer",
168
+ "R-19 (warning) domain=[TEST] stage=11",
169
+ "R-20 (warning) domain=[FUNC] stage=11",
170
+ "R-21 (warning) domain=[FCHAIN,FUNC] stage=9",
171
+ "R-22 (warning) domain=[FUNC] stage=7 role=existence",
172
+ "R-23 (warning) domain=[MOD] stage=7",
173
+ "R-26 (warning) domain=[SCHEMA] stage=11",
174
+ "R-29 (error) domain=[TEST] stage=11",
175
+ "R-30 (warning) domain=[FUNC] stage=5",
176
+ "R-31 (warning) domain=[FUNC] stage=6 role=existence",
177
+ "R-32 (warning) domain=[SCHEMA] stage=9 role=existence",
178
+ "R-33 (warning) domain=[graph] stage=1 role=existence",
179
+ "RC-01 (warning) domain=[FUNC] stage=12",
180
+ "RC-02 (warning) domain=[TEST] stage=12",
181
+ "RC-03 (warning) domain=[SCHEMA] stage=12",
182
+ "RC-04 (warning) domain=[SCHEMA] stage=12",
183
+ "RC-05 (warning) domain=[MOD] stage=10",
184
+ "RC-06 (warning) domain=[FUNC,MOD,SCHEMA] stage=12",
185
+ "RC-07 (warning) domain=[CR,SYS] stage=10",
186
+ "RC-08 (warning) domain=[SCHEMA] stage=12",
187
+ "RC-09 (warning) domain=[SCHEMA] stage=12",
188
+ "RC-10 (warning) domain=[MOD] stage=12",
189
+ "RD-01 (warning) domain=[REQ] stage=3",
190
+ "RD-02 (warning) domain=[REQ] stage=3",
191
+ "RD-04 (warning) domain=[FUNC,MOD,SYS] stage=7",
192
+ "RD-05 (warning) domain=[FUNC,MOD] stage=7",
193
+ "SC-02 (warning) domain=[SCHEMA] stage=8",
194
+ "TR-01 (warning) domain=[graph] stage=7 role=analysis",
195
+ "UC-01 (warning) domain=[UC] stage=3 role=existence",
196
+ "UC-02 (warning) domain=[UC] stage=2 role=existence",
197
+ "UC-03 (warning) domain=[UC] stage=4 role=existence",
198
+ "UC-04 (warning) domain=[UC] stage=2",
199
+ "VR-01 (info) domain=[TEST] stage=11",
204
200
  ],
205
201
  conformanceRules: [
206
202
  "RC-01 (warning)",
@@ -241,7 +237,6 @@ export const GRAMMAR_SNAPSHOT = {
241
237
  "CR-R01",
242
238
  "CR-R02",
243
239
  "CR-R03",
244
- "CR-R05",
245
240
  "FC-02",
246
241
  "FC-03",
247
242
  "FC-04",
@@ -282,6 +277,7 @@ export const GRAMMAR_SNAPSHOT = {
282
277
  "R-30",
283
278
  "R-31",
284
279
  "R-32",
280
+ "R-33",
285
281
  "RC-01",
286
282
  "RC-02",
287
283
  "RC-03",
@@ -332,11 +328,14 @@ export const GRAMMAR_SNAPSHOT = {
332
328
  "FileFactsSchema",
333
329
  "FlowSync",
334
330
  "FunctionCriticality",
331
+ "GRAPH_ANCHOR",
335
332
  "ImportEdgeSchema",
333
+ "MARK_STAGE",
336
334
  "MAX_SLUG_LENGTH",
337
335
  "META_MODEL_VERSION",
338
336
  "MODELING_ELEMENT_TYPES",
339
337
  "MT_RULES",
338
+ "Mark",
340
339
  "MetricPolicySchema",
341
340
  "ModuleMetrics",
342
341
  "ND_RULES",
@@ -344,15 +343,12 @@ export const GRAMMAR_SNAPSHOT = {
344
343
  "OntologyElement",
345
344
  "OntologyGraph",
346
345
  "PHASE_READINESS_NAME",
347
- "PhaseGate",
348
346
  "READINESS_SCORED_PROFILES",
349
347
  "REQUIRED_PATTERNS",
350
348
  "RULES_VERSION",
351
349
  "RULE_HELP",
352
- "RULE_PRECONDITION",
353
350
  "RULE_TASKS",
354
351
  "RULE_TO_DIMENSION",
355
- "RULE_TO_PHASE",
356
352
  "ReadinessDimension",
357
353
  "ReadinessReport",
358
354
  "ReadinessScore",
@@ -363,6 +359,7 @@ export const GRAMMAR_SNAPSHOT = {
363
359
  "RuleSeverity",
364
360
  "RuleViolation",
365
361
  "SC_RULES",
362
+ "STAGE_SETS",
366
363
  "SteerSpace",
367
364
  "SteerTerm",
368
365
  "TASK_ENTRY",
@@ -385,7 +382,7 @@ export const GRAMMAR_SNAPSHOT = {
385
382
  "admittingAlternatives",
386
383
  "allocationCohesion",
387
384
  "apMethod",
388
- "assumptionReviewPromoted",
385
+ "assumptionReviewRequirementsExist",
389
386
  "attributeTypeOf",
390
387
  "boxContracts",
391
388
  "bq01Unambiguous",
@@ -431,9 +428,11 @@ export const GRAMMAR_SNAPSHOT = {
431
428
  "importCoverage",
432
429
  "indexOf",
433
430
  "io01CrossModuleCompleteness",
431
+ "isDue",
434
432
  "isElementUid",
435
433
  "isValidTrace",
436
434
  "jaccard",
435
+ "markOfStage",
437
436
  "maxOccurs",
438
437
  "minOccurs",
439
438
  "moduleCrossings",
@@ -447,11 +446,11 @@ export const GRAMMAR_SNAPSHOT = {
447
446
  "normalizeReqKinds",
448
447
  "pairsAbove",
449
448
  "parseElementUid",
449
+ "readAnalysisStamp",
450
450
  "readFlowSync",
451
451
  "readRealRef",
452
452
  "readReqRole",
453
453
  "readTestRefs",
454
- "ruleApplies",
455
454
  "sc02IsReferenced",
456
455
  "schemaSimilarity",
457
456
  "setBQ04SimilarityMatrix",
@@ -467,6 +466,7 @@ export const GRAMMAR_SNAPSHOT = {
467
466
  "uc02HasActor",
468
467
  "uc03HasScenario",
469
468
  "uc04GoalDefined",
469
+ "unbuiltElementIds",
470
470
  "vr01TestNoResult",
471
471
  "whiteboxContractCount",
472
472
  ],
@@ -3,9 +3,9 @@
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 = "10.2.0";
6
+ export declare const ONTOLOGY_VERSION = "11.0.0";
7
7
  /** Rules engine version (validation rules incl. RC conformance). */
8
- export declare const RULES_VERSION = "34.1.0";
8
+ export declare const RULES_VERSION = "41.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';
@@ -37,6 +37,7 @@ export * from './evaluate-all.js';
37
37
  export * from './flat-graph.js';
38
38
  export * from './graph-index.js';
39
39
  export * from './readiness.js';
40
+ export { isDue } from './rule-due.js';
40
41
  export * from './meta-model.js';
41
42
  export * from './element-uid.js';
42
43
  export * from './format-e-parser.js';