From 169258f535d4f12f5af82746c77a617345cbc901 Mon Sep 17 00:00:00 2001 From: Sascha Block Date: Sat, 4 Apr 2026 09:30:10 +0200 Subject: [PATCH] Goal: Implement the graph itself as a first-class model in dsl-core. Function: Describes the types for Graph profiles Allowed relation types Source/target types Graph constraints In other words: This is the TypeScript contract for the relationship model layer between artifacts. --- src/types/ArtifactGraph.ts | 45 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 src/types/ArtifactGraph.ts diff --git a/src/types/ArtifactGraph.ts b/src/types/ArtifactGraph.ts new file mode 100644 index 0000000..b6f4df7 --- /dev/null +++ b/src/types/ArtifactGraph.ts @@ -0,0 +1,45 @@ +export type ArtifactType = + | "WorkPackageAtom" + | "RequirementAtom" + | "DecisionAtom" + | "MilestoneAtom"; + +export interface ArtifactGraphRelationType { + name: string; + sourceTypes: ArtifactType[]; + targetTypes: ArtifactType[]; + cardinality: string; + acyclic: boolean; +} + +export interface ArtifactGraphConstraint { + id: string; + description: string; +} + +export interface ArtifactGraphDefinition { + rootType: ArtifactType; + relationTypes: ArtifactGraphRelationType[]; + constraints: ArtifactGraphConstraint[]; +} + +export interface ArtifactGraphProfile { + schemaVersion: string; + profileId: string; + name: string; + description: string; + artifactGraph: ArtifactGraphDefinition; + output?: { + report?: { + format: string; + ruleIdRequired: boolean; + deterministic: boolean; + includeSourceLocations: boolean; + exitCodes: { + ok: number; + invalid: number; + parse_error: number; + }; + }; + }; +}