Hermes Wiki

Strategy

Defines a family of interchangeable algorithms/behaviors behind a common interface, selected at runtime — the pattern underlying the AI provider adapter.

Why we need this / what value this brings

Lets you swap an algorithm/behavior at runtime without conditional branching scattered through the calling code.

When to use this

You have multiple interchangeable ways to do the same conceptual operation, selected by config, user choice, or context.

How to use or implement this

Define a common interface for the behavior, implement one class per variant, and select/inject the right one at the point of use — this is the exact shape of the ProviderAdapter pattern.

Research questions

  • Pricing calculation (flat rate vs hourly vs subscription — see the Service files at the LocalzDocs root) is a natural Strategy pattern candidate.

Empty folder — drop notes, links, and findings here as you research.

Hermes Wiki