AI-assisted coding checklist
This list is for when you work with an AI agent to make changes in a codebase — without giving it detailed written instructions ahead of time.
Instead of handing it a pre-written plan or “content engineering” files, the approach here is more conversational: one step at a time, with back-and-forth guidance.
The goal is to keep control, reduce mistakes, and make the AI more useful as a coding assistant.
1. Give full context first
Before asking for a change, help the AI understand what it’s working with.
Tell it which files to look at and what role they play. AI doesn’t automatically know how everything connects.
Examples:
Read Header.tsx, layout.tsx, and globals.css before doing anything.
The component gets data from getArticles() and uses Sidebar.tsx — include both.
Also check the useTheme() hook — it controls dark mode.
2. Say what you want — and what you don’t want
Be clear about the goal, and about what should stay unchanged.
The more specific you are, the better the result.
Examples:
Improve mobile layout for screens under 768px, but leave desktop layout exactly as it is.
Refactor the logic to remove duplication, but > don’t change any behavior or styling> .
Add a loading state, but > don’t touch the existing error handling> .
3. Instruct like a smart assistant
Guide the AI like you would guide a human helper.
Ask it to read first, then explain what it sees, then suggest a plan, then write code.
Examples:
First, summarize what this file does.
Now tell me which part you’d change to support feature X.
What’s your plan before we edit?
Now go ahead and implement that plan.
4. Change one thing at a time
Don’t mix multiple types of changes in one step.
Do logic first, then styling, then tests. Or fix one feature at a time.
Examples:
Just fix the broken toggle logic — no styling yet.
Only focus on the layout grid. We’ll do the animation later.
Start by renaming things for clarity. We’ll refactor logic next.
5. Iterate — don’t rush
Take a first step, then improve based on feedback.
Don’t try to get it perfect in one go. Small loops work better.
Examples:
Try a first draft — keep it simple.
Now improve naming and formatting.
Now add accessibility support.
6. Ask the AI to explain itself
Before and after it writes code, get a short explanation.
This helps catch mistakes early.
Examples:
What exactly are you going to change, and why?
Now that it’s done — explain what changed.
Was anything tricky or uncertain here?
7. Watch out for side effects
Changes in one place might break something else.
Ask the AI to think beyond the current file.
Examples:
Could this change affect global state?
Will the new prop name break any other components?
Is this function used anywhere else?
8. Think about testing
Even if you’re not adding tests now, ask what should be tested.
This keeps the code quality in mind.
Examples:
What are the key behaviors we should test here?
Which edge cases need to be covered?
Are there existing tests that cover this logic?
9. Review everything before accepting
Don’t assume it’s correct — read and understand the output.
Always check the result.
Examples:
Does the change match the original request?
Is anything broken or removed by mistake?
Are names clear and consistent?
10. Ask the AI to clean up
Tidy up after the work is done.
This prevents mess later.
Examples:
Remove unused imports or variables.
Get rid of any console.log() statements.
Collapse empty fragments or simplify return statements.
11. Let the AI document the change
Don’t skip documentation — even quick notes help.
Ask for comments or a commit message.
Examples:
Add a comment to explain this workaround.
Write a commit message for this change.
Update the README section about the sidebar layout.
12. Use good names
Naming is part of clarity — ask for better ones if needed.
The AI can help you spot unclear or awkward terms.
Examples:
What’s a better name for dataManagerHelper()?
Should themeMode be renamed to isDarkMode?
Are these names consistent with the rest of the codebase?
13. Split big tasks into smaller ones
Avoid giving complex instructions all at once.
Let the AI focus on one part at a time.
Examples:
First, set up the structure for the settings page — no styling yet.
Now add logic to load the user’s saved preferences.
Next step is making the save button work.
14. Ask what it’s unsure about
The AI might not know everything — help it flag uncertainties.
This gives you more insight into the risks.
Examples:
What part of this change are you least sure about?
Is there anything here that might not work as expected?
Any edge cases you think I should double-check?
15. Watch for performance or security issues
It’s not just about whether it works — ask the AI to look deeper.
Examples:
Could this loop cause performance issues with large datasets?
Is there a chance of leaking private data here?
Could this cause memory leaks if the component is unmounted?
16. Learn while you code
Ask questions as you go — use the AI as a teacher too.
Examples:
What does debounce mean in this context?
Why is this written as a custom hook instead of inline?
Explain how this animation is triggered.
17. Think long-term
Don’t just fix the current issue — build in a way that makes sense later too.
Examples:
Would this be better as a shared utility?
Is this logic going to be reusable elsewhere?
Could this naming cause confusion in 3 months?
Tip: Save this checklist and use it whenever you're working with AI agents to write or modify code. Especially useful when working without content engineering files or predefined prompts — just guiding the process one step at a time.