The ultimate harness for coding agents and beyond. All your agents. All your machines. One command center. Start with code, then follow your curiosity and build across disciplines: CAD, circuits, robots, games and music.
Round Dial Swarm Tab Implementation Plan
For agentic workers: REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (
- [ ]) syntax for tracking.
Goal: On the round dial a Swarm is one more tab. Its projects are panes (their Leads) in the app's order. A Lead that needs you beeps and adds one inbox entry, even when it runs on another machine. You can talk to a Lead on this computer; a remote Lead is read-only.
Architecture:
- Daemon. The daemon already serves the Pro's Swarm frames (#1537) and Super Tab waits to any device whose hello names
swarmCard:"v1"/superTab:"wait-v1". It gains one field,leads[i].order. - Firmware model. The round firmware names both capabilities, parses the frames in
cable_client.c, and keeps the Swarms in a new pure module (supertab.c). - Firmware UI.
ui_habitat.cfeeds the module's Swarms into the existing Focus screens: the TABS carousel, the agent face, PANES, the inbox and voice.
Tech Stack: TypeScript (cli, vitest); C on ESP-IDF 5.5.4 for the ESP32-S3 round dial (devices/harness-device/firmware, host tests with cc and python fixtures).
Spec: docs/superpowers/specs/2026-10-23-round-swarm-tab-design.md
Global Constraints
- Decisions are fixed (spec "Decisions"):
- a Swarm tab is drawn like any tab;
- Swarms the desktop has not opened come after the desk tabs;
- projects keep
order; - remote Leads beep and add a read-only entry; there is no remote reply;
- Leads only;
- no Home and no Pro card.
- Wire:
- only
orderis new; - no new frame and no
CABLE_PROTO_VERSIONbump; - the Pro firmware ignores
orderand is not changed.
- only
- Limits:
- 16 Swarms, 12 Leads each;
- names ≤48 bytes;
- recap ≤1,500 bytes, one slot only (the Lead on the face);
- every frame under the 512-token guard (
cable_json_guard.h); - the model lives in PSRAM (
EXT_RAM_BSS_ATTR).
- On-device copy (English, already approved): "Needs you. Answer on the desktop.", "Stuck. See the desktop.", and the existing "No panes in this tab.", "Choose a tab", "Working...", "No notification". No string names a Lead or a Product Manager.
- Every Focus page stays Inter-only, with ink inside r 230 (the
test_touch_ui.pyscans). - Isolation: no file under
devices/harness-pro/firmwareexcept.mdmay mentionharness-device. - Repo rules:
- work in a worktree off current
main; - commit, push and open a PR only when the owner says so;
- dev firmware builds use
-DPROJECT_VER=0.0.99, or the daemon's OTA replaces them; - match the surrounding style and comment density.
- work in a worktree off current
Review Focus
- A Super Tab wait must never open the round dial's question/answer screen (it cannot load one) — Task 6 tests.
notif.replacefrom the desktop must not drop the dial's own Swarm entries — Task 6 tests.- One beep for a Lead whose wait and state change arrive in either order — Task 6 tests.
- A Lead id must never reach
focus,agent.openorvoice.begin; onlylocalreaches voice — Tasks 5, 7 tests. - Entering a Swarm must not start the desk-tab workspace handshake (it would fail "That workspace is gone") — Task 4 tests.
- The model is reset on link loss and rebuilt on attach without stale entries — Tasks 3, 6 tests.
Task 1: Daemon — order on every Lead
Files:
- Modify:
cli/src/superTabs/cards.ts(SwarmLead,leadsOfand its leading comment),cli/src/cable/cableSession.ts(pushSwarmCardsframe),devices/harness-pro/docs/cable.md(supertabframe: optionalorder) - Test:
cli/src/superTabs/cards.spec.ts,cli/src/cable/cableSession.spec.ts,devices/harness-pro/firmware/test/test_pro_cable.c
Interfaces:
Produces:
SwarmLead.order: number(0-based index instate.projects; the old-tableadproject is 0). On the wire:"order":Non eachsupertab.leads[i].Step 1: Write failing tests.
cards.spec.ts:- three projects with states done/ask/work come out ordered ask, work, done and carry
order1, 2, 0; - 13 projects keep the 12 most urgent, with their original
order(gaps allowed); - an old tab without
projectsgivesorder: 0.
- three projects with states done/ask/work come out ordered ask, work, done and carry
cableSession.spec.ts:- a
supertabframe carriesorderper Lead; - a round hello (
boardnotpro) namingswarmCard:"v1"andsuperTab:"wait-v1"getssupertabs/supertabwith noseq, and a Super TabquestionwithsuperTab/attention; - a 16 × 12 list with
orderkeeps eachsupertabunder 512 JSON tokens.
- a
test_pro_cable.c: asupertabwhose Leads carryorderparses to the same model as one without.
Step 2: Run
cd cli && npx vitest run src/superTabs/cards.spec.ts src/cable/cableSession.spec.ts. Expected: FAIL (noorder). The Pro case passes already, which is the point: runcd devices/harness-pro/firmware && bash test/run.sh.Step 3: Implement. In
leadsOf, record the project index when buildingleads. InpushSwarmCards, copyorder: l.orderonto each Lead. Fix the comment "in project order then by urgency" to say what the code does. Documentorderincable.md.Step 4: Run the two specs,
npx vitest run src/superTabs src/cable, andnpm run typecheck. Expected: PASS. (test:coreis not needed: no file undersrc/coreorsrc/serviceschanges.)Step 5: Commit (when authorized)
feat(super-tabs): send each Lead's project order.
Task 2: Round firmware — the supertab model
Files:
- Create:
devices/harness-device/firmware/main/ui/habitat/supertab.h,devices/harness-device/firmware/main/ui/habitat/supertab.c,devices/harness-device/firmware/test/test_supertab.c - Modify:
devices/harness-device/firmware/main/CMakeLists.txt(source list, besideui/habitat/workspace.c),devices/harness-device/firmware/test/run.sh(build and runtest_supertab)
Interfaces:
- Produces:
enum { HT_SUPERTABS_MAX = 16, HT_SUPERTAB_LEADS_MAX = 12, HT_SUPERTAB_NAME = 49, HT_SUPERTAB_TEXT = 1501 }; typedef enum { HT_LEAD_DONE, HT_LEAD_WORK, HT_LEAD_ASK, HT_LEAD_STUCK } ht_lead_state_t; typedef struct { char id[ID_MAX], project_id[ID_MAX], project[HT_SUPERTAB_NAME], engine[12], owner[HT_SUPERTAB_NAME], local[ID_MAX]; ht_lead_state_t state, was; int order; uint32_t since_s, since_at_ms; } ht_lead_t; typedef struct { char id[ID_MAX], tab[ID_MAX], name[HT_SUPERTAB_NAME]; uint16_t count; uint8_t lead_n; ht_lead_t leads[HT_SUPERTAB_LEADS_MAX]; } ht_supertab_t; typedef enum { HT_RECAP_NONE, HT_RECAP_LOADING, HT_RECAP_LOADED, HT_RECAP_EMPTY } ht_recap_state_t; typedef struct { ht_supertab_t tabs[HT_SUPERTABS_MAX]; int n; char ids[HT_SUPERTABS_MAX][ID_MAX]; int id_n; struct { char tab[ID_MAX], lead[ID_MAX], text[HT_SUPERTAB_TEXT]; uint32_t at, asked_ms; ht_recap_state_t state; } recap; } ht_supertabs_t; typedef enum { HT_LEAD_RAISED_ASK, HT_LEAD_RAISED_STUCK, HT_LEAD_CLEARED } ht_lead_event_kind_t; typedef struct { ht_lead_event_kind_t kind; char tab[ID_MAX], lead[ID_MAX]; } ht_lead_event_t; void ht_supertabs_reset(ht_supertabs_t *); void ht_supertabs_ids(ht_supertabs_t *, const char ids[][ID_MAX], int n); // drops records gone from the list int ht_supertabs_put(ht_supertabs_t *, const ht_supertab_t *in, uint32_t now_ms, // sorts leads by order (stable; frame order without it), ht_lead_event_t *ev, int ev_max); // returns the transition events const ht_supertab_t *ht_supertabs_find(const ht_supertabs_t *, const char *id); const ht_supertab_t *ht_supertabs_for_desk(const ht_supertabs_t *, const char *desk_tab_id); const ht_lead_t *ht_supertabs_lead_by_local(const ht_supertabs_t *, const char *harness_id, const ht_supertab_t **tab); void ht_supertabs_recap_open(ht_supertabs_t *, const char *tab, const char *lead, uint32_t now_ms); // LOADING, clears text bool ht_supertabs_recap_put(ht_supertabs_t *, const char *tab, const char *lead, const char *text, uint32_t at, bool none); // false: not the open Lead - Step 1: Write failing tests in
test_supertab.c:- Leads sorted by
orderwith ties stable, and kept in frame order whenorderis absent (-1). - 13 Leads in → 12 kept; a name over 48 bytes is cut on a UTF-8 boundary; an id of
ID_MAXbytes or more is rejected. - Unknown state → DONE; a
putfor an id not in the lastidsis dropped;idswithout a Swarm drops its record. - Transitions:
- DONE→ASK raises ASK once; ASK→ASK raises nothing; ASK→STUCK raises STUCK; STUCK→WORK clears;
- a Lead first seen in ASK raises ASK;
- a Lead gone from the frame clears.
for_deskmatchestab;lead_by_localmatcheslocaland never an emptylocal.- Recap:
putfor another Lead returns false and stores nothing; a 1,600-byte text is cut to 1,500 on a UTF-8 boundary;nonesets EMPTY;resetclears everything.
- Leads sorted by
- Step 2: Run
cd devices/harness-device/firmware && bash test/run.sh. Expected: FAIL (no module). - Step 3: Implement
supertab.cwith no LVGL and no cJSON (the caller passes parsed structs), in the style ofworkspace.c. - Step 4: Run
bash test/run.sh. Expected: PASS. - Step 5: Commit
feat(dial): a model of the Swarms and their Leads.
Task 3: Round firmware — hello, parsing and the three requests
Files:
- Modify:
devices/harness-device/firmware/main/cable_client.c(send_hello; thetdispatch nearswarms/question/question.close; newhandle_supertabs,handle_supertab,handle_supertab_recap,handle_supertab_focus; link-down reset),devices/harness-device/firmware/main/cable_client.h(cable_client_supertab_send),devices/harness-device/firmware/main/ui/ui_screens.h(UI entry points below) - Test:
devices/harness-device/firmware/test/test_cable_identity.py(production handlers with real cJSON; needsIDF_PATH)
Interfaces:
- Consumes: Task 2.
- Produces:
void cable_client_supertab_send(const char *t, const char *tab, const char *lead); // "supertab.recap.get" | "supertab.open" | "supertab.select"; lead "" only for open void ui_supertabs_ids(const char ids[][ID_MAX], int n); void ui_supertab(const ht_supertab_t *in); void ui_supertab_recap(const char *tab, const char *lead, const char *text, uint32_t at, bool none); void ui_supertab_focus(const char *tab, const char *lead); void ui_supertab_wait(const char *agent_id, const char *request, const char *swarm_name, bool stuck, const char *text); void ui_supertab_wait_close(const char *agent_id, const char *request); - Step 1: Write failing tests:
hellocarries"swarmCard":"v1"and"superTab":"wait-v1".supertabsandsupertabparse every field, includingorderand an absentsince. A malformed Lead is skipped, not the frame.- A
questioncarryingsuperTabcallsui_supertab_wait, neverui_question_show, and neveraudio_notify_donedirectly; a plainquestionis unchanged. - A
question.closewhose id starts withsupertab:callsui_supertab_wait_close. supertab.recapwithnone:truepassesnone.- Each request builds the exact JSON.
supertab.openwith an empty lead is allowed; the others refuse an empty or overlong id.
- Step 2: Run
IDF_PATH=~/esp/esp-idf-5.5.4 bash test/run.sh. Expected: the new cases FAIL. - Step 3: Implement in
cable_client.c, the only file that builds or reads at. Parse into a stackht_supertab_tand hand it to the UI under its lock. On link loss, clear the Swarm model through the UI. Note the frames incable_client.h's comment block (the round dial has no separate cable document on main; the header namesdocs/specs/cable-protocol.md, which does not exist in this repository). - Step 4: Run the same command. Expected: PASS.
- Step 5: Commit
feat(dial): hear the Swarms, their Leads and Super Tab waits.
Task 4: Round firmware — Swarms in TABS (1a–1d)
Files:
- Modify:
devices/harness-device/firmware/main/ui/habitat/ui_habitat.c(ui_swarms_replace,tab_label,render_focus_tabs,tabs_open,A_TAB/A_TAB_DONEindispatch,workspace_indexcallers; statesgains the model andswarm_modewith the current Swarm id) - Test:
devices/harness-device/firmware/test/test_touch_ui.py
Interfaces:
Consumes:
ht_supertabs_for_desk,ht_supertabs_find,cable_client_supertab_send(Tasks 2–3).Produces: one tab list made of desk tabs (≤24) followed by Swarms with an empty
tab(≤16). Entering a Swarm sets the dial's Swarm mode with no workspace handshake.Step 1: Write failing tests:
- A desk tab linked to a Swarm keeps its place and name; it is listed even with
agents0. - Two unopened Swarms follow the desk tabs in
supertabsorder. - Every tab run uses the same font and ink as an ordinary tab (decision 1: compare against a desk tab run).
- Tap or ✓ on a Swarm enters it with no
swarm.selectsent and no "Switching tab" view, sendingsupertab.selectthensupertab.openfor the first Lead byorder, or for the Leadsupertab.focusnamed. - An ordinary desk tab still sends
swarm.select. - Hold on a Swarm face opens TABS on that Swarm.
- Portraits
swarm-tabs-1a…swarm-tabs-1d.
- A desk tab linked to a Swarm keeps its place and name; it is listed even with
Step 2: Run
python3 test/test_touch_ui.py. Expected: FAIL.Step 3: Implement. Keep
s.tabsfor desk tabs. Build the carousel's index space as desk tabs followed by unopened Swarms.tab_labelreturns the Swarm's name for the second part.Step 4: Run
bash test/run.sh. Expected: PASS. Render withHABITAT_PREVIEW_DIR=/tmp/round-swarm python3 test/test_touch_ui.pyand compare 1a–1d with the mockup.Step 5: Commit
feat(dial): Swarms in the tab list.
Task 5: Round firmware — Swarm panes, PANES and following (2a–2h, 3a–3c)
Files:
- Modify:
devices/harness-device/firmware/main/ui/habitat/ui_habitat.c(render_homeface building for a Swarm pane;render_focus_panes/pane_label;habitat_touchhorizontal swipe;A_AGENT/A_AGENTS;ui_boot_pressed; the recap retry on the existing timer tick) - Test:
devices/harness-device/firmware/test/test_touch_ui.py
Interfaces:
Consumes: Tasks 2–4;
ht_focus_facewithht_character_face_tfieldsname,engine,elapsed,mood,askingand the recap text.Produces: a Swarm pane index in place of
s.activewhile in Swarm mode. No Lead id ever reachescable_client_send_focus/cable_client_send_open.Step 1: Write failing tests. Each face case below follows the spec §4 table:
- Faces:
- work local with
since134 → elapsed text "2:14" on the lower arc (2a); - done with a recap → the card at ≤4 lines with a final "…" for a 1,500-byte text (2b, 2g);
- ask local with an open wait → the wait text in the card and the asking pose (2c);
- stuck → "Stuck: …" and no red ink (2d);
- work remote → "Working..." and no time (2e);
- ask remote → the recap card (2e′);
- recap none → the resting face (2f);
- no Leads → "No panes in this tab." and "Choose a tab" → TABS (2h).
- work local with
- Swipe and recap:
- a horizontal swipe moves by
orderwith wrap, and sendssupertab.select,supertab.open,supertab.recap.get(nofocus); - a
supertab.recapfor another Lead is ignored; - with no answer in 5 s, one more
recap.getgoes out.
- a horizontal swipe moves by
- PANES: one page per Lead in
order; a long name splits over two lines with "…"; 12 pages; ✓ picks (3a–3c). - Follow:
supertab.focusmoves the face, except during voice;- a new
supertabwithout the shown Lead moves to the same position; - the Swarm leaving
supertabs→ TABS.
- Leaving and side button:
- leaving the Swarm sends
supertab.openwithlead:""; - the side button on a busy local Lead opens STOP for
local; on a remote Lead it goes HOME.
- leaving the Swarm sends
- Portraits:
swarm-2a…swarm-2h,swarm-3a…swarm-3c.
- Faces:
Step 2: Run
python3 test/test_touch_ui.py. Expected: FAIL.Step 3: Implement. Build an
ht_character_face_tfrom the Lead (no new drawing code), with elapsed =since_s+ (now −since_at_ms)/1000 andaskingfor ask/stuck. The card text priority is wait text > recap > none.Step 4: Run
bash test/run.sh. Expected: PASS. Render the portraits and compare with mockup 2a–3c.Step 5: Commit
feat(dial): a Swarm's projects as panes.
Task 6: Round firmware — beep and inbox (4a–4f, 2e′)
Files:
- Modify:
devices/harness-device/firmware/main/ui/habitat/ui_habitat.c(ui_supertab/ui_supertab_wait/ui_supertab_wait_close→notice_add/notice_remove;ui_notif_replacere-merging dial-owned entries;render_focus_inbox/render_noticegrey line from the Swarm name;A_NOTICEfor a Swarm entry),devices/harness-device/firmware/main/cable_client.c(audio_notify_donewhen the UI reports a raised entry not on the face, as thequestionhandler does today) - Test:
devices/harness-device/firmware/test/test_touch_ui.py,devices/harness-device/firmware/test/test_question_ui.py,devices/harness-device/firmware/test/test_cable_identity.py
Interfaces:
Consumes: the
ht_lead_event_ttransitions (Task 2) and the wait entry points (Task 3).Produces: one question-type notice per Lead, keyed by the Lead's agent id, with an owner flag of "dial" so
ui_notif_replacekeeps it.Step 1: Write failing tests:
- Raise and clear:
- a remote Lead going done→ask adds "Needs you. Answer on the desktop." with the Swarm's name on the grey line and the project in green, and beeps once (4e);
- stuck adds "Stuck. See the desktop.";
- back to work removes it.
- Local waits:
- a local Lead's wait replaces the text with
questions[0].q(4c, 4d); - the wait and the state change, in either order, give one entry and one beep;
question.closerestores the fixed text while still ask;- a Super Tab wait never opens QUESTION/CHOICE/ANSWER_REVIEW (
test_question_ui.py); - a wait from an agent that is no Lead's
localadds nothing.
- a local Lead's wait replaces the text with
- Inbox behaviour:
- a
notif.replacewith desktop rows keeps every Swarm entry; - an entry for the Lead on the face is read at once, with no beep;
- the bell pill shows the count at y 400, or the pet's bubble while working (4a, 4b);
- tapping a Swarm entry enters that Swarm at that Lead;
- link loss clears the Swarm entries;
- an empty inbox shows "No notification" (4f).
- a
- Portraits:
swarm-4a…swarm-4f,swarm-2e-ask.
- Raise and clear:
Step 2: Run
python3 test/test_touch_ui.py && python3 test/test_question_ui.py, thenIDF_PATH=~/esp/esp-idf-5.5.4 python3 test/test_cable_identity.py. Expected: FAIL.Step 3: Implement. Reuse
notice_add,notice_remove,notice_read_nowandon_face. Mark Swarm notices soui_notif_replacere-adds them after rebuilding from the snapshot.Step 4: Run
bash test/run.sh(withIDF_PATH). Expected: PASS.Step 5: Commit
feat(dial): a Lead that needs you beeps and waits in the inbox.
Task 7: Round firmware — talk to a local Lead (5a–5e)
Files:
- Modify:
devices/harness-device/firmware/main/ui/habitat/ui_habitat.c(the face tap →A_VOICEtarget ands.voice_enginewhile in Swarm mode) - Test:
devices/harness-device/firmware/test/test_voice_ui.py,devices/harness-device/firmware/test/test_touch_ui.py
Interfaces:
Consumes:
ht_lead_t.localandengine.Step 1: Write failing tests:
- a tap on a local Lead's face starts voice with
agent_id=local(never the Lead id), shows listening and sending, then returns to the Swarm face (5a–5d); - an engine with no listening scene shows the seven bars (5e);
- a tap on a remote Lead's face starts nothing.
- Portraits
swarm-5a…swarm-5e.
- a tap on a local Lead's face starts voice with
Step 2: Run
python3 test/test_voice_ui.py && python3 test/test_touch_ui.py. Expected: FAIL.Step 3: Implement.
Step 4: Run
bash test/run.sh. Expected: PASS.Step 5: Commit
feat(dial): talk to a Swarm's Lead on this computer.
Task 8: Build, renders against the mockup, real device
- Step 1:
cd devices/harness-device/firmware && . ~/esp/esp-idf-5.5.4/export.sh && idf.py -B build -DPROJECT_VER=0.0.99 build. Expected: the image fits its OTA slot. Record the size againstmain(PSRAM model ≈ 54 KB; no internal-RAM growth expected; checkram_telemetryin the alive log). - Step 2: Render every portrait with
HABITAT_PREVIEW_DIR. Check by script that no pixel brighter than 16 lies outside r 233 (the mockup's check). Compare all 27 screens side by side with the mockup, and list each difference in the PR. - Step 3: Independent code review of the whole branch by a fresh reviewer; fix the findings, each with a test.
- Step 4 (owner's go-ahead):
make install-clifrom the branch;- flash the 0.0.99 build on one round dial (
idf.py -p PORT flash, README "Build and flash your board"; quit the monitor before the app reconnects); - with the "openharness" Swarm, check TABS, an unopened Swarm, swipes, PANES, a remote Lead's beep and entry, a local Lead's wait, talk, follow-the-desktop, and the side button.
- Step 5 (owner's go-ahead): commit, push, open the PR listing every check below and the device check.
Validation (docs/validation-and-release.md)
- PR CI (automatic):
cli-typecheck+cli-testsforcli/;firmware-checksfordevices/(everytest_*.pyplusrun.shon Linux with clang-18 and the SDK's cJSON);pro-firmware-build+pro-goldenbecause Task 1 touchesdevices/harness-pro/(a test and a doc only; the golden diff must be empty). - Local, recorded in the PR:
npx vitest run src/superTabs src/cableandnpm run typecheck;bash test/run.shwithIDF_PATHset (the cJSON tests run only then);- the IDF build;
- the Pro's
bash test/run.sh. - Not needed:
test:core(nosrc/core/src/serviceschange), CLI e2e (no CLI user flow changes), the OS workflows.
- Not covered by any automatic check: the 27 renders against the mockup (by eye) and the real device. Say so in the PR.
Rollout
- CLI first. The CLI release carries
order. The firmware works with a CLI from #1537 on, but the panes come in urgency order until this one lands. An older dial is unaffected: it names neither capability. - Firmware next:
make upload-circle(devices/harness-device/firmware/RELEASE.md). Daemons offer it over the cable from the published manifest (cli/src/cable/fwPush.ts, keycommander). Choose the version above the published one:version.txton main reads 0.0.86, but 0.0.92 was reported published on 2026-10-20, so read the manifest first. - Pro: nothing to release. Its firmware ignores
order. - Rollback: republish the previous round image. The daemon change is additive.
Open risks
- The
orderfield's value. The Pro already sorts Leads on the device (ph_overview.clead_order), so sending Leads in project order would have served both dials without a new field. The owner choseorder, so this plan uses it. - Worker waits. A Super Tab wait from a worker on this machine adds no entry of its own; it surfaces through its project's Lead (spec §5). This interpretation needs the owner's confirmation.
- Recap loading. The face shows no card while a recap loads; the mockup has no screen for that moment.
- State lag. Lead states come from the daemon's 5 s backend poll, so a beep can trail the desktop by up to about 5 s plus the 300 ms debounce.
- Unverified items in the spec's "Unverified" section:
- voice to a harness outside the dial's roster;
dial_super_tabfor a Swarm never opened on the desktop;- a Swarm desk tab reporting 0 agents.