Skip to content

feat: AI-generated daily clockface (LLM picks a theme each morning) #6

Description

@Ryan4n6

Idea

Every morning at 6am, a small backend job asks an LLM for a clockface theme based on weather + day-of-week + a seed phrase, generates 64x64 pixel art assets, packages them as a Canvas-compatible JSON theme, and publishes via the auto-update channel (#2). Clock looks different every day.

Why it's interesting

  • The Canvas clockface (cw-cf-0x07) already renders a JSON-described theme fetched from a server — the on-device side is mostly free.
  • 64x64 pixel art is exactly the resolution where current image models produce charming results.
  • Pairs naturally with the manifest auto-update from feat: auto-update from a published manifest (R2-hosted, signed binaries) #2: each morning the manifest URL serves a new theme.

Architecture sketch

Off-device (cron / GitHub Action, runs daily):

  1. Pull weather for Ryan's location, current day-of-week, optionally a seed from a small bank of family phrases.
  2. Prompt an LLM to design a 64x64 pixel-art Canvas theme (palette + tile sprites + animation hints), constrained by the existing Canvas JSON schema.
  3. Either (a) LLM emits the JSON directly, or (b) LLM generates a 64x64 PNG and a converter rasterizes to Canvas tiles.
  4. Validate against the Canvas schema. Reject + retry on bad output.
  5. Upload to R2, update canvasFile URL in the device's NVS via the existing POST /set?key=canvasFile&value=... endpoint.

On-device: unchanged — Canvas already loads from canvasServer/canvasFile.

Constraints

  • Canvas schema is documented but not formal — need to read the spec before letting an LLM write it.
  • LLM costs: one Sonnet/Haiku call per day per device. Negligible.
  • Quality control: bad themes happen. Need a fallback to yesterday's theme on validation failure, and a one-touch "redo" button.
  • Aesthetic risk: variety is the feature, but a bad day's theme stares at you for 24h. Maybe vote/redo via the web UI.

Acceptance

  • Pipeline produces a valid Canvas JSON given a date + weather input.
  • Generated theme renders on-device without artifacts.
  • Failed generation falls back gracefully (previous day's theme stays).
  • Web UI exposes a "regenerate today's theme" button.
  • Daily cron runs unattended for a week.

Out of scope

  • Animated themes (start static; animation is a follow-up).
  • Per-clock personalization (everyone on the channel gets the same theme initially).
  • Accepting prompt input from the user (start fully automated).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions