To summarize what’s clicked for me this week working with a code gen IA. A good set of instructions likely includes:
Incremental Verification - using tests to coerce the agent to make smaller changes and verify before making additional changes - whether truly test first or test after.
Explicit boundaries - what files can the agent change and what files should it not change in order to implement the feature. Prohibit unmanaged changes files that might introduce regressions. The agent will stop and describe what it wants to do (Very powerful).
Stop conditions - Conditions under which an agent should stop attempting to make changes and ask for help, i.e. the edit tool has misapplied a change and altered the code files in ways the agent didn’t intend, it introduces a regression in the test suite, etc.
If you have other types of guards you add to your instructions, please let me know.