💻 Coding Prompt
How Solutions Architects in Consulting Can Use Claude to Fix a Hard-to-Maintain Codebase When Migrating to a New Framework
From hard-to-maintain codebase to results — Intermediate techniques for Consulting Solutions Architects migrating frameworks
The Prompt
You are a senior solutions architect with 13 years of experience in consulting engagements, framework migration projects, and database schema design for enterprise clients. Help me create a database schema so I can reduce debugging time by 50%.
My situation:
Migration type: [e.g., Rails to Node.js / AngularJS to React / monolith to microservices]
Consulting client industry: [e.g., financial services / healthcare / e-commerce]
Hard-to-maintain codebase symptom: [e.g., database schema is tightly coupled to the old framework's ORM conventions / schema has no clear ownership and different modules write to the same tables / migrations were never run in sequence and the schema state is uncertain]
Current schema state: [e.g., 80 tables with no documentation / foreign key constraints are missing in half the tables / column naming is inconsistent across modules]
New framework's data access pattern: [e.g., requires explicit repository pattern / uses an ORM with strict naming conventions / expects event-sourced data model]
Debugging bottleneck: [e.g., tracing a data bug requires checking 6 tables with no clear relationship / no schema documentation means every debug session starts from scratch]
Delivery constraint: [e.g., schema must support both old and new framework during transition / zero downtime migration required / client team must be able to maintain the schema without the consulting team after handoff]
Deliver:
A schema audit report: document the current schema state — table count, relationship clarity, naming consistency, constraint coverage, and documentation completeness — with a severity rating for each dimension and the impact on debugging time
A schema redesign blueprint: define the target schema structure for the new framework — table naming conventions, relationship definitions, index strategy, and constraint requirements — with a rationale for each design decision that references the migration target
A migration sequence plan: define the order in which schema changes are applied during the framework migration — which changes are safe to make before the new framework is live, which must happen during cutover, and which can be deferred to post-migration cleanup
A dual-write compatibility layer: for the transition period when both frameworks are active, define the schema design that allows both to read and write without conflict — including the specific fields, views, or abstraction tables required
A debugging time reduction audit: identify the 5 schema-level changes that will have the greatest impact on reducing debugging time — adding missing foreign keys, creating a relationship map, standardizing column naming, adding audit timestamps, and documenting table ownership — with the estimated time saving for each
A schema documentation standard: define what every table in the new schema must document — purpose, owner, key relationships, query patterns it supports, and fields that must never be null — as a template the client team can maintain after handoff
A data integrity test suite: define 8 database-level tests that confirm the migrated schema maintains data integrity — referential integrity checks, null constraint validation, orphaned record detection, and duplicate key identification
A handoff readiness checklist: 6 criteria the schema must meet before the consulting engagement closes — documentation completeness, constraint coverage, migration script idempotency, client team training completion, and monitoring setup for schema-level errors
Produce the schema audit report before proposing any redesign — a solutions architect who redesigns before auditing is solving the schema they imagined, not the schema that exists.
💡 How to use this prompt
- Start with output #5 — the debugging time reduction audit. On consulting engagements with a specific metric target, the fastest path to demonstrating value is identifying the changes with the highest impact on the stated goal. Five targeted schema fixes will reduce debugging time faster than a complete redesign that takes weeks to implement.
- The most common mistake is treating the schema migration as a technical problem and ignoring the handoff requirement. A perfectly designed schema that only the consulting architect understands will be unmaintainable the week after the engagement closes. Build the documentation standard in output #6 during the migration, not as a final deliverable.
- Claude outperforms ChatGPT on this task because it follows multi-step instructions more precisely and maintains consistent tone across long outputs. Use Claude for the full draft, then paste into ChatGPT if you need a faster, shorter variation.
Best Tools for This Prompt
🤖 Best AI Coding Tools for This Prompt
Tested & reviewed — run this prompt with the best AI tools
About This Coding AI Prompt
This free Coding prompt is designed for Claude and works with any modern AI assistant including ChatGPT, Claude, Gemini, and more. Simply copy the prompt above, paste it into your preferred AI tool, and customize the bracketed sections to fit your specific needs.
Coding prompts like this one help you get better, more consistent results from AI tools. Instead of starting from scratch every time, you can use this tested prompt as a foundation and adapt it to your workflow. Browse more Coding prompts →