For P0, I write the code myself and use AI only for verification. This includes business logic or areas where failure must not happen. Typical examples are JWT authentication, API key handling, and, in PLC-related work, equipment interlocks, deletion logic, and machine control.
For P1, I use AI when writing logic that connects the backend and frontend. Even if something goes wrong, the damage is relatively limited, and I have found that AI often writes this kind of code better than I do, especially when it is built on top of P0 logic that I have already defined.
For P2, I let AI write the code and only verify that it builds successfully. This mostly applies to frontend-related work. Of course, if the frontend includes core animation logic, I may write that myself, but in most cases I let AI handle it.