How I use Claude Code: Separation of planning and execution
This post details a highly structured and iterative workflow for AI-assisted coding with Claude, emphasizing the crucial separation of planning and execution through persistent markdown documents. It's popular on Hacker News for its practical, opinionated approach to leveraging LLMs for complex software development, sparking lively debate on AI productivity, token efficiency, and the nuances of prompt engineering. The author's method aims to keep the human in the architectural driver's seat while offloading mechanical implementation to the AI.
The Lowdown
The author, Boris Tane, introduces a highly opinionated workflow for using Claude Code that deviates significantly from typical AI coding practices. His core principle is to never let the AI write code until a detailed plan has been reviewed and approved by a human. This approach, refined over nine months, is designed to prevent wasted effort, maintain architectural control, and achieve better results with minimal token usage by separating the 'thinking' (planning) from the 'typing' (execution).
- Phase 1: Research: Tasks begin with a directive for Claude to deeply understand a part of the codebase, requiring its findings to be written into a persistent
research.mdfile. Keywords like "deeply" are crucial to prevent surface-level analysis. This artifact serves as the human's review surface to catch misunderstandings early. - Phase 2: Planning: After research, Claude generates a
plan.mdoutlining the implementation, including code snippets, file paths, and trade-offs. The author prefers custom markdown plans over Claude's built-in plan mode for greater control and persistence. - The Annotation Cycle: This is the workflow's most distinctive part. The author reviews the
plan.mdin an editor, adding inline notes to correct assumptions, reject approaches, add constraints, or provide missing domain knowledge. Claude then updates the plan based on these notes, with the cycle repeating 1-6 times, explicitly guarded by "don't implement yet" until the plan is perfect. - The Todo List: Before implementation, a detailed
todo listis added to the plan, serving as a progress tracker for Claude to mark off tasks. - Phase 3: Implementation: A standardized prompt initiates implementation, instructing Claude to execute the plan completely, mark progress, avoid unnecessary comments/types, and continuously typecheck. The goal is to make implementation a mechanical, "boring" process, as all creative decisions are finalized in the planning phase.
- Feedback During Implementation: The human's role shifts to supervision, with terse corrections for any deviations. For frontend issues, screenshots and references to existing UI patterns are used. If an approach goes wrong, the author reverts changes and re-scopes rather than incrementally fixing.
- Staying in the Driver's Seat: The author emphasizes maintaining control by cherry-picking from Claude's proposals, trimming scope, protecting existing interfaces, and overriding technical choices. The human makes the judgment calls; Claude handles mechanical execution.
- Single Long Sessions: The entire process (research, planning, implementation) occurs in one continuous session. Claude's context window management and the persistent plan document allow for sustained work without degradation.
This disciplined pipeline, devoid of "magic prompts," ensures that the human's judgment, product priorities, and architectural insights are injected at the right stages, leading to a more controlled and effective AI-assisted development experience where the AI executes a human-approved vision.
The Gossip
Probing Prompting Peculiarities
The discussion delves into the author's use of emphatic language like "deeply" in prompts, questioning why such words seem to elicit better LLM performance. Some commenters express skepticism, finding it counter-intuitive to how LLMs theoretically work. Others propose explanations, suggesting it might influence the model's internal 'thinking' tokens, guide its attention mechanism, or even serve as a heuristic for how much 'effort' to expend on a task, akin to an implicit 'cost' signal for token usage. There's also a humorous acknowledgment of the 'strange new world' of effectively 'tricking' a computer into cooperating, sometimes by just saying 'Yes you can.'
Productivity Paradoxes and Practicalities
A significant thread debates whether the described detailed planning and annotation workflow is genuinely more productive than traditional coding. Skeptics argue that the extensive prompting, checking, and orchestrating might take more time than just writing the code manually, especially for experienced developers, and question the AI's ability to produce truly 'good' or non-trivial code without subtle errors. Conversely, many users strongly advocate for the AI's productivity gains, sharing anecdotes of tasks completed in minutes or hours that would typically take days. They highlight benefits like offloading repetitive work, parallelizing tasks, and leveraging AI's tireless nature, particularly with newer, more capable models like Claude Opus.
Validating Workflow Variations
Many commenters resonate with the core idea of separating planning from execution and share their own similar, structured AI coding workflows. Some detail sophisticated multi-document systems involving specs, plans, and working memory files, often combined with custom 'planner' and 'implementer' skills. Others point to existing tools like GitHub Speckit, OpenSpec, Plannotator, or 'superpowers' frameworks that automate parts of this structured, spec-driven development. The consensus is that a structured approach is key for effective AI-assisted coding, moving beyond simple 'plan mode' to more robust, human-in-the-loop systems.
Monorepos and Modularity Matters
A minor but interesting tangent explores the implications of AI coding on code organization, specifically regarding monorepos. Commenters discuss whether the 'new AI world' favors monorepos over separate repositories, given the AI's ability to navigate large codebases. The general sentiment is that AI agents are flexible and can work with various directory structures, with suggestions ranging from creating a single directory with cloned repos to using root-level documentation to explain multi-repo setups to the AI.
AI Authorship Allegations
A small but vocal subset of comments raises the question of whether the article itself, or some comments within the thread, are AI-generated. This includes direct accusations of the post being AI-generated or edited, with some users pointing to specific stylistic elements (like the use of bolded headings) as potential 'tells.' This reflects a broader concern within online communities about distinguishing human-authored content from AI-generated text.