AI Coding Techniques

SUMMARY

  • ZDNET’s David Gewirtz shares seven disciplined AI coding practices plus code review, turning vibe coding into reliable, auditable, user-centered production software.

IDEAS:

  • Treat AI as a peer developer, requiring structure, constraints, and accountability like any teammate.
  • Prefer sequential, visible agent work because parallelism becomes unmanageable when actions are hidden.
  • Opaque background agents can crash, hang, and leave code changes half-finished and indeterminant.
  • Embed strict “one file at a time” rules to maximize recoverability when AI work derails.
  • Build migration tracking into the repo so multi-platform parity becomes a deliberate operational process.
  • Log platform-impacting changes immediately to prevent feature drift across iOS, iPad, Mac, Watch versions.
  • Convert every cross-platform change into a technical debt ticket until every target platform catches up.
  • Maintain persistent project memory files so AI sessions regain state and avoid repeating investigations.
  • Organize memory semantically by topic, not chronologically, improving retrieval and reducing duplicated notes.
  • Curate memory aggressively by deleting outdated or wrong items, preventing institutionalized misinformation from spreading.
  • Store key learnings like API signatures, algorithms, measurements, and fixes as durable project knowledge.
  • Keep a chronological prompt log to replay collaboration and diagnose failures caused by unclear instructions.
  • Treat prompt logs like version control for human-AI interaction, enabling auditing and reconstruction later.
  • Use explicit user profiles as design constraints, guiding AI choices toward real users’ comfort and needs.
  • When AI drifts, ask it to restate user profile, forcing re-alignment and better design decisions.
  • Encode design systems directly into system prompts, turning style consistency into an automated default.
  • Specify design tokens: font sizes, RGB colors, components, and reference implementations for reliable UI consistency.
  • Avoid relying on AI’s implicit recall of previous UI; provide explicit, reusable design language data.
  • Convert debugging pain into permanent rules, preventing the same class of AI mistakes recurring.
  • Embed guardrails like “never stack more than 4 sheets” to avoid silent failures on macOS.
  • Capture platform-specific gotchas as non-negotiable instructions, especially where Apple APIs behave unexpectedly.
  • End each session by recording learnings so fixes become part of project DNA, not fleeting memory.
  • Use AI to do periodic code reviews, simulating fresh eyes by scanning the whole project quickly.
  • Start new sessions by asking AI to flag issues before reading instructions, surfacing overlooked problems.
  • Vibe coding becomes “engineering discipline” when prompts, memory, rules, and artifacts form a workflow system.
  • Agentic AI acts as a force multiplier for solo developers, enabling shipping multiple serious products quickly.
  • Speed isn’t the goal; predictability, traceability, and quality are the differentiators for elite AI builders.
  • Instruction files like CLAUDE.MD and AGENTS.MD can operationalize best practices across every session consistently.
  • Collaboration improves when you treat AI like Slack-based teammate, not magical oracle producing infallible code.
  • Stereotypical user personas can work well with AI training data, producing practical, targeted design outcomes.

INSIGHTS

  • Eliteness with AI comes from governance: visibility, auditability, and repeatable constraints over raw speed.
  • Turning fixes into rules transforms debugging from recurring cost into compounding capital across future iterations.
  • Persistent semantic memory shifts AI from stateless helper into an evolving organization that learns responsibly.
  • Prompt logs create collaboration observability; without replay, you cannot debug the human-AI system.
  • Multi-platform work demands first-class migration artifacts, or parity collapses under incremental, local optimizations.
  • Design tokens in system prompts make consistency automatic, reducing subjective interpretation and rework dramatically.
  • User profiles are functional requirements; encoding them prevents clever implementations that betray real-world usability.
  • Sequential workflows outperform parallel agents when tooling hides actions, because recoverability beats throughput always.
  • Treating AI like a teammate clarifies responsibility boundaries, improving both prompts and engineering outcomes.
  • Disciplined vibe coding is essentially software management: rules, documentation, review, and institutional learning loops.

QUOTES:

  • “Treat the AI like another developer, not a magic box.” — David Gewirtz
  • “Encode design systems and user profiles in system prompts.” — David Gewirtz
  • “Every fixed bug becomes a permanent lesson learned in the project’s DNA.” — David Gewirtz
  • “As a sole coder, agentic AI has been a force multiplier of almost breathtaking capability.” — David Gewirtz
  • “This is vibe coding.” — David Gewirtz
  • “But it’s vibe coding with engineering discipline, and an underlying framework designed for robustness and product quality.” — David Gewirtz
  • “Do NOT use background agents or background tasks.” — David Gewirtz
  • “Do NOT split into multiple agents.” — David Gewirtz
  • “Process files ONE AT A TIME, sequentially.” — David Gewirtz
  • “Update the user regularly on each step.” — David Gewirtz
  • “I chose slower but visible over faster but opaque.” — David Gewirtz
  • “I don’t trust myself (or the AI) to remember changes across sessions.” — David Gewirtz
  • “Every change generates a technical debt ticket for every platform it hasn’t reached yet.” — David Gewirtz
  • “Update or remove memories that turn out to be wrong or outdated.” — David Gewirtz
  • “Do not write duplicate memories.” — David Gewirtz
  • “It’s version control for my collaboration with the AI.” — David Gewirtz
  • “If we can’t replay the conversation, we can’t debug the collaboration.” — David Gewirtz
  • “Telling the AI who uses the software helps it understand how to build the software.” — David Gewirtz
  • “Design consistency shouldn’t depend on the AI’s memory of what it built last time” — David Gewirtz
  • “Every AI mistake should only happen once, because avoiding it becomes a guardrail rule.” — David Gewirtz
  • “Powerful. Easy to do. Enormously effective. What’s not to love?” — David Gewirtz

HABITS

  • Run only one AI agent at a time, prioritizing visibility, manageability, and predictable recovery paths.
  • Add best practices into CLAUDE.MD and AGENTS.MD so workflows persist across future sessions.
  • Force sequential file processing, requiring regular status updates so you always know progress state.
  • Maintain Docs/IOS_CHANGES_FOR_MIGRATION.md whenever cross-platform changes occur, including date, files, adaptations notes.
  • Use migration logs as operational checklists to keep parity between Mac, iPhone, Watch, iPad.
  • Keep a curated MEMORY.md organized by topic, with separate topic files for deeper details.
  • Remove outdated memories and avoid duplicates, treating project knowledge as maintained documentation, not dumping.
  • Record API signatures, algorithms, measurements, and lessons learned inside the persistent knowledge base.
  • Log every user prompt into PROMPT_LOG.md with timestamps at each session for auditing.
  • Review prompt history to diagnose whether failures came from misleading instructions or missing constraints.
  • Ask AI to restate the user profile when designs drift, then adjust requirements accordingly.
  • Encode user demographics, comfort level, and psychology so AI optimizes usability for target audience.
  • Embed full design system tokens into system prompt to ensure consistent UI across new views.
  • Specify fonts, RGB colors, component patterns, and reference implementations to reduce subjective interpretation.
  • After fixing bugs, instruct AI to record learnings as permanent rules embedded in instructions.
  • Periodically start new sessions for AI-led code review, scanning entire project for overlooked issues.
  • Begin reviews before loading instructions to simulate fresh eyes and highlight neglected inconsistencies quickly.
  • Prefer predictability over speed, willingly waiting longer to keep workflows observable and reversible.
  • Use AI as collaborative partner across Slack-like dialogue, not as oracle producing unquestionable outputs.
  • Build products during nights and weekends, using AI to multiply limited time into shipping capacity.

FACTS:

  • AI companies tout running multiple agents in parallel as a new capability for coding workflows.
  • Parallel agent approaches can cause crashes and hangs, leaving projects in limbo and unfinished.
  • AI sessions are stateless by default, requiring external artifacts to preserve project knowledge over time.
  • NFC is available only on iPhone among mentioned Apple platforms, shaping feature distribution decisions.
  • macOS PDF import workflows differ from iPhone usage patterns, influencing app feature emphasis significantly.
  • A PDF picker silently failed when used as the seventh stacked sheet modifier on macOS.
  • Stacking more than four .sheet() modifiers on the same macOS view can break functionality.
  • NSOpenPanel.runModal() invoked inside a sheet’s onAppear caused a crash during development.
  • OLED readability testing showed low-opacity or gray text performs poorly on watchOS screens.
  • Custom toolbar items can hide back button functionality when navigation titles deviate from system styling.
  • Apple apps still allow inconsistency despite platform design language, making explicit design systems valuable.
  • Codex and Claude Code are examples of agentic vibe coding tools used in practice.
  • The author shipped four major WordPress security add-ons after adopting agentic coding tools recently.
  • The author built a working iPhone app managing 3D printer filament using AI assistance.
  • The author is building apps simultaneously targeting iPhone, iPad, Apple Watch, and Mac platforms.
  • Prompt logs enable reconstructing work after days or weeks away, aiding continuity across sessions.
  • Migration tracking includes date, changed files, platforms affected, and old-to-new specifics with code snippets.
  • A topic-organized memory base improves classification and access compared to chronological dumping into logs.
  • Design system details can include exact font sizes and color RGB values within system prompts.
  • Treating bug fixes as permanent guardrails reduces repeated failures across future AI refactors and rewrites.

REFERENCES

  • ZDNET
  • “7 AI coding techniques that quietly make you elite”
  • OpenAI’s Codex
  • Claude Code
  • “agentic vibe coding tools”
  • Xcode
  • Xcode 26.3
  • iPhone
  • iPad
  • Apple Watch
  • Mac
  • watchOS
  • iOS
  • macOS
  • WordPress security add-ons
  • Filament inventory project (3D printer filament management app)
  • Sewing pattern inventory project
  • NFC
  • PDFs imported from the Mac file system
  • CLAUDE.MD
  • AGENTS.MD
  • MEMORY.md
  • PROMPT_LOG.md
  • Docs/IOS_CHANGES_FOR_MIGRATION.md
  • .sheet() modifiers (SwiftUI)
  • NSOpenPanel.runModal()
  • MIT study: “AI agents are fast, loose, and out of control”
  • “AI gives programmers power tools”
  • “Worried about AI coding? Why the invention of power tools is the blueprint for your career future”
  • “I did 24 days of coding in 12 hours with a $20 AI tool, but there’s one big pitfall”
  • “What is AI vibe coding? It’s all the rage, but it’s not for everyone - here’s why”
  • “10 ChatGPT Codex secrets I only learned after 60 hours of pair programming with it”
  • “10 things I wish I knew before trusting Claude Code to build my iPhone app”
  • “Claude Code made an astonishing $1B in 6 months, and my own AI-coded iPhone app shows why”
  • “I got 4 years of product development done in 4 days for $200, and I’m still stunned”
  • “From Clawdbot to OpenClaw: This viral AI agent is evolving fast - and it’s nightmare fuel for security pros”
  • “AI agents are already causing disasters - and this hidden threat could derail your safe rollout”
  • “True agentic AI is years away - here’s why and how we get there”
  • “5 custom ChatGPT instructions I use to get better AI results - faster”
  • advancedgeekery.substack.com (weekly update newsletter)
  • Twitter/X: @DavidGewirtz
  • Facebook.com/DavidGewirtz
  • Instagram.com/DavidGewirtz
  • Bluesky: @DavidGewirtz.com
  • YouTube.com/DavidGewirtzTV
  • Vertigo3d / iStock / Getty Images Plus

ONE-SENTENCE TAKEAWAY

  • Make AI development observable, auditable, user-centered, and rule-bound so quality compounds over time.

RECOMMENDATIONS

  • Run agents sequentially until parallel workflows become visible, controllable, and reliably recoverable after failures.
  • Add nonnegotiable “one file at a time” instructions to prevent half-finished codebase states.
  • Create a migration log artifact whenever changes affect multiple platforms, then use it relentlessly.
  • Treat every unpropagated cross-platform change as technical debt, tracked until parity is achieved.
  • Maintain a semantic, topic-organized MEMORY.md so lessons are retrievable and reusable across sessions.
  • Prune wrong or outdated memories quickly, preventing stale assumptions from contaminating future design decisions.
  • Keep a timestamped PROMPT_LOG.md so collaboration can be replayed, audited, and debugged later.
  • Use prompt history to identify whether failures came from unclear instructions rather than model limitations.
  • Encode explicit user profiles in system prompts to steer AI toward usable, empathetic product decisions.
  • Ask AI to restate the user profile when it drifts, then revise designs accordingly.
  • Embed a complete design system into the main instruction file for consistent UI outputs.
  • Specify exact design tokens like fonts, RGB values, and component patterns to reduce inconsistency.
  • Convert solved bugs into permanent rules so the same mistake cannot recur in refactors.
  • Document platform-specific gotchas as guardrails, especially where Apple APIs fail silently or crash.
  • Start new sessions by requesting an AI-led code review for fresh eyes on issues.
  • Use AI code review to spot small inconsistencies and quality gaps before they reach users.
  • Favor predictability and recoverability over speed, accepting latency to keep control of outcomes.
  • Treat AI like a teammate with processes, artifacts, and accountability, not an infallible magic box.
  • Standardize your workflow by storing instructions in project files so every session begins aligned.
  • End each session by capturing learnings and updating rules, making progress compound automatically forward.

📇 Additional Metadata

  • 🗂 Type::note
  • 🏷️ Tags::
  • 📡 Status::🌱