Purpose Driven Development - the WHYs
Purpose Driven Development
Help AI models by giving them the WHY behind your instructions.
Fancy title but simple idea I have been doing that helps keep coding agents on track:
After I give some instructions (anywhere in the process of coding with them) if I think something might be hard to understand or I suspect that it might go off track or forget, I add a sentence or two about the purpose of the instructions.
Like:
Prompt/instructions:
Have the app check to see if powershell 7 is installed before defaulting to the built in powershell, on app start.
**The purpose of this is to** help the user save time so they don't have to manually change it to the newer powershell (it seems logical to assume they will probably want to use the latest one, if they installed it).
Usage tips:
- Keep the purpose concise (one or two lines) and place it immediately after the instruction it clarifies.
-
Use the word Purpose or say "The Point of this is..." so agents can understand. Basically, its like if it was a person and you are trying to teach the person something and when they understand the WHY behind something, its easier to learn or do it!
-
Consider visually styling or marking purpose lines (highlight, bold, or a prefixed token) if your toolchain supports it — that makes them easier to extract.