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
105 changes: 63 additions & 42 deletions .claude/skills/t27f/SKILL.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
---
id: t27f
name: T27F Visual Spec
description: T27F is the visual spec of a .t27 file -- one spec, one synchronized model, many views (source, architecture, data flow, dependencies, tests and benchmarks), every node labelled exact, derived, suggested or unknown and linked to its source span (gHashTag/trinity#1648, RFC gHashTag/trinity#1649). Use when the user says "t27f", "visual spec", "show / visualize / draw this spec", or opens a .t27 file to see its structure. Also runs the topic-map application built on T27F (gHashTag/trinity#1677) when the user gives a topic or a client brief.
name: T27F Frontend
description: T27F is t27's frontend -- the one tool through which t27 shows anything visual, made through several tools (spec graph and outline, honeycomb map stills, the t27.ai graph page, particle reels and stills, the hot-reload stream, the claw/t27f check-run), with its surfaces, their status and the intent-to-surface routing in specs/t27f/frontend.t27. Its core is the visual spec of a .t27 file (gHashTag/trinity#1648, RFC gHashTag/trinity#1649). TRI CLAW serves its MCP tools. Use when the user says "t27f", "visual", "visual spec", "show / visualize / draw this spec", "reel", "still", or opens a .t27 file to see its structure. Also runs the topic-map application (gHashTag/trinity#1677) when the user gives a topic or a client brief.
---

# T27F Visual Spec
# T27F Frontend

<!-- only-t27-rule -->
> **Only t27: everything is written in `.t27`.** (Owner hard rule 2026-10-05; budget #7371; restated in every skill per #7588.)
Expand All @@ -17,45 +17,65 @@ description: T27F is the visual spec of a .t27 file -- one spec, one synchronize

## What T27F is

**This section is the one home of the definition.** `CLAUDE.md`, `specs/OWNERS.md`, the skill card
`specs/skills/t27-t27f.t27` and the spec headers point here; they do not restate it.

T27F is the **visual spec of `.t27`**: every t27 specification has a first-class visual form, an
interactive, inspectable diagram built from reusable widgets. Sources: epic gHashTag/trinity#1648
("native generative UI and visual application engine") and RFC gHashTag/trinity#1649 ("specs as
executable visual diagrams").

- **One spec -> one synchronized source model -> many views**: source, architecture diagram, data
flow, dependency graph, tests/benchmarks, docs. Every view is derived from the real spec
(AST/IR plus metadata), never a hand-drawn picture that can drift from the code.
- **Graph IR**: versioned, typed nodes (module, function, step, input/output/parameter/constant,
type/numeric format, branch/loop, operator, dependency, test/invariant/oracle, benchmark/hardware,
paper/dataset, opaque region) and typed edges (data flow, control flow, calls/depends on,
produces/consumes, constrains, tested by, measured by, implemented by, cited by). The full lists
are in #1649.
- **Every node carries one inference label**: `exact` (present in the AST/IR), `derived` (safe from
symbol and type resolution), `suggested` (a model's explanation, visibly marked, linked to source
ranges) or `unknown`. A model's guess is never drawn as a verified property of the program.
- **Bidirectional source mapping**: select a node, see its source span; select a line, see its
node. Generation is deterministic for a fixed source and toolchain, and two revisions produce a
graph diff.
- **Read-only viewer first.** Editing comes after the schema survives two structurally different
specs. GF16 (`specs/numeric/gf16.t27`) is a *candidate* pilot pending the comparison in #1651.
- **The pipeline (#1648)**: intent -> versioned system description -> domain model and computation
-> renderer-neutral UI plan (trusted widget ids, bindings, layout, actions, theme, a11y,
provenance) -> T27F renderer -> verification loop. A model never ships code to the renderer: no
eval, no generated JS, only widgets from an allowlist.
- **In the map** (#1648 comments, 2026-10-16): zooming into a honeycomb cell opens that cell's spec
as a navigable program, linked to source, tests, issues and real task status; each cell is both a
spec and a learning entry point.
**This section is the one home of the definition.** `CLAUDE.md`, `AGENTS.md`, `specs/OWNERS.md`,
the skill card `specs/skills/t27-t27f.t27` and the spec headers point here; they do not restate it.

T27F is **t27's frontend: its native visualization, made through several tools.** Everything t27
shows -- a spec as a diagram, a topic as a map, a lesson as a particle reel, a report as a still, a
pull request as a check-run -- is a T27F surface. Owner, 2026-10-18: everything visual is gathered
into T27F as one tool, and T27F goes into TRI CLAW.

**The law is `specs/t27f/frontend.t27`.** It lists the surfaces, what draws each today (LIVE, LAB,
PARTIAL, BLOCKED, SPEC), which surface answers an intent (`route`), the stand-in when the wanted one
cannot be made this turn (`pick`), the rule that nothing undrawn is claimed made (`claim_ok`), and
which surfaces TRI CLAW serves (`claw_serves`). Read the table there; this section does not copy it.
The rules of each surface stay in the spec that decides it.

The surfaces, by family:

- **Spec diagram (the core).** Every t27 specification has a first-class visual form, an
interactive, inspectable diagram (epic gHashTag/trinity#1648, RFC gHashTag/trinity#1649). Drawn as
SVG by `t27f_graph`, as text by `t27f_outline`, and on t27.ai/t27f/graph/ and the Spec Explorer.
- **One spec -> one synchronized source model -> many views**: source, architecture, data flow,
dependencies, tests/benchmarks, docs. Every view is derived from the real spec (AST/IR plus
metadata), never a hand-drawn picture that can drift from the code.
- **Graph IR**: versioned, typed nodes and edges; the full lists are in #1649 and
`specs/t27f/spec_graph.t27`.
- **Every node carries one inference label**: `exact`, `derived`, `suggested` (a model's
explanation, visibly marked) or `unknown`. A model's guess is never drawn as a verified property.
- **Bidirectional source mapping**, deterministic generation, graph diffs between revisions.
- **Read-only viewer first.** GF16 (`specs/numeric/gf16.t27`) is a *candidate* pilot (#1651).
- **The pipeline (#1648)**: intent -> system description -> domain model -> renderer-neutral UI
plan (trusted widget ids only, `specs/t27f/ui_plan.t27`) -> T27F renderer -> verification. A model
never ships code to the renderer.
- **Maps.** The 27-cell honeycomb (`specs/t27f/reel.t27`, look `deck.t27`): stills by `t27f_view`
today; the video and live player are spec only.
- **Particle reels and stills.** The token_floor world (`token_floor*.t27`, `lesson_reel.t27`,
`reel_particles*.t27`, `particle_engine.t27`): every pixel is a sum a spec computes and every motion
a step of an integrator. Rendered on the Railway lab; a still is one frame of a reel. T27F Live
(`particle_field.t27`) is the same physics driven by an agent's events, spec only.
- **Live editing and review.** The hot-reload stream (`hot.t27`, `build.t27`), the `claw/t27f`
check-run the TRI CLAW App posts on a pull request (`specs/claw/t27f_gate.t27`), the PR preview
(`specs/claw/preview.t27`).
- **Health.** The MCP dashboard (`specs/t27mcp/dashboard.t27`, tool `t27_dashboard`).

**In TRI CLAW.** `specs/t27mcp/service.t27` gives every `t27_` and `t27f_` tool to the t27 home and
mounts it into TRI CLAW's `/mcp`. `frontend.t27` checks that every T27F tool lands there and names
the drawing set TRI CLAW's chat agent carries (`claw_visual_tool`), next to the coder persona's
`CODER_TOOLS`. Whether the deployed `/mcp` mounts them today is not measured.

**What T27F is not:** it is not the topic-to-value engine. gHashTag/trinity#1677 (topic or client
brief -> 27-lesson map -> Bee -> verified artifact) is an *application* built on T27F, and so are
the reels. Describing T27F as #1677 is the error this section exists to stop (owner correction,
2026-10-17).
brief -> 27-lesson map -> Bee -> verified artifact) is an *application*: its decisions live in
`specs/t27f/topic_engine.t27`, and what it shows is drawn through T27F's map surface. T27F is also
not one diagram: an answer asked for "a T27F visual" picks the surface `frontend.t27` routes it to.
Owner corrections: 2026-10-17 (not the topic engine), 2026-10-18 (the frontend, through several
tools, reels included).

## What exists and what does not

The status of every surface is `SURFACE_STATUS` in `specs/t27f/frontend.t27`. The rows below give
the diagram core in detail, then the other surfaces and the topic-map application.

| Layer | Where | State |
|---|---|---|
| Spec -> graph IR schema (the core) | `specs/t27f/spec_graph.t27` (t27#10020) | spec with tests: node / edge kinds, labels, spans, `validate_graph`, line -> node mapping, node -> ui_plan widget, one hand-read fixture (`specs/tutorial/08_modules_and_arrays.t27`) |
Expand All @@ -65,14 +85,15 @@ the reels. Describing T27F as #1677 is the error this section exists to stop (ow
| Graph IR derive pass | `specs/t27f/spec_graph_derive.t27` (t27#10191) | spec with tests: `derive_graph(g, src)` appends what the exporter must not claim and changes nothing it holds. R1 DERIVED `tested_by` = every EXACT CALLS edge from a test, invariant or bench to a fn read backwards (no line). R2 DERIVED `data_flow` = a const or `use` that an EXACT USES edge ties to a fn and that is named inside one of the fn's return statements (from `return` to the next `;`), on the line of the first such name. R3 UNKNOWN opaque node = an undeclared qualified call target of three or more segments (`std.testing.expectEqual(` names `std.testing`), spanning the lines that call through it. Exporter plus derive equal the tutorial 08 fixture as sets: 15 of 15 nodes, 16 of 16 edges, no special case. Limits: names matched as text; call results and flow through locals are not derived; R3 needs 3 or more segments (two cannot be told from a method call); a graph that does not validate, or a source of another line count, comes back unchanged; past 1024 nodes or 4096 edges the result is refused with the too-many verdict. Not wired to a host: the MCP tool does not call it |
| UI plan IR + trusted widget catalog | `specs/t27f/ui_plan.t27` (t27#9962) | spec with tests; no renderer draws a plan yet |
| Honeycomb focus+context geometry | `specs/t27f/reel.t27` | spec; stills drawn by the MCP tool `t27f_view` |
| Renderer in the Trinity UI | gHashTag/trinity | **missing**; no T27F widget is live |
| Application: topic map (#1677) | `specs/t27f/topic_engine.t27`, `topic_reel.t27` | spec; procedure below |
| Application: reels and deck | `specs/t27f/reel.t27`, `deck.t27`, `reel_*.t27` | spec; two reels |
| Renderer in the Trinity UI | gHashTag/trinity, t27.ai/t27f/graph/ and the Spec Explorer graph layer | live for the spec graph; it ignores a `src=` parameter, and no page draws a UI plan yet |
| Surface: particle reels and stills | `specs/t27f/token_floor*.t27`, `lesson_reel.t27`, `reel_particles*.t27` | rendered on the Railway lab (lesson 1 EN and RU); no renderer in the repo, no MCP tool yet |
| Surface: honeycomb map video and deck | `specs/t27f/reel.t27`, `deck.t27` | spec; stills only, through `t27f_view` |
| Application: topic map (#1677) | `specs/t27f/topic_engine.t27`, `topic_reel.t27` | spec; drawn through the map surface; procedure below |
| Application: content factory (epic t27#10560) | `specs/t27f/reel_factory.t27` (t27#10561) | spec with tests: an item's code and title, read keyword by keyword, give 11 features. Those pick 1 of 12 scene archetypes (best pair first, cap 4, no repeat within 2 items, then the least-used generic scene) plus an accent, a motion, a layout and 8 output formats. No renderer draws a plan yet (R3), and `lesson_reel` still draws token_floor (R4). Lessons: read the plan's spread over the whole course before trusting it. A greedy walk in course order gave 7 lessons one scene. Code counts alone handed lesson 8 the tests scene over "A test block". Gate: `tri factory`. The plan prints from a separate module, `specs/t27f/reel_factory_plan.t27` (t27#10573): `t27c gen` it, then run the zig (t27c has no `run`). Names come from the factory's comma lists, so the law module keeps no `main`. Traps: the lab's `/root/t27` t27b can predate #10455 and refuse `std.debug.print` that master accepts, so build a fresh t27b in its own worktree with its own `CARGO_TARGET_DIR` before you call a print unsupported. `t27c seal --save` needs zig on PATH (`/opt/zig`). A base64 line fetched back from fs-lab merges with the Railway warning, so wrap it as `B64:...:END`. A new `tri` arm must start its own line (` name)`) or the documented-commands checker misses it |
| Related | trinity#1647 dashboards, #1652 MVP research, #1653 three skills, #1655 evolution runtime | open |

When asked "how is T27F going", report against the core rows first. Progress on the applications
is not progress on the core.
When asked "how is T27F going", report against the core rows first, then the other surfaces.
Progress on a reel or on the topic map is not progress on the diagram core.

**Trap: a name declared in two specs cannot be imported (t27#10556).** Measured on t27c 0.5.2:
`use t27f::lesson_reel::phrase_start` returns `UNRESOLVED ... ambiguous, not spliced`, because
Expand Down
6 changes: 3 additions & 3 deletions .trinity/seals/igla_own_model.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"built_by": "t27c-bootstrap@0.5.2+fd332dfd5",
"built_by": "t27c-bootstrap@0.5.2+9448ab4be",
"closure": [
{
"spec": "specs/t27f/reel.t27",
"spec_hash": "sha256:c47b21cea1d7169da6528e321cf2d2c513d3f552c0cd04fe9d37bbd5314ccacf"
},
{
"spec": "specs/t27f/topic_engine.t27",
"spec_hash": "sha256:95337a0fe59f32426db6ca3a9481151c28f2b9eaddfa346659782e6d70ae5ff0"
"spec_hash": "sha256:d117a894beb6dc97ee678f84a927a98a801783d101b8b4cd96a0875979a911be"
},
{
"spec": "specs/t27f/topic_reel.t27",
Expand All @@ -22,7 +22,7 @@
"module": "own_model",
"ring": 12,
"seal_schema": 2,
"sealed_at": "2026-10-18T13:33:41Z",
"sealed_at": "2026-10-18T17:03:43Z",
"sealed_by": "t27c-bootstrap@0.5.2",
"spec_hash": "sha256:2c3daec9e62ce9123e19cad921e57af75beb25a1870c234230ae5505a7d7ac79",
"spec_path": "specs/igla/own_model.t27",
Expand Down
6 changes: 3 additions & 3 deletions .trinity/seals/igla_own_model_board.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"built_by": "t27c-bootstrap@0.5.2+fd332dfd5",
"built_by": "t27c-bootstrap@0.5.2+9448ab4be",
"closure": [
{
"spec": "specs/igla/own_model.t27",
Expand All @@ -11,7 +11,7 @@
},
{
"spec": "specs/t27f/topic_engine.t27",
"spec_hash": "sha256:95337a0fe59f32426db6ca3a9481151c28f2b9eaddfa346659782e6d70ae5ff0"
"spec_hash": "sha256:d117a894beb6dc97ee678f84a927a98a801783d101b8b4cd96a0875979a911be"
},
{
"spec": "specs/t27f/topic_reel.t27",
Expand All @@ -26,7 +26,7 @@
"module": "own_model_board",
"ring": 12,
"seal_schema": 2,
"sealed_at": "2026-10-18T13:33:45Z",
"sealed_at": "2026-10-18T17:03:43Z",
"sealed_by": "t27c-bootstrap@0.5.2",
"spec_hash": "sha256:69e4e67d00d0a17aed8d5e9ed45d7c745c970d069388db37f7835ff39179adae",
"spec_path": "specs/igla/own_model_board.t27",
Expand Down
14 changes: 7 additions & 7 deletions .trinity/seals/skills_skill_t27_t27f.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
{
"built_by": "t27c-bootstrap@0.5.2+d2c8e7d41",
"built_by": "t27c-bootstrap@0.5.2+9448ab4be",
"closure": [],
"config": "gen=c,rust,verilog,zig;tests=zig",
"gen_hash_c": "sha256:3856d97173c4f486b0e39ca00880e706976994e72287fe5b5c86b0b467fd540a",
"gen_hash_rust": "sha256:9b522f77f03668cd71a936b56a6e221891364aac68b7cd8fcea3763613c4ee54",
"gen_hash_verilog": "sha256:ba6e95d5187eb5620e250e96bd46b1d624e0cb7c613ad71a6e07f20f37c25f97",
"gen_hash_zig": "sha256:5eed1c29cede07e37e59db44b4cbb47f3641cd8da680aacf4695ecff39fad596",
"gen_hash_c": "sha256:ed65bd9f03e7c59dc32bfdb5e30f8cc9536670b1008f887db3c8021e757919d6",
"gen_hash_rust": "sha256:8ca96060be660b1e0045eca0c33d806a9ee34a167991d15a61053e4c2587b272",
"gen_hash_verilog": "sha256:9283f9562ad95ad1efb5de87fdb16369bad0ab2bb3ca8e16b89d302bc88a5cb6",
"gen_hash_zig": "sha256:a87168712386fd53b1d4cdf062115911e0c29d64714a2243bafffb281377a38b",
"module": "skill_t27_t27f",
"ring": 12,
"seal_schema": 2,
"sealed_at": "2026-10-18T05:07:15Z",
"sealed_at": "2026-10-18T17:03:24Z",
"sealed_by": "t27c-bootstrap@0.5.2",
"spec_hash": "sha256:93a740f66c7db49fcf8fea13f52ccd449c810d08f89e161db72ee112ab330dcf",
"spec_hash": "sha256:3df4eafade88568e36f421a2dffb326a280810bced4bf67960befdd8d1968997",
"spec_path": "specs/skills/t27-t27f.t27",
"tests": {
"failed": 0,
Expand Down
41 changes: 41 additions & 0 deletions .trinity/seals/t27f_T27fFrontend.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"built_by": "t27c-bootstrap@0.5.2+9448ab4be",
"closure": [
{
"spec": "specs/t27f/reel.t27",
"spec_hash": "sha256:c47b21cea1d7169da6528e321cf2d2c513d3f552c0cd04fe9d37bbd5314ccacf"
},
{
"spec": "specs/t27mcp/service.t27",
"spec_hash": "sha256:3d7957837be8ac3de14b18ce1c0ecdde805f3f71d4d801b62d476b2e82f4a1ae"
},
{
"spec": "specs/t27mcp/tool_schema.t27",
"spec_hash": "sha256:49528bd0537c12a9a7a288735d272ee974cf2d261a8f197eb5b17b78a2f9a89b"
}
],
"config": "gen=c,rust,verilog,zig;tests=zig",
"gen_hash_c": "sha256:cb17d2d0955860474a7e522538691fe2efe5b3bf539497a5405349e2b830ee39",
"gen_hash_rust": "sha256:4b7f761fc91186cf4c9a8abb2a7c503407ddbeba06cbc34c7af51c811e1bde95",
"gen_hash_verilog": "sha256:7a71807e11de0cf1e85ccbf6fbe09c70ca7f8a84db78e7548eb9699ca3576777",
"gen_hash_zig": "sha256:bf142bb8a420fd242fc209833cb874d58a6ffffe23e6ea3121a4cc5cb1d16e9e",
"module": "T27fFrontend",
"ring": 12,
"seal_schema": 2,
"sealed_at": "2026-10-18T17:03:22Z",
"sealed_by": "t27c-bootstrap@0.5.2",
"spec_hash": "sha256:13cd46e9bdacfbae4f6ecd247f771ad6159166aa3a45cd56ce25b57be06de58c",
"spec_path": "specs/t27f/frontend.t27",
"tests": {
"failed": 0,
"failing": [],
"forced": false,
"passed": 7,
"total": 7,
"vacuous": 0
},
"toolchain": {
"test_runner": "sha256:1982ae948e24d00c5d221ccec12dfce1eb01204b53e37b0f857f93b16d64629d",
"zig": "0.16.0"
}
}
6 changes: 3 additions & 3 deletions .trinity/seals/t27f_T27fTopicEngine.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"built_by": "t27c-bootstrap@0.5.2+093bf4713",
"built_by": "t27c-bootstrap@0.5.2+9448ab4be",
"closure": [],
"config": "gen=c,rust,verilog,zig;tests=zig",
"gen_hash_c": "sha256:725bc9a3ec9380a91773719bba2bceaf604ff3f8661167869dac0cd91392d6ba",
Expand All @@ -9,9 +9,9 @@
"module": "T27fTopicEngine",
"ring": 12,
"seal_schema": 2,
"sealed_at": "2026-10-18T09:33:01Z",
"sealed_at": "2026-10-18T17:03:24Z",
"sealed_by": "t27c-bootstrap@0.5.2",
"spec_hash": "sha256:95337a0fe59f32426db6ca3a9481151c28f2b9eaddfa346659782e6d70ae5ff0",
"spec_hash": "sha256:d117a894beb6dc97ee678f84a927a98a801783d101b8b4cd96a0875979a911be",
"spec_path": "specs/t27f/topic_engine.t27",
"tests": {
"failed": 0,
Expand Down
6 changes: 3 additions & 3 deletions .trinity/seals/t27f_reel_gf16_nmse.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"built_by": "t27c-bootstrap@0.5.2+093bf4713",
"built_by": "t27c-bootstrap@0.5.2+9448ab4be",
"closure": [
{
"spec": "specs/t27f/reel.t27",
"spec_hash": "sha256:c47b21cea1d7169da6528e321cf2d2c513d3f552c0cd04fe9d37bbd5314ccacf"
},
{
"spec": "specs/t27f/topic_engine.t27",
"spec_hash": "sha256:95337a0fe59f32426db6ca3a9481151c28f2b9eaddfa346659782e6d70ae5ff0"
"spec_hash": "sha256:d117a894beb6dc97ee678f84a927a98a801783d101b8b4cd96a0875979a911be"
},
{
"spec": "specs/t27f/topic_reel.t27",
Expand All @@ -22,7 +22,7 @@
"module": "reel_gf16_nmse",
"ring": 12,
"seal_schema": 2,
"sealed_at": "2026-10-18T09:33:00Z",
"sealed_at": "2026-10-18T17:03:41Z",
"sealed_by": "t27c-bootstrap@0.5.2",
"spec_hash": "sha256:4f0f49a4533666577fa9fa1e44558cb5e030801f6ed37605c3ca6e65e74c5f4d",
"spec_path": "specs/t27f/reel_gf16_nmse.t27",
Expand Down
Loading
Loading