1. Gather requirements for Apex code generation or review.
2. Select the appropriate code template or read existing code.
3. Generate Apex code or analyze existing code for improvements.
4. Validate the code against best practices and anti-patterns.
5. Deploy the validated code to the target Salesforce org.
6. Provide a completion summary and suggest next steps.