This directory records the significant architecture decisions for Semiodesk.Trinity.
ADRs 0001–0012 were extracted retrospectively (2026-07-13) from the existing implementation and documentation as part of reviving the project. They describe decisions that are already in force in the code today, with the context and consequences as they actually stand — including the parts that now hurt on modern .NET. ADRs 0013+ are proposals for the revival and are not yet decided.
Each ADR is one file, NNNN-kebab-title.md, using this template:
# NNNN. Title
Date: YYYY-MM-DD
## Status Accepted | Proposed | Superseded by NNNN | Deprecated
## Context the forces at play — why a decision was needed
## Decision what was decided (present tense, active voice)
## Consequences results, good and bad
## Revival notes (optional) how this looks under the modern-.NET revival
## Related links to other ADRs / files
New decisions get the next free number; never renumber. Supersede rather than edit a decided ADR (change its status, add the superseding link).
| # | Title | Status |
|---|---|---|
| 0001 | Record architecture decisions | Accepted |
| 0002 | Attribute-based semantic object mapping on a Resource base |
Accepted |
| 0003 | Implement mapping via compile-time IL weaving (cilg / Mono.Cecil) | Accepted |
| 0004 | Force full PDB symbols so the weaver can rewrite assemblies | Accepted |
| 0005 | Generate C# ontology vocabularies from RDF/OWL at build time | Accepted |
| 0006 | Build on dotNetRDF as the RDF/SPARQL engine (pinned 2.7.0) | Accepted |
| 0007 | LINQ-to-SPARQL via Remotion.Linq (re-linq) | Superseded by 0037 |
| 0008 | Store/Model abstraction with manually-registered providers | Accepted |
| 0009 | Supported store backends; Stardog removed | Accepted |
| 0010 | Target frameworks: netstandard2.0 core, net461 tools, net472 tests | Accepted |
| 0011 | Retire the configuration subsystem for an imperative store API | Accepted (2.0) |
| 0012 | One NuGet package bundling libraries + build tools via .targets |
Accepted |
These capture the foundational "how Trinity thinks" decisions — the resource model, the mapped/dynamic duality, models & groups, discovery, stores, and querying.
| # | Title | Status |
|---|---|---|
| 0016 | Resource-centric persistence, not triple-centric | Accepted |
| 0017 | Resources are open: mapped + dynamic properties coexist (ListValues returns both) |
Accepted |
| 0018 | Mapping attributes are syntactic sugar over PropertyMapping<T> |
Accepted |
| 0019 | Models are named graphs; ModelGroups query several at once | Accepted |
| 0020 | Runtime metadata via global MappingDiscovery / OntologyDiscovery | Accepted |
| 0021 | Stores are created from connection strings | Accepted |
| 0022 | Store-defined capabilities & inferencing; extend via IStore; no capability negotiation |
Accepted |
| 0023 | Lazy loading of linked resources via ResourceCache (not disablable) | Accepted |
| 0024 | SPARQL queries reuse registered ontology prefixes | Accepted |
| 0025 | Resource identity: fragment-aware URIs (UriRef), URNs, blank nodes | Accepted |
| 0026 | XSD ↔ .NET datatype mapping (culture-invariant literals) | Accepted |
| 0027 | Language-tagged (localized) literals (rudimentary) | Accepted |
| 0028 | Store-level transactions (ADO-style ITransaction) |
Accepted |
| 0029 | Resource change tracking & object-level Commit/Rollback (no cascade) | Accepted |
| 0030 | Deleting a resource removes all triples referencing it (subject + object) | Accepted |
| 0031 | Multi-modal query results (resources / bindings / ASK / count) | Accepted |
| 0032 | Data virtualization via lazy, paged collections | Accepted |
| 0033 | Explicit exception model | Accepted |
| 0034 | RDF (de)serialization formats & JSON-LD resource converter | Accepted |
| # | Title | Status |
|---|---|---|
| 0013 | Replace IL weaving with a Roslyn source generator (partial properties) — weaver retired in 2.0 | Accepted |
| 0035 | Remove INotifyPropertyChanged support (resource NPC + virtualizing collections) | Accepted |
| 0036 | Store-integration tests self-provision servers via Testcontainers | Accepted |
| 0037 | Rebuild LINQ-to-SPARQL on an owned provider (retire re-linq) | Accepted |
| 0038 | Upgrade to dotNetRDF 3.x (Core / Client / Inferencing split) | Accepted |
| 0039 | Commits write a per-value delta, not the whole resource | Accepted |
| 0014 | Reimplement ontology vocabulary generation as a dotnet tool |
Accepted |
| 0040 | Numeric values are widened, never narrowed, when read into a mapped property | Accepted |
| 0041 | Layered read views: baseline + additions − removals (working-copy semantics) | Accepted |
| 0043 | Reviving the Fuseki store: the 4/86 was a missing dataset, not a connector bug | Accepted |
| 0044 | Provision the inference configuration the store suites depend on, and run them in CI | Accepted |
| 0045 | Finish in-memory inferencing: entail into a side graph, union it in per query | Accepted |
| # | Title | Status |
|---|---|---|
| 0015 | Modernize target frameworks, build, and CI | Proposed |
| 0042 | Staged writes: the layered view as a working copy (accept/discard, materialization, conflicts) | Accepted (staging) / Proposed (rest) |
Stabilize on modern .NET first, then add features. Two external consumers pin the
published package 1.0.3.77 — ElectrixOS (elxgen) and DevHub (Relay). The
public mapping surface (Resource, [RdfClass]/[RdfProperty], IStore/IModel,
memory + Virtuoso stores, Turtle/JSON-LD I/O) is a compatibility contract;
changes are measured against those consumers.