AI agents are notorious for getting tasks done but also taking some shortcuts in TypeScript such as falling back to using things like 'any', which you probably do not want in your codebase.
This creates a scenario where the AI has done all of the work, you've tested and verified everything, but it's left you with data and functions untyped. So in this situation, when you run git commit, you can set up a commit hook to expose all the TypeScript errors then you just let the AI agent run that commit hook and it can find all of the mistakes that it made and go through and fix everything without you ever having to touch the code.
This lesson covers a real world scenario of a commit hook running based on a refactor that was made when extracting some types. You will learn how Cursor AI agents handle and respond to commit hooks and by giving exhaustive information on what went wrong in a commit, the agent can continue on and make all the changes for you.