Architecture (FLT-379 first slice)¶
Model¶
Immutable C# records: ArchitectureModel { SchemaVersion, SystemName,
Elements[], Relationships[], OmittedEdges }. Element kinds: Person,
ExternalSystem, SoftwareSystem, Boundary, Container, DataStore, Library,
DeploymentNode. Relationship kinds: BuildDependency, StartupDependency,
InfrastructureReference, Declared. IDs are hex SHA-256 over a
length-prefixed (sourceKind, canonicalPath, logicalName) preimage.
Canonical JSON: fixed property order, nulls omitted, UTF-8 no BOM, LF,
trailing newline, Ordinal ordering. Schema: schemas/.
Sources¶
- Solution (
.slnx, classic.sln): restricted XML subset, no evaluation. NearestDirectory.Build.propsplus parents only via the standardGetPathOfFileAboveimport; anything conditional, computed, or an alien import is exit 2. Test signal =IsTestProjector a test package reference; Web/Worker plus test signal is exit 2, plain Exe plus test signal is excluded. Overrides replace topology completely and are marked declared..slnxacceptsFolderunderSolution(nestable); folder names are ignored and moving a project between folders changes no element, ID, or output byte. Ignored and never references:FileunderFolder,ConfigurationsandPropertiesunderSolution, andBuild,Deploy,Platform,BuildType,BuildDependencyunderProject. A solution-levelBuildDependencyis not read. Any other element, or aProjectoutsideSolution/Folder, is exit 2 with file and line. - Compose: YamlDotNet representation model only. Reads service names, image, build presence, depends_on. Image keeps the repository only (digest and tag stripped). Data-store table matches the repository last segment exactly.
- Terraform (
cdk.tf.jsonsnapshot): closed resource table (resourceTypesextends it). String leaves matched against a strict reference regex; values are discarded after matching. Ignored ordata.ends count as omitted edges.moduleor unknown top-level keys exit 2. - Declared overlay: persons, external systems, and named relationships; names resolve uniquely or exit 2.
Per-source anti-vacuous rule: zero non-boundary elements exits 2; more
than one non-boundary element with zero relationships exits 2 unless
allowNoRelationships. Unreferenced .sln/.slnx/*compose*.yml/yaml/
cdk.tf.json files exit 2 unless covered or ignored.
Views and output¶
c1-context (hand-declared only), c2-containers (startup edges plus
build chains lifted through libraries), c3-<slug> per container with
libraries, deployment when a Terraform source ran. The D2 writer emits
only identifiers, quoted labels, edges, blocks, and the shape /
style.stroke-dash keys. docs/architecture/ is wholly tool-owned and
replaced via staging plus directory swap.