Get your free personalized podcast brief

We scan new podcasts and send you the top 5 insights daily.

To avoid wasting time on code with flawed architecture, designers should first create a written plan (e.g., an MD file) outlining their intended approach. Getting engineering sign-off on this plan ensures the fundamental logic is sound before using an LLM to generate the front-end code.

Related Insights

To get superior results from AI coding agents, treat them like human developers by providing a detailed plan. Creating a Product Requirements Document (PRD) upfront leads to a more focused and accurate MVP, saving significant time on debugging and revisions later on.

Achieve higher-quality results by using an AI to first generate an outline or plan. Then, refine that plan with follow-up prompts before asking for the final execution. This course-corrects early and avoids wasted time on flawed one-shot outputs, ultimately saving time.

Even for a simple personal project, starting with a Product Requirements Document (PRD) dramatically improves the output from AI code generation tools. Taking a few minutes to outline goals and features provides the necessary context for the AI to produce more accurate and relevant code, saving time on rework.

To get a thorough implementation plan from Codex, provide it with a `plans.md` file. This file acts as a template, or "meta-plan," defining what a good plan looks like (e.g., milestones, self-contained steps), which guides the AI to produce a more structured output.

When using AI for complex but solved problems (like user permissions), don't jump straight to code generation. First, use the AI as a research assistant to find the established architectural patterns used by major companies. This ensures you're building on a proven foundation rather than a novel, flawed solution.

To get the best results from AI code generation platforms, first use a conversational LLM like Claude to brainstorm and write a detailed product spec. This two-step process—spec generation then code generation—improves the final output and reduces costly iterations with the coding agent.

Borrowing from classic management theory, the most effective way to use AI agents is to fix problems at the earliest 'lowest value stage'. This means rigorously reviewing the agent's proposed plan *before* it writes any code, preventing costly rework later on.

Engineering AI tools understand markdown better than complex PRDs in other formats. Product leaders can translate critical user workflows into simple markdown files, providing context to the AI to help it analyze the impact of code changes and identify potential issues.

A powerful technique for creating robust software plans is to use AI as an adversarial partner. After drafting a specification, prompt an AI to "tear it apart" by identifying underspecified or inconsistent points. Iterate on this process until the AI's feedback becomes niche, indicating a solid spec.

To prevent AI coding assistants from hallucinating, developer Terry Lynn uses a two-step process. First, an AI generates a Product Requirements Document (PRD). Then, a separate AI "reviewer" rates the PRD's clarity out of 10, identifying gaps before any code is written, ensuring a higher rate of successful execution.