# ADR-030: Schema change detection via Value.Diff, not manual tracking ## Status Accepted ## Context Schema changes need to be detected when a stored graph type's Module diverges from the current Module definition. This could be tracked via a separate changelog or detected from the schemas themselves. ## Decision The repository layer uses `Value.Diff(storedSchema, moduleEntry)` to detect when a stored schema has diverged from the current Module entry. This is schema-agnostic and works for any change — no separate changelog or version log needed. The `Edit[]` output from `Value.Diff` can optionally be classified as breaking or non-breaking. ## Consequences - No manual changelog to maintain - Works for any TypeBox schema change - Classification of edits (breaking vs non-breaking) can be added later - `moduleToDbSchema()` is used to update stored schemas after migration ## References - [schema-evolution.md](../schema-evolution.md)