Feature Waves
Wave 6 — Modes
A two-axis context model — activity-state x hat — resolved at the edge, changing Mallory's context, never his character.
Situation
Mallory had no notion of what Alex is doing right now, so he reliably got things wrong: surfacing work Slack mentions in the evening, dumping walls of text while he's commuting, framing everything around the wrong project/calendar, or staying in work-briefing register at weekends.
The first of three Wave 6 sub-tracks (Modes → Device signals → Live lookups). The guiding principle: modes change his context, not his character — he stays himself and simply knows what Alex is doing, the way a good aide who knows you're in the car still talks like themselves.
Key decisions
Two axes, deliberately small
Activity-state (Commuting / Working / Off) x Hat (Maths Circle / MK Community Energy / Personal) — a 3x3 space; meetings and weekends are not separate states, just routine defaults.
Resolver priority
resolveMode() is a pure function: manual override (unexpired) → mode hint (fresh, Hub-pushed) → routine default (config constant) — the later device-signals track slots in as another hint with no rework.
Override auto-expiry
A manual override expires at the next routine boundary so Alex never gets stuck in a stale mode overnight.
Category-gate matrix (Effect A)
Mode maps each nudge category to interrupt/batch/defer; high priority always breaks through, low never interrupts — mode only governs the normal tier.
Context line, not persona rewrite (Effect B)
Mode injects one context line into the context block ("Alex is commuting… wearing his MK hat"); Commuting adds only a soft voice-first lean, not a hard rule.
Hat-bias in recall is soft (Effect D)
The current hat weights Wave 5's recall ranking but is never a hard filter — he still crosses hats when asked.
Architecture
A new KV namespace outside KNOWN_SIGNALS holding override/hint state, resolved by a pure core that every consumer (nudges, context, recall, briefing) reads from.
hat on each nudge so the edge trusts the tag rather than re-deriving it.Risks & guardrails
Stuck-in-mode after manual override
Mitigated by auto-expiry at the next routine boundary — overrides never persist past their natural window.
Deferred nudges never resurface
v1 has no timed re-delivery for defer — a deferred work nudge simply waits in Updates and folds into the next morning briefing; explicitly out of scope for v1.
MK Community Energy hat is dormant
Config is present but lights up with no code change only once its Google account/calendar are connected — not yet live.
Meeting-volume reshuffle re-homed
The valuable EOD reflection ("heavy meeting day, X/Y/Z slipped") is deferred as a write-action fast-follow; v1 only leaves a clean EOD hook.
Delivery
Phase 1 — Mode core & stores
Pure mode core (src/lib/mode.ts); hat path-classifier (src/lib/hats.ts); mode KV store (src/mode.ts); mode routes (src/routes/mode.ts).
Phase 2 — Effect A: mode-gated nudges
Add hat to the nudge payload/row/migration; apply the mode gate in handleNudge.
Phase 3 — Effect B: per-turn context line
Inject modeContextLine into the chat context.
Phase 4 — Effect D: recall hat-bias
Soft hat-weight in ranking.
Phase 5 — Effect E1: web UI
loadMode/setMode API client; StatusSheet mode section + wiring.
Phase 6 — Verification
Full test sweep + browser verify.
Out of scope
docs/superpowers/specs/2026-06-15-wave-6-modes-design.mdplan ·
docs/superpowers/plans/2026-06-15-wave-6-modes.md