# complexity > Code complexity guidelines to keep cyclomatic complexity below 6 using strategy patterns or dispatch tables. Use when writing or refactoring functions with complex branching logic. - Author: Kevin Crabbe - Repository: kevincrabbe/wrapkit - Version: 20260105015050 - Stars: 0 - Forks: 0 - Last Updated: 2026-02-07 - Source: https://github.com/kevincrabbe/wrapkit - Web: https://mule.run/skillshub/@@kevincrabbe/wrapkit~complexity:20260105015050 --- --- name: complexity description: Code complexity guidelines to keep cyclomatic complexity below 6 using strategy patterns or dispatch tables. Use when writing or refactoring functions with complex branching logic. --- # Code Complexity Guidelines Apply these guidelines to keep code complexity manageable. ## Cyclomatic Complexity Keep the cyclomatic complexity of each function below 6. - If you have a large switch case, consider using the strategy pattern or dispatch table instead