docs/StrategyEngine/02-CoreConcepts.md
The Strategy Engine operates on a unified model where UI presentation, matching logic, and execution templates are bundled into a single concept: the Strategy.
| Term | Definition |
|---|---|
| Strategy | The core entity representing a user intent. It includes UI metadata (icon, name), activation conditions, preprocessor definitions, and the final prompt template. |
| Provider | A source that supplies Strategies to the engine (e.g., built-in system definitions, user-specific directory configurations, workspace-level configs). |
| Condition | A predicate or rule tree that evaluates against the current OS and visual context to determine if a Strategy should be visible to the user. |
| Context | The snapshot of the current state: user attachments, active processes, OS environment, and parsed visual UI trees. |
| Preprocessor | An executable middleware that intercepts a Strategy's execution to extract dynamic data (like an active URL) and inject it into the prompt template. |
Unlike traditional architectures that split condition matching and command execution into separate layers, the engine flattens everything into a singular Strategy.
A Strategy acts as:
Condition rules to decide when it should appear.Preprocessors to run upon activation.Body (user message template) and optional system prompt overrides.To support unbounded extensibility, Strategies are gathered via Providers. The Strategy Engine does not hardcode which strategies exist; instead, it asks all registered Providers to supply their items.
Common providers include:
~/.everywhere/ for user-customized .strategy.md configurations.Providers allow the engine to remain decoupled from the storage medium and format of the strategies.