Production-grade human commute orchestration

WakeShowerWalkSit

WSWS is a deterministic morning pipeline with first-class retry semantics, middleware injection, observability, and graceful degradation when external providers fail.

commutes orchestrated · 1.2Bsnoozes retried · 4.7Bshowers skipped · 0MIT License

Core pipeline

Sequential execution only. Parallel phase proposals rejected under RFC-0017.

Wake
Shower
Coffeemiddleware
Walk
Sit
WSWS Core Pipeline
Alarm retry loop through coffee middleware, weather-conditioned Walk strategies, and Sit terminal state — from the spec.
Rendering diagram…
Deterministic ordering

Wake always precedes Shower. State flows forward; phases never reset CommuteState.

Retry where it belongs

Wake: exponential / linear / chaotic backoff. Shower: single attempt. Walk: strategy fallback ending in remote-shim as degraded mode.

Observable commute

Energy, alertness, hydration (0–100), phase timestamps, and duration traces out of the box.

Middleware bus

Coffee post-Shower; weather pre-Walk. Custom middleware via createMiddleware pattern.

Walk strategies

Default → umbrella → rideshare → remote-shim (remote-shim is last-resort partial failure).

Durable state

keysWalletPhone gate before Walk. Wardrobe and timestamps persist across boundaries.

Phase state machine

Every WSWS phase shares the same lifecycle hooks: trigger, success, error, and retry policy exhaustion.

Rendering diagram…

Phase reference

Wake
Primary failure surface; ~70% retry rate in winter weekdays.
Trigger · Alarm signal
Success · Feet on floor, eyes open >3s
Retry · Exponential backoff, max 3
Shower
Includes non-skippable existentialStare sub-phase in production.
Trigger · Wake.completed
Success · Temperature normalized, hygiene SLO met
Retry · None — single attempt
Walk
keysWalletPhone gate enforced before entry.
Trigger · Shower.completed + coffee.injected
Success · Arrival at transit node or destination
Retry · Strategy fallback chain
Sit
Terminal phase; pipeline resolves here.
Trigger · Walk.completed
Success · Desk occupied, laptop open, Slack green
Retry · Linear scan — adjacent desks

Built-in middleware

MiddlewareInjection pointEffect
CoffeeMiddlewarePost-ShowerRaises alertness by 20–40 pts (shots configurable).
PodcastMiddlewareWalkOccupies audio channel; ~30% perceived duration reduction.
WeatherMiddlewarePre-WalkInjects weather context into Walk strategy selection.
MusicMiddlewareAny phaseBackground mood uplift; genre by time-of-day.
NewsMiddlewarePost-WakeCurrent events injection; may degrade mood — use cautiously.

Benchmarks

Measured across 10k commuters · 90 weekdays · excludes holidays and remote-shim invocations.

MetricP50P95P99Notes
Cold start (alarm → eyes open)12min27min45minIncludes snooze retries; Monday P99 higher.
Shower duration7min14min22minP99 driven by existentialStare.
Walk throughput18min32min51minRideshare fallback inflates tail.
Desk acquisition30s2min8minOpen offices degrade P99.
Total pipeline42min68min94minAlarm fire → Slack status green.

Reliability SLOs

SLOTargetActual
Commute success rate99.5%97.2%
On-time desk arrival95.0%89.1%
Shower phase completion99.9%99.7%
Zero-snooze wake rate30.0%12.4%

WSWSWS Pro

Evening · Walk → Sleep

Extends the core pipeline across the workday boundary with evening return phases and durable state into the next Wake cycle.

Full-duplex lifecycle
Morning pipeline, workday bridge, and evening pipeline with annotated energy and hydration notes.
Rendering diagram…
  • Full-duplex lifecycle across morning and evening pipelines
  • Energy budgeting with predictive modeling across six phases
  • Workday bridge — hydration and alertness telemetry through Sit → EveningWalk
  • Sleep seeds next-day Wake alarm configuration
  • Weekend overrides — extended Sleep; Wake retries disabled
  • Holiday mode — phases suspended; state frozen until next business day

Quickstart

From the npm package — individual phases or full pipeline.
npm run wake       # Wake phase only
npm run shower     # Shower phase only
npm run walk       # Walk phase only
npm run sit        # Sit phase only
npm run commute    # Full pipeline
npm run commute:pro # Pipeline + evening queue stub

AI environment integrations

Integration architecture
AI tooling surfaces call into the WSWS runtime; observability consumes phase and commute telemetry.
Rendering diagram…
Cursor

Skill + always-on rule for commute-aware development and phase-gated reviews.

Claude Code

CLAUDE.md provides invariants: ordering, Shower non-skippable, retry semantics.

Codex

Skill + agent stub for pipeline planning and configuration generation.

CommuteState carries energy, alertness, hydration, and keysWalletPhone through every transition. Durations use string literals ('7m', '30s') — never raw numbers.

DST handling is a known issue. See GitHub issue #47 in the upstream spec.