Stacking Features with AI — How to Keep Your Structure from Falling Apart
Learn the right way to ask AI for new features, and a development routine that keeps your structure intact as features pile up.
In part 4, we built our first screen. Now it’s time to really start stacking up features. In this post, we’ll look at how to actually add features together with AI, and how to manage the reality that structure gets blurrier as features pile up.
We’ll keep using the bookmark app as our example, adding tagging and search on top of the basic screen we built in part 4.
How to Ask AI for a New Feature
The single most important principle when adding a feature is one thing at a time.
If you don’t have much experience, you’ll be tempted to ask for everything at once: “Add tags, search, and sorting, all of it.” But this approach is a great way to create problems.
| Approach | Pros | Cons |
|---|---|---|
| Request several features at once | Feels faster | Code gets tangled and hard to fix later; when an error shows up, it’s hard to tell what caused it |
| Request features one at a time, step by step | Feels slower | You can check the result at each step; when something breaks, the cause is obvious |
In practice, asking for things one at a time is actually faster overall. Since you know exactly where a bug came from, the time you spend fixing it drops dramatically.
The Structure of a Good Feature-Request Prompt
[Describe the current state]
The bookmark app currently saves URLs and titles and shows them in a list.
Data is stored in localStorage, and each bookmark has the shape { id, url, title }.
[Feature to add]
I want to add tags. When saving a bookmark, users should be able to attach
multiple tags, and clicking a tag in the list should filter to only bookmarks
with that tag.
[Data structure change]
Add a tags: [] array to the existing bookmark data.
No migration needed for existing data — if tags is missing, just treat it as an empty array.
[Scope limit]
Just do this for now. Editing or deleting tags will come later.
Writing your prompt in this order — current state → desired feature → data changes → scope limit — lets the AI add the feature without conflicting with your existing code.
The Reality: Structure Gets Harder to Follow as Features Pile Up
Even when you add features one at a time, there’s a reality you can’t avoid: the code keeps getting more complex.
At first it’s fine to have everything in a single App.jsx. But once tags are added, then search, then sorting, at some point App.jsx crosses 300 lines.
Once you’re at this point, requesting a new feature tends to cause problems like:
- The AI misunderstands the existing code and recreates a similar function, creating duplication
- You ask for a fix and something unrelated changes instead
- Fixing one feature breaks another
The root cause of this is that it’s hard for the AI to grasp the entire context of the code all at once when reading it.
Leaving a Trail in CLAUDE.md as Features Pile Up
The way to solve this problem is to keep a short record of your project’s current structure every time you add a feature. This is where the “habit of recording” from part 5 turns into an actual routine.
The record itself doesn’t need to be complicated. Appending a line or two about the new file and its role to the CLAUDE.md you made in part 3 is enough.
For example, once you’ve added the tag feature, ask Claude Code something like this:
I finished adding the tag feature. Update the structure notes in CLAUDE.md with the following:
- Added TagFilter component (under BookmarkList, filters when a tag is clicked)
- AddForm now has a tag input field
- localStorage data now has a tags array
Keeping CLAUDE.md up to date this way means that the next time you request a feature, the AI grasps the current structure automatically as the conversation starts — no need to open every code file yourself.
I want to add a search feature — suggest where it should go given the current structure.
With the structure laid out in CLAUDE.md, Claude Code figures out which components the search feature relates to and then suggests where it should live.
Practical Tip: A Routine for Adding Features
Here’s a routine worth repeating every time you add a feature.
1. Before you start: check the current structure
Look at CLAUDE.md and the current folder structure and summarize where things stand.
2. Write code: request one feature at a time
Break the feature into small pieces and request them in order.
3. Verify it works
Check directly in the browser that the newly added feature works correctly.
4. Record it: update CLAUDE.md
Reflect the [feature] I just added in the structure notes in CLAUDE.md.
Repeating this routine keeps the structure from getting blurry no matter how many features you add. Every time you start a new task, you can always start with a clear picture of exactly how far you’ve gotten.
Coming Up Next
In the next post, we’ll cover deployment — how to take an app that only runs locally and publish it on the internet.