I have been using a plan based approach for a month or so now. Started out much like you recommended here, however more recently its morphed into something even more prescribed and precise.
I have named my process PRACT, short for PRACTical, based on this:
=====
P - Plan: Work with the agent to generate an initial plan covering your needs. Get the initial requirements on the ground and in context. Its best to have plans developed in a multi-phasic approach.
R - Research & Refine: Work with the agent to refine your plan, and research (usually in another chat tab) any concepts the LLM mentions that you don’t fully grasp or that are new to you. Refine further, until you are fully satisfied in the plan.
--v
A - Actualize & Apply: Get your plan stored, in a document or ticketing system (I use Linear stories myself). From the actualized plan or stories, have the agent implement each phase (or in a ticketing system: story/substory/task) of the plan.
C - Complete: Once you have implemented a phases (story/tasks), work on completing everything. Have the agent check the actual implementations vs. the phase (story/task), identify discrepancies, and resolve them. Make sure any required testing is done. Lint and format. Commit!
^-- [repeat A-C for each phase (story/task underneath an epic)]
T - Terminate: Once you are done with the entire body of work (full plan or epic), clean things up. Close out any open files, close out any active agent tabs, start a clean, new agent chat in the remaining tab. This ensures that you don’t capture unnecessary or unwanted context once you start the next body of work!
=====
Following PRACT has, for me, resulted in each phase (now mostly stories in Linear) being completed often in a single invocation prompt: “Move story ZYX into in-progress, assign to me, and implement.” The ENTIRE story (or phase, if using a markdown document with phases approach) will be handled, usually quite fully, by that single prompt. I will then often have a couple of follow up promots to check the implementation against the story requirements and to fix any discrepancies. Then to verify that the entire test sute runs properly. Once I iterate through all the stories under an epic (or tasks under a story, depending on your ticketing/tracking software), I then have a few more prompts to clean up (lint, format, etc. applied against @Recent Changes
), and finally commit (which I also do with the agent.)
This has dramatically ramped up the speed at which I can work, the effectiveness of the agent and LLM, reigned in chaotic behavior, etc. It is also important to make sure you still have rules set up to govern code style, software design (principles, patterns, practices, etc.), architecture, as well as rules to govern linting and formatting (so you don’t end up with things like the agent auto-formatting every file in the repo!), story creation and management, committing, etc.
PRACT has accelerated my flow and greatly reduced the amount of mishaps. A few tips for plan/story creation:
- Scope: Make sure you have the agent create a scope for each plan, or even each phase (epic/story in a tracking system.)
- Requirements and Acceptance Criteria!
- Verification: Every plan and phase (epic and story) should have verification requirements to cover exactly what to test and how (unit, e2e, integration, each if required, etc.)
- Details: Its good to let the agent add details it thinks are relevant, so long as you verify. Having it add extra details, code, config details/requirements, expectations for environment variables, documentation requirements (or documentation that may be required to implement), etc.
These extra details help guide the agent, keep it on track and focused, so it can do just the work that is needed, and do it as fast and effectively as possible. When you do finally instruct the agent to Apply a given phase (or story), one more thing to make sure you are doing:
- ATTACH RELEVANT CONTEXT! While the plan (phase/story) itself will bring a lot of detail and alllow the agent to work efficiently, it is still important to attach relevant context. This particularly includes
@Docs
that you may think will be required, and if you can attach relevant code areas, code files, etc. it will reduce the amount of manual searching (i.e. grep, git grep/log/show/etc, find, etc.) that may be required for the agent to implement the phase or story. So still, always, CONTEXT IS KING!
Implementation of large bodies of work, with multiple stories underneath a single epic, can be done in an hour or so now, when they were taking a day. Planning takes some time too, depending on exactly what you are doing.