1 Commits

Author SHA1 Message Date
Tom Boucher
7f11543691 feat: add schema drift detection to prevent false-positive verification
GSD agents silently skip database schema push — verification passes but
production breaks because TypeScript types come from config, not the live
database. This adds two layers of protection:

1. Plan-phase template detection (step 5.7): When the planner detects
   schema-relevant file patterns in the phase scope, it injects a mandatory
   [BLOCKING] schema push task into the plan with the appropriate push
   command for the detected ORM.

2. Post-execution drift detection gate: After execution completes but
   before verification marks success, scans for schema-relevant file
   changes and checks if a push command was executed. Blocks verification
   with actionable guidance if drift is detected.

Supports Payload CMS, Prisma, Drizzle, Supabase, and TypeORM.
Override with GSD_SKIP_SCHEMA_CHECK=true.

Fixes #1381

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 16:53:20 -04:00