AI-Assisted Schema Discovery for VibeDBTool
Vibe coding founders regularly inherit Supabase projects with dozens of tables, half-documented foreign keys, and an ever-growing set of views. Before you can govern data, you have to understand it. That's where VibeDBTool's AI-assisted schema discovery steps in.
This post walks through the discovery pipeline, how to curate the AI suggestions, and ways to keep your entity model fresh without hand-maintaining a spreadsheet.
Map the raw schema
When you connect a Supabase project, VibeDBTool ingests:
- Table and view definitions (including constraints)
- Column metadata, types, and defaults
- Row level security (RLS) policy summaries
- Relationship hints such as foreign keys and naming conventions
The system stores everything in a temporary graph we call the entity draft. You can inspect it before committing anything to a workspace, giving you a safe place to experiment.
Let the AI surface intent
Discovery mode runs a few large language model prompts that evaluate:
- Entity candidates - tables that should become the backbone of your workspace.
- Relationship stories - how those entities connect (e.g., "each project has many sessions").
- Risk highlights - columns that look like they hold secrets, PII, or business critical state.
For each entity suggestion, you'll see its justification and confidence score. Accepting the suggestion converts it into a workspace entity that can later drive navigation, views, and CRUD forms.
Tip: Use the "compare schema" view after accepting suggestions. It shows original database objects on the left and the curated entity plan on the right so you can see what's been mapped.
Curate with human context
The AI can't read your mind. Before publishing, add the operational context you care about:
- Rename entities to match the language your teams use.
- Merge or split tables that act as staging layers versus user-facing records.
- Add descriptions that explain why the entity exists.
The discovery panel keeps a change log, so you can revisit the human annotations later or export them for onboarding docs.
Keep discovery on a heartbeat
Schemas drift. Schedule VibeDBTool to re-run discovery weekly or align it with deploys. The diff view spotlights:
- New tables that might deserve entity status.
- Columns that appeared or changed type.
- RLS policies that were added, removed, or weakened.
Accept the changes to update your workspace metadata without redoing everything manually.
Accelerate downstream automation
Once the entity model is solid, everything else clicks:
- Workspace navigation inherits the entity hierarchy.
- View builder offers AI joins that lean on your described relationships.
- Guardrails reference the sensitive fields flagged during discovery.
Schema discovery isn't a one-time import; it's the heartbeat that keeps your operational layer in sync with Supabase. With AI teeing up the insights, your team gets to focus on judgment instead of archaeology.
