A disciplined workflow for testing, understanding, and repairing AI-suggested code.

Reproduce the problem

Capture the exact error, steps to reproduce it, and package or environment versions.

Inspect surrounding code

Check assumptions about data, permissions, paths, and network responses.

Ask for a minimal fix

Share relevant code and the error, and ask for a small change with an explanation. Do not paste secrets.

Run checks after each change

Use tests, linting, type checks, and a build where available.

Review security implications

Check authorization, validation, dependencies, and error handling as well as whether the error disappeared.

Editorial note: This guide is for general educational purposes. Verify important claims with authoritative sources before publication or action.