AGENTS.md

pebblexus

Pebble app for Plexus quotas.

Commands

mise run build # build the PBW
mise run check # same as build; no emulator, tests, lint, or formatter
mise run install # install on the Emery emulator
mise run screenshot # writes screenshot_emery.png
mise run logs # stream Emery emulator logs

Use mise run emu:up, emu:select, emu:down, and emu:back for button input.

Landmines

  • mise.toml and package.json both target emery; keep target/platform changes in sync.
  • Adding or renaming AppMessage keys requires updating package.json pebble.messageKeys, the C MESSAGE_KEY_* usage, and PebbleKit JS payload keys together.
  • The Plexus admin key belongs in phone-side PebbleKit JS storage only; never send it to the watch.
  • mise run build leaves build/ and .lock-waf_*_build; they are ignored build artifacts.
  • PebbleKit JS here is written in ES5 style for Pebble compatibility: use var and functions, not modern syntax.
  • The watch row layout heights in src/c/main.c (card_update_proc: 42/28/50px rows, 3px separators) and the phone-side page packing in src/pkjs/index.js (estimateRowHeightPx, PAGE_HEIGHT_BUDGET_*) mirror each other; change them together.