# ADR 0003 — DB-native ontology with YAML seed manifests Status: accepted (2026-07-07) · Plan: rev 3, R3-1 ## Context Rev 1 kept inventory/ontology/policy as YAML files parsed at runtime. Agents need graph queries (blast radius), transactional mutations with audit, and a future UI needs to edit the model without file round-trips. ## Decision The DB is the runtime source of truth. entity_types form an is-a hierarchy (parent_type, is_abstract); relationship endpoint constraints may name abstract types and validation walks the hierarchy. YAML files under seeds/ bootstrap the DB (idempotent, content-hashed via seed_versions) and serve DR; `GET /api/v1/export` regenerates them for version control (round-trip byte-stable, tested in CI). ## Consequences - Ontology changes are API calls (policy-gated), not redeploys. - Seeds can drift from DB between exports — export is part of the routine (commit after meaningful model edits). - Abstract types let policy rules and relationships bind once at the right altitude (e.g. `compute-entity provides service`).