The AI Coding Method That Works Every Time

All Notes

30 May 2025

Notes on AI Coding with a Three-Step System

Overview

The video presents a structured three-step system for effectively utilizing AI coding tools to develop software applications. The speaker shares their personal experience of overcoming frustrations with AI coding agents and emphasizes the importance of providing a clear mental model of the application to the AI for better results.


Section 1: Introduction to the System

  • Purpose: To create a consistent and effective approach to coding with AI.
  • Application Example: A full-stack web application for learning AI engineering, featuring user roles like regular users, admins, and course creators.
  • Current Task: Implementing a course overview page, which is currently a 404 error.

Section 2: Step 1 - Providing a Mental Model

  • Key Concept: AI coding agents need a comprehensive understanding of the application.
  • Strategy:
    • Create a detailed document describing the architecture of the application.
    • Include technical diagrams using Mermaid (a tool for generating diagrams from text).
  • Instructions for AI:
    • Ask the AI to explore the codebase and compile findings into a markdown document.
    • The document should cover:
      • Software architecture analysis
      • Developer analysis
      • Product management analysis
  • Outcome: A comprehensive markdown file that serves as a reference for future AI interactions.

Section 3: Step 2 - Developing the Course Feature

  • Objective: Create a Product Requirements Document (PRD) for the courses overview page.
  • Approach:
    • Use the AI as a product manager to outline requirements and user stories.
    • Ensure the PRD aligns with user personas identified in the analysis document.
  • Key Elements of PRD:
    • User stories (e.g., "As a student, I want to browse all available courses.")
    • Functional requirements (e.g., performance, responsiveness, accessibility).
  • Iterative Process: Continuously check which aspects of the PRD have been implemented in the code.

Section 4: Step 3 - Implementation of the PRD

  • Final Task: Ask the AI to implement the PRD as a Minimum Viable Product (MVP).
  • Instructions:
    • Focus on creating front-end components using static data.
    • Avoid overwhelming the AI by breaking down tasks into manageable parts.
  • Outcome: A functional courses page with features like:
    • Search functionality
    • Filtering options
    • Different display views (card vs. list)

Section 5: Progress Tracking and Iteration

  • Saving Progress:
    • Update the PRD to reflect the current implementation status.
    • Include sections for completed, partially completed, and pending requirements.
  • Next Steps: Outline future tasks, such as connecting the interface to the database.

Conclusion

  • Benefits of the Three-Step System:
    • Provides a structured approach to AI coding.
    • Enhances consistency and accuracy in software development.
    • Facilitates collaboration and tracking of progress.
  • Call to Action: Encouragement to apply this method in personal projects and join the AI native engineering community for further learning.

Visual Representation of Key Concepts

StepDescriptionKey Actions
Step 1Provide a Mental Model- Create architectural document
- Include Mermaid diagrams
- Explore codebase with AI
Step 2Develop PRD- Outline requirements
- Define user stories
- Ensure alignment with user personas
Step 3Implement PRD as MVP- Create front-end components
- Use static data
- Track progress and update PRD

These notes encapsulate the main points and strategies discussed in the video, providing a clear and structured overview of the three-step system for coding with AI.