Strategies
The built-in adaptation strategies and their configuration types
A strategy is a pure (level) -> config mapping implementing AdaptationStrategy. Resolve them directly (strategy.resolve(level)), through the engine (engine.resolve(strategy)), or in React via useStrategy. Each strategy also implements describe(level), returning a human-readable summary.
The package ships seven built-ins. Six are documented on this page:
| Export | Strategy name | Config type | Module |
|---|---|---|---|
uiVisibilityStrategy | ui-visibility | UIVisibilityConfig | core |
notificationStrategy | notifications | NotificationConfig | core |
taskComplexityStrategy | task-complexity | TaskComplexityConfig | core |
interactionForgivenessStrategy | interaction-forgiveness | InteractionForgivenessConfig | core |
deferralStrategy | deferral | DeferralConfig | core (see Deferral) |
autonomyStrategy | autonomy | AutonomyConfig | core |
The seventh, demandAdmissionStrategy, is documented with the inbound-demand policy it belongs to. createPresenceStrategy is a factory rather than a fixed strategy, and lives with Presence.
All resolved configs are frozen. All resolve implementations throw for invalid levels (they validate through getEnergyLevel).
uiVisibilityStrategy
const uiVisibilityStrategy: AdaptationStrategy<UIVisibilityConfig>Which chrome elements are shown and how prominent they are.
UIVisibilityConfig
Prop
Type
/>
Values per level
| Level | sidebar | tabBar | statusBar | toolbar | chromeOpacity | chromeOpacityHover | contentMaxWidth | contentFontScale | readOnlyCursor |
|---|---|---|---|---|---|---|---|---|---|
100 | true | true | true | true | 1 | 1 | none | 1 | false |
75 | true | true | true | true | 0.7 | 1 | none | 1 | false |
50 | true | true | true | true | 0.4 | 1 | 90ch | 1 | false |
25 | false | false | false | true | 0.1 | 1 | 80ch | 1.05 | false |
0 | false | false | false | false | 0.05 | 0.8 | 75ch | 1.1 | true |
The same values are mirrored by applyEnergyLevel as CSS custom properties and by the reference stylesheet.
notificationStrategy
const notificationStrategy: AdaptationStrategy<NotificationConfig>Which notification channels are allowed and how aggressively intents are filtered. Enforced at runtime by the notification gate.
NotificationConfig
Prop
Type
/>
Values per level
| Level | allowVisual | allowSound | allowVibration | batchInterval | priorityThreshold |
|---|---|---|---|---|---|
100 | true | true | true | 0 | all |
75 | true | true | false | 0 | all |
50 | true | false | false | 300000 (5 min) | high |
25 | true | false | false | 900000 (15 min) | critical |
0 | false | false | false | 0 | none |
taskComplexityStrategy
const taskComplexityStrategy: AdaptationStrategy<TaskComplexityConfig>Which tasks to surface and whether to nudge breaks.
TaskComplexityConfig
Prop
Type
/>
Values per level
| Level | maxComplexity | suggestBreaks | breakIntervalMinutes |
|---|---|---|---|
100 | complex | false | 0 |
75 | moderate | false | 0 |
50 | routine | true | 45 |
25 | simple | true | 25 |
0 | consumption | false | 0 |
Rest (0) is already a break: prompting someone at 0 to take a break from resting is noise, so break suggestions are disabled entirely.
interactionForgivenessStrategy
const interactionForgivenessStrategy: AdaptationStrategy<InteractionForgivenessConfig>How much room the interface gives the user to notice and reverse mistakes. Lower energy means slower error detection, so forgiveness scales inversely with capacity: longer undo windows, confirmation on destructive actions, more frequent autosave.
InteractionForgivenessConfig
Prop
Type
/>
Values per level
| Level | undoWindowMs | confirmDestructive | autosaveIntervalMs |
|---|---|---|---|
100 | 5000 | false | 60000 |
75 | 8000 | false | 45000 |
50 | 10000 | true | 30000 |
25 | 15000 | true | 20000 |
0 | 20000 | true | 15000 |
deferralStrategy
const deferralStrategy: AdaptationStrategy<DeferralConfig>Orders deferral presets so the default "not now" suggestion matches current capacity. Documented with its config and per-level values on the Deferral page.
autonomyStrategy
const autonomyStrategy: AdaptationStrategy<AutonomyConfig>How much latitude automation has to act for the user without asking.
The mirror of interactionForgivenessStrategy: forgiveness protects against the user's mistakes at low energy, autonomy against the agent's. The system acts on the user's behalf precisely when they are least able to supervise it, so the worst day is the wrong day for it to improvise.
What narrows as energy falls is discretion, not action. At rest the threshold is 1, admitting only certainty - rule-based decisions, never a judgment call - and one unattended step. Automation may still take a single, certain, template-only action, which is exactly the shape of an out-of-office reply; it may not chain steps or compose wording.
AutonomyConfig
Prop
Type
/>
Values per level
| Level | confidenceThreshold | allowGeneratedContent | maxUnattendedSteps |
|---|---|---|---|
100 | 0.6 | true | 8 |
75 | 0.7 | true | 5 |
50 | 0.8 | true | 3 |
25 | 0.9 | false | 1 |
0 | 1 | false | 1 |
const { confidenceThreshold, allowGeneratedContent, maxUnattendedSteps } =
engine.resolve(autonomyStrategy)
if (classification.confidence < confidenceThreshold) return askTheUser()Useful to any consumer with agentic surfaces, with or without demand admission.
Custom strategies
Any object satisfying AdaptationStrategy<TConfig> works with engine.resolve and useStrategy. For presence-shaped strategies, use createPresenceStrategy.
