High Focus, Low Energy - A Developer’s Guide to asking an AI to make specific changes
Working with AI can be powerful — but also overwhelming, especially when you’re tired or maintaining complex systems. Large rewrites or off-topic changes can derail focus and introduce bugs or confusion.
This guide outlines a structured approach to reduce cognitive load when requesting code edits or help from AI. It’s intended for developers who need to stay focused, especially under low-energy conditions or while preserving fragile logic in their projects.
Use this quick reference for AI prompts when you’re tired, deep in a problem, or just want to keep things surgical and efficient.
INVARIANTS
, SURGICAL EDIT
, and PATCH ONLY
List any logic, variable names, or structural elements that must stay unchanged. Ideally put this at the top of your chat.
Call out the specific issue, ideally by line number or function.
Request a focus on changes only in the AI’s response.
Use this when you’re fatigued or need to be especially careful with change scope.
⚠️ COGNITIVE LOAD NOTICE
- I'm tired — just fix the bug, no enhancements please
🔐 INVARIANTS
- `direction` must stay `backward`
- Do not change `sortItems()` or its structure
🩺 SURGICAL EDIT
- Fix assignment to `direction` on line 15 only
🛠️ PATCH ONLY
- Return only the fixed code, not a whole block rewrite
One of the most effective ways to reduce the cognitive load when interacting with AI is to clearly define the key objective and stick to it. When making a request, outline the specific task, such as:
The more significant the change, the more careful you need to be about what you request from the AI. For example, avoid asking for a complete overhaul unless absolutely necessary. If the main goal is to modify or optimize part of a code block, focus solely on that section. Avoid requests that ask for comprehensive rewrites unless you are sure they’ll significantly improve the solution.
This can be done by clearly marking the parts of the code that should not change, and by highlighting any aspects that are fundamental to your broader work. For example:
In any AI-based development process, there are certain aspects of your code or approach that must remain unchanged. These might be:
To help AI maintain focus and avoid unnecessary changes, it’s helpful to explicitly communicate what should remain invariant. You can do this by marking invariants clearly, both in your code and in the requests you make.
Example approach:
When you need a change, be as specific as possible. For instance, if you’re asking to fix or improve a function, provide a specific description of the issue:
When tired or under mental strain, the mental load of reviewing multiple changes to a codebase can quickly become overwhelming. In such cases, focus on specific, well-defined tasks rather than large-scale revisions. If you are handling complex code, consider providing incremental feedback instead of asking for a full rewrite.
Instead of attempting a major change all at once, break down the task into manageable sections. For example:
Having to manually re-compare code to previous versions after multiple iterations is mentally taxing. To reduce this effort:
The clearer you can be in your initial request, the better the response from the AI will be. Consider using a structured template for communicating your needs:
AI models often propose solutions that involve significant rewrites. Instead of broadly requesting “improvements,” aim for concrete changes like:
Being specific about what should not change can be just as important as what should.
Given that many tasks are repetitive (e.g., optimizing functions, bug fixing), creating a template or checklist of common requests can speed up future interactions and reduce cognitive load. For example:
Make use of consistent naming conventions, code structure, and common libraries in your communication. This consistency will help both you and the AI focus on solving the specific problem rather than explaining or re-clarifying common practices.
Optimizing communication with AI is not just about asking the right questions—it’s about structuring your requests, defining clear boundaries, and reducing unnecessary complexity. By taking a strategic approach, you can maximize the benefits of working with AI while minimizing confusion and mental overload. By applying these principles, developers can streamline their work, maintain focus on key tasks, and ensure their energy is directed toward meaningful problem-solving.
Author: Andrew Kingdom. This paper came about from a discussion with ChatGPT on how better to approach changes.
AI: This structure is designed to be comprehensive yet easy to follow, focusing on practical suggestions and examples that will resonate with other AI users and developers who may face similar challenges.
For full licensing terms, visit Creative Commons CC BY-SA 4.0.