Prompt·Schema and dependencies·PG12
Can the schema be easier to understand without losing depth?
New developers or agents keep misunderstanding names, concepts or relationships.
Prompt
Review the database's logical organization from the perspective of a new senior engineer. Identify confusing names, mixed responsibilities, inconsistent conventions, unclear relationships and schemas that obscure the business domain. Recommend structural improvements that make the model easier to understand and maintain without sacrificing useful historical detail or creating unnecessary migrations.
- What it returns
- The specific confusions, the work they affect, a schema map, and the least disruptive naming or boundary fixes.
- Skip it when
- Nobody has misread the schema recently.
- Avoid
- Cosmetic renames and broad migrations with no shown maintenance benefit.
- Changes
- Changes nothing
- Sessions
- Look first, then fix in a new session
- Tools
- Needs: the repository and read-only database access. Helps: declarative schema files, if the project uses them.
- Works on
- Any PostgreSQL host: Supabase, Neon, RDS, Cloud SQL or self-hosted.
Related prompts
- Meaning drift across the stackPromptShows where one word (a task, a fund, a run) means slightly different things in different parts of the app.
- Out-of-date agent instructionsPromptFinds instructions that send agents to files and patterns that no longer exist.
- Which database objects no longer earn their keep?PromptThe list of views, functions and triggers has grown hard to reason about.
- Are we storing the same truth multiple times?PromptCaches, aggregates, materialized views or derived columns drift from the raw facts.
More in Schema and dependencies.