Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 21 additions & 6 deletions specs/t27f/frontend.t27
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@
; What this spec does not restate:
; - The rules of each surface. They stay in the spec that decides it (spec_graph*.t27, reel.t27,
; deck.t27, token_floor*.t27, lesson_reel.t27, hot.t27, claw/t27f_gate.t27, claw/preview.t27,
; particle_field.t27, ui_plan.t27, t27mcp/dashboard.t27). This spec names the surface only.
; particle_field.t27, ui_plan.t27, t27mcp/dashboard.t27, petal_menu.t27). This spec names the
; surface only.
; - The T27 OS home (SF_PETAL_MENU, 2026-10-19): the 27-petal triangle, its hit test and its
; open/close rule live in petal_menu.t27; its hosts are the trios app today and an FPGA later.
; - Tool names. A surface drawn by an MCP tool points at its row of specs/t27mcp/tool_schema.t27.
; - Which tool belongs to TRI CLAW. specs/t27mcp/service.t27 decides that by prefix (t27_ and t27f_
; are the t27 module's, mounted into TRI CLAW's /mcp). This spec checks that every T27F tool is
Expand Down Expand Up @@ -51,10 +54,11 @@ pub const SF_MAP_VIDEO : u32 = 9; // honeycomb reel as video and live playe
pub const SF_PARTICLE_LIVE : u32 = 10; // T27F Live, particle_field.t27 + particle_engine.t27
pub const SF_UI_PLAN : u32 = 11; // trusted-widget UI plan, ui_plan.t27
pub const SF_DASHBOARD : u32 = 12; // corpus and session health, t27mcp/dashboard.t27, tool t27_dashboard
pub const SF_COUNT : u32 = 13;
pub const SF_PETAL_MENU : u32 = 13; // T27 OS home: the 27-petal triangle menu, petal_menu.t27
pub const SF_COUNT : u32 = 14;
pub const SF_NONE : u32 = 255;

pub const SURFACE_NAMES : str = "graph,outline,map_still,graph_page,hot,check,preview,particle_reel,still,map_video,particle_live,ui_plan,dashboard";
pub const SURFACE_NAMES : str = "graph,outline,map_still,graph_page,hot,check,preview,particle_reel,still,map_video,particle_live,ui_plan,dashboard,petal_menu";

/// What draws a surface today.
pub const ST_LIVE : u8 = 0;
Expand All @@ -63,7 +67,7 @@ pub const ST_PARTIAL : u8 = 2;
pub const ST_BLOCKED : u8 = 3;
pub const ST_SPEC : u8 = 4;

pub const SURFACE_STATUS : [13]u8 = [0, 0, 0, 0, 2, 3, 4, 1, 1, 4, 4, 4, 0];
pub const SURFACE_STATUS : [14]u8 = [0, 0, 0, 0, 2, 3, 4, 1, 1, 4, 4, 4, 0, 4];

/// Where a surface is made: an MCP tool, a t27.ai page, the Railway lab, the TRI CLAW App, nowhere.
pub const MK_MCP : u8 = 0;
Expand All @@ -72,7 +76,7 @@ pub const MK_LAB : u8 = 2;
pub const MK_APP : u8 = 3;
pub const MK_NONE : u8 = 4;

pub const SURFACE_MAKER : [13]u8 = [0, 0, 0, 1, 0, 3, 3, 2, 2, 4, 4, 4, 0];
pub const SURFACE_MAKER : [14]u8 = [0, 0, 0, 1, 0, 3, 3, 2, 2, 4, 4, 4, 0, 4];

/// What a caller wants shown.
pub const I_SPEC_SHAPE : u32 = 0; // the structure of one spec
Expand All @@ -85,7 +89,8 @@ pub const I_EDITING : u32 = 6; // a spec redrawn while it is edited
pub const I_HEALTH : u32 = 7; // the state of the corpus and the session
pub const I_LIVE_AGENT : u32 = 8; // an agent's work as a live particle field
pub const I_APP : u32 = 9; // an application screen built from trusted widgets
pub const I_COUNT : u32 = 10;
pub const I_OS_HOME : u32 = 10; // the T27 OS home screen: 27 petals, a petal opens its menu
pub const I_COUNT : u32 = 11;

/// The drawing tools TRI CLAW's chat agent carries. service.t27 gives its coder persona CODER_TOOLS
/// for writing a spec; these are for showing one.
Expand Down Expand Up @@ -171,6 +176,9 @@ pub fn route(intent: u32, host: u8) -> u32 {
if (intent == I_APP) {
return SF_UI_PLAN;
}
if (intent == I_OS_HOME) {
return SF_PETAL_MENU;
}
return SF_NONE;
}

Expand Down Expand Up @@ -244,6 +252,13 @@ test a_report_is_a_particle_still_and_a_lesson_a_particle_reel {
assert SURFACE_MAKER[SF_PARTICLE_REEL] == MK_LAB;
}

test the_os_home_is_the_petal_menu_and_nothing_draws_it_yet {
assert route(I_OS_HOME, HOST_CLAUDE_CODE_DESKTOP) == SF_PETAL_MENU;
assert route(I_OS_HOME, HOST_SITE) == SF_PETAL_MENU;
assert pick(I_OS_HOME, HOST_CLAUDE_CODE_DESKTOP) == SF_NONE;
assert claim_ok(SF_PETAL_MENU, true) == false;
}

test what_cannot_be_made_has_a_stand_in_or_none {
assert pick(I_TOPIC_MAP, HOST_CLAUDE_CODE_DESKTOP) == SF_MAP_STILL;
assert pick(I_PR, HOST_CLAUDE_CODE_DESKTOP) == SF_GRAPH;
Expand Down
Loading
Loading