1. Analyze the method to identify sources of cognitive complexity.
2. Identify opportunities for extracting helper methods.
3. Extract focused helper methods with single responsibilities.
4. Simplify the main method by reducing nesting and replacing complex chains.
5. Run existing tests and verify that all tests pass (failed=0).
6. Check cognitive complexity to ensure it is below the target threshold.
7. Ensure the code compiles without errors.