Skip to content

[EPIC] T27 OS: the 27-petal menu from one t27 spec, trios to FPGA #10782

Open

Description

@gHashTag

Goal

T27 OS is a minimum viable operating surface written in t27. Its home screen is the 27-petal
999 triangle menu. Pressing a petal opens that petal's menu, a grid of cards for existing widgets.
The same spec drives the trios macOS app today and an FPGA board (AX7203) at the end.

Why it matters

  • The triangle is drawn today by Swift in trinity/apps/queen (TriangleLogo.swift), which was ported from Zig (photon_trinity_canvas.zig).
  • The rule behind it lives in three hand-kept tables that disagree:
    • Screen.screenForBlock lists 28 screens for 27 petals (its DUKH row has 10), so settings can never be reached.
    • Its screen names do not match the tooltip names in TriangleLogo.worlds.
  • One spec means one home for that rule, and the only home that can lower to hardware.

Source of truth

Sub-tasks (checkboxes)

  • M1. Spec: petal geometry, hit test, fills, open/back state, empty card grid (test-report 10/10 + frontend 8/8)
  • M2. The trios/QueenUILib host draws from the spec (generated code), and the 28-vs-27 table is deleted
  • M3. Cards: each petal's menu lists real widget cards by widgets_gallery id
  • M4. Make petal_menu.t27 icarus-lowerable (today: not_lowerable, string and colour tables)
  • M5. A framebuffer spec (HDMI/VGA scan-out) and a rasteriser for the 27 quads, in t27
  • M6. gen-verilog for the hit test, fills and state on the AX7203, read back on the die
  • M7. Input on the board (buttons, UART or touch) wired to on_tap / on_back
  • M8. TRI CLAW gates on gHashTag/t27os (via the App or the pinned claw-v* workflow, TRI CLAW: all CI gates in one GitHub App (TRI-27 / Trinity S3AI), spec-first, sellable #9271)
  • M9. Native macOS window from the spec: sidebar QUEEN / SPACES / AGENTS, DOCTOR panel, footer "OPEN SOURCE T27" (PR feat(t27f): T27 OS home -- the 27-petal triangle menu as one spec #10783, stacked feat(t27f): petal_menu.t27 is Icarus-lowerable and simulates 10/10 (M4 of #10782) #10786)
  • M10. herdr-style PTY server with crash restore; a live Claude Code pane that survives kill -9 of the server (PR feat(t27os): PTY server that owns the agent terminals and restores them (Refs #10782) #10934; live resize pending, t27#10902)
  • M11. Responsive window and terminal: real pane size at spawn and on resize (debounced, no ring replay), idle redraw skip, min window size, backing scale factor, row glyph cache, sidebar truncation. Audit 2026-10-19: P0 items are the 24x80 hard-code in pty_server.t27, the per-frame grid wipe on resize and the 30 fps idle redraw; t27b gaps: variadic calls (t27b: lower @extern calls to libSystem (blocks the T27 OS PTY server) #10902), callbacks, ObjC class creation
  • M12. KEYS tab and one key manager in .t27: macOS Keychain storage, masked display, status and rotation, key injection into agent panes (strip CLAUDE_CODE_* at spawn); editors table with "open in editor"; a live check of all 9 agent CLIs. Reuses key_store.t27, queen-contributor-keys.t27, specs/provider/* and the trios SR-00 key model
  • M12b. Provider router so a pane never hits "organization has disabled Claude subscription access" (owner screenshot 2026-10-19). Stage 1: per-pane profile (Anthropic API key, or z.ai ANTHROPIC_BASE_URL + glm-4.7-flash), subscription variables stripped, live pre-flight probe. Stage 2: a local Anthropic-compatible router in .t27 (Free Claude Code style) that walks the existing chain in specs/automation/agent-provider-chain.t27 using specs/provider/transform.t27, with failover on 429/529/402; blocked on t27b socket primitives if missing (file a t27c issue, no foreign code)
  • M13. T27 OS on the FPGA, stage 1: UART VT100 shell on the AX7203 whose screen is produced by the pure-logic specs (vt, pane_state, spaces list, agent table) lowered to the WASM board cell or Verilog; feasibility note first
  • M14. T27 OS on the FPGA, stage 2: VGA text-mode scan-out (timing, font ROM, black-and-white palette) in .t27, simulation-checked first; the owner has a VGA monitor ready; connector or adapter and pin map are not established yet (never guess pins)

Done when (acceptance)

  • A tap on any of the 27 petals on the AX7203 opens that petal's card menu.
  • Back returns to the triangle.
  • trios renders the same spec with no hand-kept petal table left.

How to verify

  • test-report on specs/t27f/petal_menu.t27 and specs/t27f/frontend.t27
  • icarus-lowerable on petal_menu.t27, then silicon for M6

Risks / blockers

Status update — 2026-10-19 (end of day, handed to the Queen)

Landed or green:

Activity

  1. gHashTag commented on Oct 19, 2026

    @gHashTag
    OwnerAuthor

    Repository created: https://github.com/gHashTag/t27os (home spec specs/os/home.t27, test-report 2/2). M1 spec PR: #10783. TRI CLAW management is pending the App (v0.2, #9271); no hand-written workflow YAML was added.

  2. gHashTag commented on Oct 19, 2026

    @gHashTag
    OwnerAuthor

    Status: glassmorphism and animation are ported (PR #10783, commit 822f488).

    specs/t27f/petal_glass.t27 (module T27fPetalGlass) draws the home as the trios app does, every pixel from the spec:

    • glass: blackGlass tint 0.30, darkWash 0.42 diagonal gradient, three ambient blooms at 0.055, 0.5 px white 0.14 border (exact trios values; the desktop colour behind the window is suggested);
    • petals: geometry, fills, outline, hit test and open/back state are used from petal_menu.t27, not copied;
    • animation: LogoAnimation from photon_trinity_canvas.zig ported exactly (800-unit fly-in, phase 1 at 4.5/s, spring k 28 damping 0.86);
    • menu: g_wave_transition fade (10 frames) of a blackGlass panel holding the 3x3 empty card slots.

    Lab: 6/6 tests, 11498 runtime asserts (the anti-aliased edge distance agrees with petal_menu's ray-cast hit test). t27c gen + zig render 270 frames of 960x540 piped to ffmpeg in 29 s: a 9 s clip of assembly, hover sweep, tap on petal 13, menu in, back, menu out.

    Next: M2 (the trios host draws the generated code), M4 (icarus-lowerable petal_menu, in progress).

  3. 120 remaining items

  4. gHashTag commented on Oct 19, 2026

    @gHashTag
    OwnerAuthor

    T27 OS agent check on the Mac, part C: work saved here

    Session: part C of the T27 OS keys task (the real agent check). Parts A, B and the editors stayed with keys-2 (PR #10959).

    What was done

    • Agent check of the 9 agents in specs/t27os/agents.t27 on the Mac, through the PTY server. The result table and the five findings are in the side-session notes (agent-check-2026-10-19.md) and in the PR body.
    • PR fix(t27os): CTL verbs match whole words; escaped keys and expect; agent check table #11015 (base feat/t27os-petal-menu, label no-auto-merge): the client mode of the PTY server learns whole-word verbs list | spawn | kill | read | keys | expect.
      • keys decodes \e \r \n \t \\ \xHH and appends CR unless T27OS_RAW is set.
      • expect polls every 500 ms with ANSI stripped, T27OS_EXPECT is the text, T27OS_WAIT the timeout (default 30 s); exit 0 when found, 1 on timeout.
      • Pure logic is in specs/t27os/pty_logic.t27 (4 new tests). Lab run: 17 passed, 0 failed. The server builds to an arm64 Mach-O on the lab.

    Findings that stay open

    1. Stale socket. ~/.t27os/pty.sock can exist with no listener (connect refused). The app connects only at start and then falls back to offline echo mode; it never reconnects. Fixed by hand on the Mac by starting a fresh server; the app needs a reconnect path.
    2. Environment leak. A server started from an agent session passes ANTHROPIC_* / CLAUDE_CODE_* to its panes, so Claude Code in a pane answers "Not logged in". Restarting under env -i fixed it. A scrub in the server is in flight in a separate session (local_4e996ab3).
    3. Resume ids are recorded for Claude (--resume <sid>) and Aider (--restore-chat-history) only. Gemini, OpenCode, Cursor and Copilot are not recorded; this needs each CLI's --help on the Mac.
    4. pty_proto MISMATCH is a separate defect, not touched.
    5. ~/.t27os/hooks.json still points at a removed /private/tmp/t27os-run/t27os-server.

    Not verified

    • The new keys / expect verbs were never run live on the Mac: the lab has no link step, so the live rerun of the agent check with expect is still owed.

    Red checks on #11015 that are inherited from the base (not caused by it, not blessed)

    • duplicate-bodies
    • Verilog widths absurd-width ledger (glass_window, pty_server)
    • t27b-native-ratchet (UNLISTED 25 / STALE 4 for specs/t27os)

    They need a one-time ledger refresh on the base branch.

    Dependency worth knowing

    specs/t27os/ does not exist on origin/master (0 entries). feat/t27os-petal-menu is 38 commits ahead and PR #10783 is OPEN and DIRTY. Queen bees branch from master, so the follow-up issues filed from this note name that dependency and stay in the Queen's blocked column until the stack lands.

  5. gHashTag commented on Oct 19, 2026

    @gHashTag
    OwnerAuthor

    Delegated to the Queen from the agent check (part C): #11030 (clear the three inherited red checks in the t27os specs) and #11031 (terminal pane reconnect after a stale socket or a late server). Both wait for #10783, because specs/t27os is not on master yet. Resume ids for Gemini, OpenCode, Cursor and Copilot stay with whoever has those CLIs on the Mac (needs each --help).

  6. gHashTag commented on Oct 19, 2026

    @gHashTag
    OwnerAuthor

    Also open: PR #11029 (PTY server child strips Claude Code session variables before spawn; matcher tests 21/21 on the lab with three negative controls; server side not run on macOS; label no-auto-merge).

  7. gHashTag commented on Oct 19, 2026

    @gHashTag
    OwnerAuthor

    Parent: mega epic #11037.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions