Clearsky

Design: how Clearsky works

Written 2026-10-29. This covers the shape of the system. The README covers setup and use.

Goal#

Clearsky is one local page that shows what needs your attention at work, and next to it a few personal things:

It runs on the laptop, uses the logins already there, has no dependencies beyond Node 22, and sends nothing anywhere except to the services it reads.

Browser, local server, sources, and Copilot, all on the laptop

Parts#

PartWhereWhat it does
Serverbin/clearsky.mjsHTTP on 127.0.0.1, caches sources, plans Now / Next, polls for notifications, talks to Copilot
Moduleslib/modules/*.mjsGitHub, Jira (through acli) and Calendar: each fetches its service, turns it into work items, and declares what it holds and reaches
Item modellib/items.mjsthe one kind of row every list draws, with the next step on each item
Pageweb/index.html, web/css/app.css, web/js/*.jsA menu and one work area: the Work list, an item in full, Copilot chats, Calendar, Stand-up and a page per extra source; the server puts the CSS and scripts inline, so there's no build step
Settingsweb/settings.html, lib/settings.mjswrites ~/.config/clearsky/.env (mode 600); never sends saved secrets back
Sourcesbuilt in, plus lib/sources/*.mjs and ~/.config/clearsky/sources/*.mjseach one fetches one service; see the contract in lib/sources.mjs
Statelib/state.mjs → ~/.config/clearsky/state.jsondone, muted and dismissed items, what was already notified, session links
Copilotlib/acp.mjs, lib/copilot.mjsthe Copilot CLI over ACP (JSON-RPC on stdio), in every access mode
Calendarlib/eds.mjs, lib/ics.mjsGNOME's Evolution cache (SQLite) or an iCal link, parsed locally
Notificationslib/notify.mjswhat's new since last time; desktop banners over D-Bus (gdbus), or the browser's

Sources#

GitHub (through gh), Jira (through acli, never direct REST tokens) and the calendar are built in. Everything else, Slack and Grafana included, is a plugin (plugins/, plugins.md) or a source module with name, label, area (work or personal), settings, fetch(ctx) and optional hooks:

The source's area decides its tab. Only the calendar mixes work and personal.

Files in ~/.config/clearsky/sources load only if you own them and nobody else can write to them. A source that throws only breaks its own panel.

Now / Next and the day#

planNow() turns the calendar plus the work items into:

Events on a shared calendar (like Family) only take your time when you organised them, were invited, or your name is in the title. Calendars you hide neither show nor take time. Today's schedule draws the same data as a timeline.

Copilot#

The panel drives the Copilot CLI on the laptop in ACP mode, so sessions are Copilot's own:

A first message carries a short dashboard summary plus any attached PRs or tickets, after a marker, so titles and links use only what you typed.

Sessions link to PRs and tickets in three ways:

A chat about a PR runs in your local clone of that repo.

Every access mode runs over ACP, so anything Copilot wants your OK for (each step in Ask, the sandbox's doors out in Sandboxed) shows as Allow/Deny. Copilot gets none of Clearsky's tokens, and skills never merge, approve, force-push or comment without asking.

Security#

Remote access describes what would change to reach it from a phone.

Deliberate limits#

This page is docs/architecture.md in the repo.