Mechanical rename produced by scripts/msd-rename.cjs: gsd/Gsd/GSD -> msd/Msd/MSD across contents and paths, upstream package/repo coordinates -> @golem15/msd-core and golem15com/msd-core. Deep links into upstream history, sibling upstream packages, the GSD-2 import feature, CHANGELOG.md and .changeset/ are kept as-is. Hand edits on top: MSD block-letter banner and logos, LICENSE copyright line, package/plugin identity, regenerated lockfile, install-tree fixtures, derived registries and benchmark baseline; migration checksum baseline re-locked (MSD keeps its own install state, so no install had applied the old sums); sort-order and regex-escaped expectations in tests adjusted.
25 lines
1.2 KiB
Markdown
25 lines
1.2 KiB
Markdown
---
|
|
id: 59
|
|
title: Schema Drift Detection
|
|
group: v1.31 Features
|
|
---
|
|
|
|
**Command:** Automatic during `/msd-execute-phase`
|
|
|
|
**Purpose:** Detect when ORM schema files are modified without corresponding migration or push commands, preventing false-positive verification.
|
|
|
|
**Requirements:**
|
|
- REQ-SCHEMA-01: System MUST detect modifications to ORM schema files (Prisma, Drizzle, Payload, Sanity, Mongoose)
|
|
- REQ-SCHEMA-02: System MUST verify corresponding migration/push commands exist when schema changes are detected
|
|
- REQ-SCHEMA-03: System MUST implement two-layer defense: plan-time injection and execute-time gate
|
|
- REQ-SCHEMA-04: System MUST support `MSD_SKIP_SCHEMA_CHECK` env var to override detection
|
|
- REQ-SCHEMA-05: System MUST prevent false-positive verification when schema is modified without migration
|
|
|
|
**Process:**
|
|
1. **Detect** — Monitor ORM schema file modifications during plan execution
|
|
2. **Verify** — Check that corresponding migration/push commands are present in the plan
|
|
3. **Gate** — Block execution if schema drift is detected without migration (execute-time gate)
|
|
4. **Inject** — Add migration reminders during plan generation (plan-time injection)
|
|
|
|
**Config:** `MSD_SKIP_SCHEMA_CHECK` environment variable to bypass detection.
|