My Solution: A python script that generates code with custom prompts and chaining in following order:
User prompt -> Functional doc -> Technical doc -> Backend code -> Frontend code
Using this approach the script forces the AI to document and save all of its assumptions and code decisions. To increase its accuracy it uses custom prompts and also adds on output of previous steps as context to generate response for next step. Its open source and free available here :- https://github.com/vivek100/oneShotCodeGen
Link to two projects generated via this script: https://github.com/vivek100/oneShotCodeGen/tree/main/example...
PS: This can still make errors, happy to take suggestions on how to improve it.
Step 1 : Start the script with a simple prompt like "Create an expense management tool" and it will set up the whole project with relevant functional requirements doc, technical implementation doc, database setup, backend code and frontend code. It will even install all the dependencies and place the code in relevant folder
Step 2: Open generated code folder in cursor, ask it to read all the files and then start making changes. Works like a charm mostly :P.
https://github.com/vivek100/oneShotCodeGen/tree/main/example...
Thanks for the suggestion, I should have added them before.