Great breakdown, Faisal. The "hallucinated functions" point is the one I see bite people most, because the code looks idiomatic and passes a quick glance. A few habits that have helped me on top of your list:
Make the AI cite the API. If a suggestion uses a library call you haven't used before, open the official docs for that exact version before you accept it. Most hallucinated methods die in about 30 seconds this way.
Pin and diff dependencies. AI tools happily suggest packages that are abandoned or typo-squatted. Running npm audit / pip-audit and checking the package's last release date before adding it catches a lot of the licensing and security issues you mention.
Write the test first, then let the AI fill in the function. If you can't describe the expected behaviour as a test, you probably can't review the generated code either.
Explain it out loud. If you can't walk a teammate through every line, it's not ready to merge. This is also exactly what interviewers now probe for: many technical interviews ask candidates to explain or debug a snippet, and "the AI wrote it" isn't an answer.
That last point is something we think about a lot at Linkjob (I work on it, so take this as a disclosure): AI can speed you up, but understanding the code is still the skill that gets tested.
Linkjob AI
Great breakdown, Faisal. The "hallucinated functions" point is the one I see bite people most, because the code looks idiomatic and passes a quick glance. A few habits that have helped me on top of your list:
npm audit/pip-auditand checking the package's last release date before adding it catches a lot of the licensing and security issues you mention.That last point is something we think about a lot at Linkjob (I work on it, so take this as a disclosure): AI can speed you up, but understanding the code is still the skill that gets tested.