# Strategy Pattern

Record: `arch:strategy-pattern`
Kind: pattern
Layer: [Design Patterns Core](https://banes-lab.com/records/layer/design-patterns-core.md)
Severity: recommended
Scope: algorithm, policy, behavior
Canonical: https://banes-lab.com/ontology#arch-strategy-pattern

## Repair

- Refactored by: Extract Strategy
- Detected by: conditional strategy selection with duplicated behavior
- Violated by: switch over behavior modes
- Measured by: conditional complexity
- Enforced by: complexity thresholds, [review](https://banes-lab.com/records/lex/review.md)

## requires

- [Interchangeable Algorithms](https://banes-lab.com/records/lex/interchangeable-algorithms.md)

## reinforces

- [Open/Closed Principle (OCP)](https://banes-lab.com/records/arch/open-closed.md)
- [Polymorphism](https://banes-lab.com/records/arch/polymorphism.md)

## enables

- [Runtime Behavior Selection](https://banes-lab.com/records/lex/runtime-behavior-selection.md)

## conflicts-with

- [Large Conditional Logic](https://banes-lab.com/records/lex/large-conditional-logic.md)

## tensions-with

- [Class Count](https://banes-lab.com/records/lex/class-count.md)

## tensions

- [Strategy Pattern Class Count](https://banes-lab.com/records/tension/class-count-strategy-pattern.md)

## referenced-by

- [Composition Over Inheritance](https://banes-lab.com/records/arch/composition-over-inheritance.md)
- [Open/Closed Principle (OCP)](https://banes-lab.com/records/arch/open-closed.md)
- [Polymorphism](https://banes-lab.com/records/arch/polymorphism.md)
