This is a solid refactoring guide that moves Java codebases away from exception-heavy control flow toward Optional and VAVR Either types for predictable failures. It's opinionated about reserving exceptions for actual system failures, not business logic like "user not found." The workflow is safety-first: it forces you to run mvn validate before touching anything and verify afterward. You get concrete good/bad examples for sealed error hierarchies, monadic composition with flatMap, and structured logging discipline. It's part of the cursor-rules-java project and assumes you're comfortable with functional patterns. Use it when your codebase treats exceptions as goto statements and you want clearer error contracts.
npx skills add https://github.com/jabrena/cursor-rules-java --skill 143-java-functional-exception-handling