TL;DR: AI enables instant, detailed iterations; however, it’s best to start the chat with a full list of key feature requirements. Make sure to create a persistent context document of critical information for the AI to reference as the chat gets long to maintain long-term memory context. Set boundaries on what an MVP requires to focus on valuable features and avoid potential endless tweaking.
Tips:
- In the initial chat, specify the architecture, key feature requirements for the application, and tell it to create a persistent context document to use as a long-term context memory.
- After creating the initial application, switch to agile iterations and specify one feature change at a time; test immediately after each iteration.
- Balance customization with practicality, ensuring each change meaningfully enhances user experience.
- Limit your iteration time to maintain productivity and avoid getting lost in endless detail adjustments.
- If you need to make a major change to the application, go ahead and have the AI rewrite the application at this stage–pay down your tech debt rather than moving forward with it.
While the ability to respond instantly and write new code endlessly would appear to make AI tools ideal for Agile development, in many ways they’re more fragile than human programmers because they can’t imagine future use cases or grasp the big picture without you telling them explicitly what you want them to build. They write very specifically to your requirements and while they might occasionally add some additional useful features, they don’t ask questions or strategize on the long-term goals.
In traditional product management a poorly written and sparse product requirements document prompts endless questions from the engineer on the receiving end to ensure that the unspecified needs are defined. With AI, the AI will simply apply its own decision and you won’t know that it filled in the gap until you start using the tool and see the unintended consequences. Your app will be more stable and will need fewer code rewrites if you begin the initial chat with a well-specified product requirements document that tells the AI what basic workflows and detailed features your application needs.
A unique element of building with AI is chat context. Chat windows lose context because AI models like GPT-4 have a limited memory window called a token context length—usually between 8,000 and 32,000 tokens. As a conversation grows longer, older messages fall out of that window and are forgotten, which is why the AI may seem to “forget” earlier details or appear less coherent over time. This short-term chat memory is different from permanent learning during model training, which updates the AI’s internal parameters based on large datasets and improves its knowledge long-term. Unlike training, chat memory is temporary and doesn’t improve the model itself. To address this, future models may use larger context windows, memory systems, or safe incremental learning. Until then, you can simulate longer memory by explicitly asking the AI in the initial chat to: create and update a persistent context canvas document that contains a summary and key details of the chat to reference later to maintain context. You can then remind the AI to update that document when particularly relevant information is created and in long chats if the AI starts to forget information, you can remind it to reference that document when responding.
With the initial chat optimized, the AI will chug for a while and then provide you with a functioning application. From there on out, it’s all Agile iterations. Define one feature change at a time and rigorously test each immediately. This method avoids introducing significant errors while keeping the iteration manageable.
You will also need to tell the AI to add in the types of features that a polished app should have, such as a browser tab icon, page metadata, and social media sharing features. For search engine optimization (SEO), I leveraged AI by asking ChatGPT in a chat that I had trained on information about my app to provide ideal search terms, I then asked v0.dev to add the search terms to the app metadata.
Sometimes while updating the code for a feature request, the AI will suddenly make a change to unrelated features. If so, I found the quickest way to resolve the issue is to have it revert the code back to the last iteration and then ask for the new feature request and include the specification to “Keep the rest of the application exactly as it is.” You can also use that explicit type of language if you want the AI to use an image or copy something, simply add in the “exactly” phrasing, such as “apply the uploaded image exactly."
If you decide to do a major change to your application, it’s worth considering rewriting the entire application with the new requirements stated from the beginning, rather than trying to keep altering major pieces of code and producing instability where making a change in one place breaks the application in another spot. With AI, go ahead and pay off your tech debt right away and optimize the code, rather than dragging it along with you.
AI’s speed at iterating designs makes it easy—and tempting—to endlessly tweak your app. As you make changes, consider if it is directly enhancing the user experience meaningfully, and focus on those value-add additions. Setting practical boundaries is also essential to prevent becoming lost in endless details. I found that giving myself a daily time limit for tweaking fonts, colors, and layout was crucial for maintaining productivity.