My First Structured Prompt: Implement a rewrite plan for legacy .Net applications
I just applied the five-part framework to a prompt I needed, and here's how I structured it:
ROLE
Act as a senior .NET architect reviewing a legacy codebase for a production rewrite.
TASK
Plan and execute the creation of User api from the legacy codebase.
CONTEXT
You are building a .Net 10 web api solution
- Consumers: Our new Angular application will utilize this api to retrieve and update user information
- Data: A Sql Server database is used as a data repository with a EF data layer used to access the database
- Purpose: We are taking out all the legacy business logic within the legacy application and refactoring it to domain centric apis
CONSTRAINTS
- Preserve observable behavior; document every intentional change.
- No schema changes without flagging them first.
- Don't invent business rules. Ask as many questions that you need to till you are 100% sure you understand what is expected of you.
- Prefer incremental updates as opposed to changing big chunks at a time.
OUTPUT
1. Production ready solution with projects included
2. Project file should have two folders in it: src for all code project files and test for test unit test project
The structured version got me clear instructions for Claude to work off. This is way better than my old approach of just asking Claude to "help me with refactoring this code." The framework made me think through what I actually needed.
20
4 comments
John Espinosa
4
My First Structured Prompt: Implement a rewrite plan for legacy .Net applications
Clief Notes
skool.com/cliefnotes
What we give away free beats most paid courses. Build durable AI systems with a Marine vet and Edinburgh researcher. 40+ lessons, growing.
Leaderboard (30-day)
Powered by