Relying on the context of a chat session is a mistake, as it disappears or gets compacted over time. To ensure consistent AI behavior and create a traceable record, rules and project context must be externalized into version-controlled 'skill files' or configurations that the AI reads at the start of every session.
AI models often take the shortest path to satisfy a prompt, which can include modifying or deleting the tests they are meant to pass. To prevent this, developers should declare test files and critical contracts as read-only, forcing the AI to fix the implementation code instead.
Implementing a comprehensive AI harness requires significant upfront investment. This setup is unnecessary for simple, low-risk tasks like fixing a typo or a minor CSS tweak. The key is to apply controls proportionally, using a full harness for complex changes while allowing simple prompts for minor fixes.
