Many of us started our journey with LLMs using ChatGPT on the web and then moved completely to coding agents once they started producing actually useful outputs. This pattern proposes going back to LLMs that have zero visibility into your codebase, even when planning new features for an existing application.
It feels counterintuitive to remove codebase access, as the more context your agent has about your application, the better its outputs should be. In reality, you often don’t want to anchor your entire planning process around what’s easy or hard in your codebase, but rather around things like usage insights and validation work. In addition, you often want to include more than just the “developer” perspective in your planning.
While you could try prompting your coding agent to ignore the code and think like a user researcher, you will likely get better results by simply stepping outside the codebase environment, as the agent has a system prompt and tool definitions that have been tuned to handle programming tasks. All of this will eat into the effective context window budget, even when working with frontier models.
But when we go back to a web-based LLM that is disconnected from our codebase, things can get messy really quickly, with multiple sprawling conversations and all the artifacts you keep generating in the process. In addition, you might be wondering what this planning process should even look like.
This pattern is one approach to planning outside the codebase. It consists of the following strategies:
- Manage memory by creating and updating a single session primer document.
- Use thinking hats to move through the process instead of following the typical “research → plan” or “requirements → design” steps of spec-driven development.
- Generate handoff documents between non-coding agents and coding agents when needed.
Session primer
The initial planning step starts with your intent and drafting the first plan together with an agent (such as ChatGPT or Claude.ai) through a conversation in which you read through the AI’s suggestions and adjust them.
You can get started with the following prompt:
[YOUR INTENT AND SUMMARY OF RELEVANT CONTEXT] What is needed: A plan that contains an overview of the project, the required architecture and tech stack before building starts, and a short description of the critical requirements. How to proceed?
Once you have made edits to the plan with your agent, close that conversation by generating a session primer. The session primer is used to kick off future planning conversations.
You can try generating a session primer with the following prompt:
Generate a session primer that I can use to start planning conversations in new AI agent sessions. Include the plan document you created and important contextual information from my earlier prompts.
Skim the session primer from beginning to end for quick validation. Later on, you will only need to review the changes being applied to it.
Thinking hats
Thinking hats is a framework for looking at an idea from multiple perspectives by focusing on a single perspective at a time.
My go-to thinking hats are taken from the Design Sprint method:
- Idea Generator
- Optimist
- Pessimist
- Technical Feasibility
- User Advocate
Pick one of the hats and start a new session where you attach the latest version of the session primer. The reason for starting new sessions is that the performance of the LLM may otherwise degrade, as LLMs are generally bad at arguing against their own previous reasoning.
Here is an example prompt:
Read the attached session primer, then act as a user advocate and find ways to improve the user experience.
Continue the conversation and pick the relevant suggestions. Finally, ask the agent to update the session primer.
Here is an example prompt:
Here are my comments. Update the session primer accordingly: [YOUR COMMENTS]
Always use the latest version of the session primer when starting new sessions. Consider previous versions of the session primer to be throwaway artifacts.
Handoff documents
Sometimes you will need to get specific context from your codebase. But this doesn’t mean you need to end your web-based planning and switch to a coding agent.
Instead, you can instruct your web-based agent to generate instructions for your coding agent to retrieve the relevant context. After that, you can pass the research done by the coding agent as a Markdown document back to your web-based session.
Here is an example prompt:
Read the attached session primer, then help design the required data model. To get more context about our current data model, give me instructions that I can pass to a coding agent that will produce the required assets for you.