AI Coding: 7 Best Practices for Building Apps with Vibe Coding

by Rachel Kim – Technology Editor

A software executive says he has shipped six major applications, including an iPhone app, in the last seven months using artificial intelligence coding tools, a pace he attributes to treating AI as a collaborative developer rather than a shortcut to finished code.

David Gewirtz, a former creative director and company founder, detailed his workflow in a recent ZDNET article, outlining seven key practices he employs when using agentic AI tools like OpenAI’s Codex and Claude Code. Gewirtz, who self-identifies as both a programmer and a computer scientist, stated that he previously struggled to complete more than one small software product per year due to limited time.

The core of Gewirtz’s approach centers on establishing a structured and disciplined collaboration with the AI. He emphasizes the importance of written instructions, codified in project files like CLAUDE.MD, and AGENTS.MD, to guide the AI’s behavior and ensure consistent results. A primary practice is prioritizing sequential processing over parallel execution, a technique he adopted after experiencing crashes and instability when attempting to run multiple AI agents simultaneously. “Do NOT leverage background agents or background tasks. Do NOT split into multiple agents. Process files ONE AT A TIME, sequentially. Update the user regularly on each step,” Gewirtz instructs the AI, according to the ZDNET report.

Gewirtz also highlights the necessitate for meticulous tracking of changes across different platforms – his current projects target Mac, iPhone, Watch, and iPad – through a dedicated migration log (IOS_CHANGES_FOR_MIGRATION.md). This log details modifications and their applicability to each platform, preventing inconsistencies and ensuring a unified user experience. He further maintains a persistent “MEMORY.md” file, organized by topic, where the AI records lessons learned and best practices, avoiding redundant efforts and building upon previous successes.

To ensure transparency and debuggability, Gewirtz logs all prompts given to the AI in a PROMPT_LOG.md file, creating a timestamped audit trail of the development process. He also emphasizes the importance of defining a clear user profile for the target audience, informing the AI’s design choices and ensuring the application caters to the specific needs and technical abilities of its intended users. For example, his sewing pattern app is designed with a user base that is “predominantly over 50… with limited technical skills,” a constraint he explicitly communicates to the AI.

Gewirtz also embeds a comprehensive design system directly into the AI’s project prompt file, ensuring visual consistency across all UI elements. Finally, he advocates for encoding hard-won lessons – bug fixes and workarounds – as permanent rules within the AI’s instructions, preventing the repetition of past mistakes. “Every AI mistake should only happen once, because avoiding it becomes a guardrail rule,” he writes.

As a bonus practice, Gewirtz recommends utilizing the AI for code review, asking it to analyze the project and flag potential issues. This provides a “fresh set of eyes” and helps identify overlooked details. Gewirtz shares his project updates on social media and invites feedback from other developers on his approach.

You may also like

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.