- AI-assisted Coding: Power User Playbook
- Problem Solving Framework
- Phase 1: Understand and Decompose the Problem
- Phase 2: Devise/Carry Out the Plan
- Phase 3: Examine the Solution Obtained
- Phase 4: Refine and Document
- Hints, Tips, and Tricks
- 1. Leverage Step-by-Step Thinking
- 2. Set Up a Persistent AI Project Space
- 3. Work Around Framework Limitations
- 4. Focus on One Task per Session
- 5. Write Clear and Specific Prompts
- 6. Break Down Complex Tasks
- 7. Annotate Code with Comments
- 8. Use AI for Code Reviews
- 9. Generate Documentation
- 10. Automate Database and Query Tasks
- 11. Take Responsibility for Your Code
- 12. Combine and Organize Your Codebase
- Clearly define the problem you're solving—break it down into discrete, actionable components.
- Invest time upfront in fully understanding the problem, as this will save effort later and streamline the development process.
- Identify the connection between the input data and the desired outcome.
- Once the problem is clearly defined, start developing pseudo-code or step-by-step procedures to address it programmatically at each phase.
- Begin implementing the pseudo-code incrementally. Take your time — understand why the model is proposing specific solutions.
- If you don’t understand something, ask the model for clarification to deepen your understanding.
- Validate the solutions at each step, ensuring they are reproducible and that you fully understand their output.
- Testing and debugging should be integral parts of this phase to confirm the solution aligns with the problem requirements.
- Once your project is functioning as intended, review it thoroughly to ensure you understand each component.
- Prioritize clear documentation, as it is crucial for maintaining, scaling, or revisiting the project in the future.
- Reflect on what you've learned and ensure clarity in both your code and the associated documentation.
- Create a dedicated workspace in a tool like Claude or a custom GPT instance.
- Provide a foundational explanation of your codebase, covering key aspects such as:
- Dependencies
- Deployment requirements
- File structure
- This upfront context saves time and ensures more precise AI-generated responses.
- Craft clear, specific prompts to guide the AI effectively.
- Include essential details such as:
- Input/output types
- Error-handling expectations
- UI behavior or user interactions (if applicable)
- Approach prompt writing as though you’re explaining the task to another developer, prioritizing clarity and precision.
- Divide the overall problem into smaller, manageable components.
- Breaking tasks into steps will help you:
- Stay organized
- Approach coding logically
- Simplify debugging and testing
- Leverage a large-context reasoning model to create an overarching plan for the project.
- Collaborate with the model to:
- Choose the appropriate tech stack
- Design the app or solution’s structure
- Instruct the model to generate a detailed implementation roadmap (e.g., an
IMPLEMENTATION.md
file) to guide development. - Review the plan thoroughly, ensuring you understand the rationale behind its suggestions.
NOTE: The more complex the project, the more critical it is to stay organized.
- A comprehensive and detailed
IMPLEMENTATION.md
file—or an equivalent tracking system—will is ESSENTIAL for tracking progress and preventing confusion.
- Create an
IMPLEMENTATION.md
file and paste the implementation plan from the reasoning model. - Open a coding environment (e.g., VS Code) in your project directory to begin working.
- Start with Phase 1 of your implementation plan.
- Collaborate with the model (e.g., Claude or GPT) to carefully review the plan and begin implementing the code.
- Once a phase is completed, update your
IMPLEMENTATION.md
file as necessary to reflect completed steps and any changes. - Maintain clear records of what has been achieved to avoid confusion in subsequent phases.
- Conduct a code review with the AI. Use targeted prompts like:
- "Does this approach align with best practices?"
- "Are there any areas where this logic could break or be optimized?"
- Test the implemented functionality thoroughly.
- Debug any issues collaboratively with the AI.
- After completing a phase, start a new chat or session with the AI to proceed with the next phase.
- Review the
IMPLEMENTATION.md
and progress markdown files before continuing. - Repeat the implementation, review, test, and progress tracking steps for all phases until the initial implementation is fully complete.
- Request the AI to add detailed comments within the code that explain its logic, assumptions, and functionality.
- Generate supplementary documentation such as:
- A README file with project details.
- API documentation or user guides, if applicable.
- Merge your code into a single, cohesive file or repository.
- Ensure all dependencies are properly linked, and the codebase is ready for comprehensive testing.
- Return to the reasoning model and select a specific feature to implement fully.
- Request a detailed implementation plan for the selected feature from the model.
- Update the
IMPLEMENTATION.md
file with the new plan and clear thePROGRESS.md
file to reflect a clean slate for tracking this feature’s progress.
- Work collaboratively with the AI to implement the feature in manageable phases, focusing on specific tasks or components.
- After each phase:
- Update the
PROGRESS.md
file with completed tasks and notes. - Test the feature to ensure it functions as intended and aligns with project requirements.
- Update the
- Repeat this iterative process for each additional feature until the solution is complete and functional.
- Take full responsibility for your app by thoroughly understanding the code provided by the AI.
- Read any associated documentation or ask the AI for clarifications to fill gaps in understanding.
- Use specialized AI tools or other language models (LLMs) to generate and refine effective prompts for handling complex tasks or scenarios.
- Experiment with different phrasing to optimize the quality of AI-generated outputs.
- Leverage AI to draft database queries and schemas, especially for complex databases where errors can be costly.
- Validate AI-generated queries with test cases to ensure correctness.
- Limit each AI interaction session to a single task to maintain clarity and prevent context contamination.
- Start a new session for each problem or task once the current one is resolved.
- Use the "give full code" functionality whenever feasible to generate complete, ready-to-use solutions.
- Minimize manual editing by requesting end-to-end code outputs for complex modules or workflows.
For creative tasks like designing code architecture, use a "chain of thought" approach. Add "Think step-by-step" to your prompt to encourage a detailed analysis of the problem.
Create a project in a tool like Claude or a custom GPT environment where you can provide a basic explanation of your codebase, including:
- Dependencies
- Deployment details
- File structure
This saves time on repetitive explanations and helps the AI give more accurate responses.
If the AI lacks knowledge about the latest versions of frameworks or plugins:
- Copy-paste the relevant documentation or specifications directly into the session.
- Ask the AI to generate code based on the latest spec.
Avoid cluttering the AI’s context by sticking to one task per session. Once a task is completed, start a new session. This approach:
- Maintains high-quality responses.
- Allows you to effectively use "give full code" for cohesive results with minimal manual edits.
Treat your prompt like explaining a task to a colleague. Include details like:
- Desired functionality
- Input/output types
- Error handling requirements
- UI behavior
If your problem is complex, use another LLM to generate effective prompts. For example:
- “Generate a comprehensive and effective prompt that you, as an LLM, would understand to solve the following problem…”
Instead of tackling an entire system at once, divide it into smaller, manageable components. For complex projects:
- Ask the reasoning model to generate a high-level framework, such as an
IMPLEMENTATION.md
file, outlining steps, phases, or pseudocode. - Use this framework to guide your development process.
Request the AI to include detailed comments explaining the logic behind the generated code. This helps you and the AI understand the code better, especially for future modifications.
Prompt the AI to review generated code for potential improvements. Even a simple “Are you sure?” can force it to double-check its work and refine the solution.
Go beyond inline comments by asking the AI to create comprehensive documentation, such as:
- README files
- API documentation
- User guides
This step will save you time and effort when onboarding new developers or revisiting the project later.
Let AI handle the dull but error-prone tasks like:
- Generating database schemas
- Writing SQL queries
- Crafting regex patterns
Always validate the output with test cases to ensure correctness.
Understand every piece of code you use. Remember: YOU are responsible for your app, not the AI. If something is unclear:
- Read the documentation.
- Use the AI to clarify any uncertainties.
Combine your codebase into a single, organized file using tools like gptree.
- Use the reasoning model to identify which feature or component to implement first.
- Instruct the AI to examine your codebase and generate a comprehensive phased plan.
- Update your progress files (
IMPLEMENTATION.md
andPROGRESS.md
) as needed.