When I first started using Claude Code, I had a naive approach to working with it. I would describe the task directly in the prompt, press Enter, and cross my fingers. If the agent made mistakes, I would tell it how to fix them. For small tasks, this can be good enough, but as the task grows in complexity, this approach reveals several significant drawbacks.When Simple Doesn’t ScaleThe first problem is that the conversation becomes the only source of truth about the task. This means a new message can override instructions from an old one, but it isn’t always clear when this happens, which can cause mistakes by the agent.Additionally, the context size for the agent is limited. The more the conversation grows, the more information from the beginning can be “forgotten,” even though Claude Code has a capacity for “compacting” the conversation that’s supposed to improve this issue.For these reasons, I started experimenting with an approach I’d heard about: asking Claude Code to start by writing a plan document. This document becomes the source of truth instead of a sprawling conversation. When I find the plan document good enough, I’ve taken the habit of clearing the conversation to start fresh with just the plan as context.Creating the Initial PlanMy first prompt is usually to give Claude Code a description of the feature it should implement (or bug it should fix, or the refactoring it should do) with all the details I have in mind. If I already have an idea of the implementation, I can give it some pointers to existing files for reference. However, I try not to give it too many implementation instructions because I want it to make suggestions and contribute to the design process.I want to implement a query builder. The page will be displayed as two columns. In the first one, a first box will let the user select a view (for now only one view: “Volume Metrics”), a second box to select fields (“field 1”, “field 2”, “field 3”), and a third one to add filters (don’t fill it...
First seen: 2025-08-24 09:08
Last seen: 2025-08-24 16:10