Repository navigation
EPIC: T27F — Native generative UI and visual application engine #1648
Description
Vision update: from generated UI to a declarative system-to-experience pipeline
T27F should investigate a deeper architectural change: describe a system and its state/behavior once, then derive its computation, interactive UI, diagrams and visualizations from that description. Do not reduce the goal to generating React code or styling existing screens.
Proposed conceptual pipeline (hypothesis, not yet implemented)
- Intent / Queen orchestration — interpret the request, identify missing constraints, and select capabilities.
- Versioned system/world description — typed entities, properties, relationships, units, constraints, initial/boundary conditions, time, provenance and uncertainty.
- Domain model + computation — explicit rules/equations or a selected solver; optional learned models are evaluated separately and never assumed correct.
- Renderer-neutral UI IR — trusted widget/component IDs, data bindings, layout, actions, theme, accessibility, provenance and capability declarations.
- T27F renderer — start with the current React/TypeScript frontend; render panels, graphs, AST-supported diagrams, trajectories or 3D views as justified.
- Verification loop — compare computed results with independent references/observations; expose error, uncertainty, solver settings and unsupported assumptions.
The system description, simulation state and UI layout must remain separate but connected through explicit typed contracts. One state source should drive both the solver and the visualization.
Research notes and primary resources
These projects solve different layers; do not treat them as direct interchangeable competitors or claim an absolute winner without a task-specific benchmark.
- Vercel json-render — structured UI plans rendered through trusted components: https://github.com/vercel-labs/json-render
- Google A2UI — declarative, portable agent-to-UI protocol; inspect current version and distinguish stable production version from candidate specifications: https://github.com/a2ui-project/a2ui and https://a2ui.org/
- AG-UI — event-based, bidirectional agent↔frontend interaction protocol, not itself a UI component schema: https://github.com/ag-ui-protocol/ag-ui
- MCP Apps — tool-provided interactive UI, with sandboxed iframe and auditable host communication: https://github.com/modelcontextprotocol/ext-apps and stable specification https://github.com/modelcontextprotocol/ext-apps/blob/main/specification/2026-01-26/apps.mdx
- Three.js — candidate visualization renderer, not a physics solver: https://threejs.org/docs/
- MuJoCo — example of a specialized physics engine; evaluate whether its domain fits the chosen experiment: https://mujoco.readthedocs.io/
- Agent Skills format — portable skill packaging and progressive disclosure: https://agentskills.io/specification and https://github.com/agentskills/agentskills
- Trinity context — existing epic/MVP and adjacent work: RFC: Widget-based customizable dashboards for Trinity / T27 Desktop OS #1647 dashboards, RFC: Specs as executable visual diagrams — researcher-first Spec UI #1649 specs as executable visual diagrams, Queen → Bees: compare T27 numeric formats and choose the right T27F visual-spec pilot #1651 numeric-format pilot comparison, MVP: benchmark generative-UI competitors and prototype T27F research workspace #1652 T27F MVP.
Required research matrix
For every candidate record the date checked, category, current version/status, source links, license (verify from LICENSE, otherwise mark unverified), schema/validation, streaming/partial updates, state and actions, React integration, renderer portability, accessibility, security/trust boundaries, persistence/theme/fallback, maintenance signals, integration effort, and known gaps. Distinguish facts from recommendations. Include at least one runnable same-scenario spike where feasible and publish scripts/raw results. A2UI schema, AG-UI interaction protocol, MCP Apps tool UI, and full app generators are different categories.
Revised MVP sequence
- Audit actual Trinity frontend, dashboard/widgets, .t27 grammar/compiler, AST/IR, tests/oracles, data APIs and relevant physics/numeric specs. Cite paths/symbols and mark implemented/partial/proposed/unknown.
- Compare at least two real .t27 candidates; do not preselect GF16.
- Choose one research workspace pilot based on parser/IR coverage, evidence, tests, usefulness of visual representation and implementation effort.
- Define the smallest versioned UI IR and trusted widget manifest, or document evidence for reusing an existing format.
- Generate one workspace from natural language using actual project data: source/spec, AST-derived diagram only if supported, test/benchmark status, provenance/uncertainty, preview/accept, regenerate, theme, save/load and reset.
- Test malformed output, unknown widget/action, missing data, denied permissions, widget/tool failure, unsupported syntax, interrupted generation and stale saved state.
- Benchmark against the best-fit existing approach and current React baseline on identical tasks; publish environment, versions, scripts, raw output and limitations.
- Only after the declarative pipeline is validated, add the first physics experiment: two-/few-body Newtonian mechanics with documented initial conditions, unit checks, an independent reference, conservation/error diagnostics, adjustable parameters and trajectory/graphs. Expand to harder domains only after validation.
Scientific and engineering guardrails
- Physical constants alone do not encode a complete simulator. Laws/equations, initial and boundary conditions, units/material parameters, numerical methods and validation are also required.
- A plausible generated image/animation is not evidence that its dynamics are correct.
- Do not claim a single model can emulate the exact universe, or that no training is needed. Exact atom-level universe simulation is not an MVP goal.
- Prefer a hybrid architecture: agent interprets and routes; a typed representation describes the system; a specialized solver computes; T27F renders; independent references validate.
- No arbitrary model-generated JavaScript/eval in the trusted UI path. Validate every plan against an allowlist and explicit permissions.
- No broad frontend rewrite and no claim of performance superiority without measurements.
Agent skills required
Prepare three focused, reusable skills in the repository's established skill convention, following the Agent Skills format:
- t27f-architecture — contracts between intent, world/system model, computation, UI IR and renderer; repository audit; safety and test gates.
- generative-ui-research — source-backed competitor research, version/status/license verification, taxonomy and reproducible matrix/benchmark.
- world-model-simulation — system-state schema, solver selection, first mechanics experiment, units, numerical validation, uncertainty and limits.
Each skill must include YAML frontmatter (name, description), procedural steps, links to this epic/MVP and primary sources, failure modes, and acceptance criteria. Keep each SKILL.md focused and move long references into adjacent reference files. Validate the skill format and check the repository's own-language-first policy and existing skills loader/catalog before adding a second canonical copy. Do not claim these skills exist until their files are committed and discoverable.
Deliverables / acceptance
- Dated competitor matrix with verified primary sources.
- Repository audit and at least two candidate-spec comparison.
- Architecture decision record explaining reuse/adapt/build.
- Versioned UI IR/widget manifest proposal and trust-boundary design.
- Runnable end-to-end workspace with tests and reproducible baseline.
- A small validated physics demonstration only after the UI/system-description chain works.
- Three validated skills, with exact paths and discoverability verified.
- Final report clearly separating evidence, implementation, assumptions and unresolved questions.
This issue is a product/research direction, not a claim that the architecture, simulator, or skills are already implemented.
Extension proposal: shared world model for generative UI + visual/game runtime
Treat a game/interactive world as a first-class T27F use case, not as a separate unrelated product. The key hypothesis is that a stable object/world model can be presented through multiple replaceable views: research dashboard, 2D map, 3D scene, game-like world, schematic or abstract visualization. Changing a view/theme must not silently mutate the underlying world state.
Separate contracts
- World / domain state: stable entity IDs, typed components/properties, relationships, transforms, units, ownership and lifecycle.
- Behavior / simulation: explicit systems, rules, event handlers, physics/collision and time-step configuration. Visual styling must not define physical behavior.
- Presentation profile: geometry/asset mapping, materials/colors, lighting, camera, typography, layout and animation style. Profiles are versioned and replaceable.
- Interaction contract: allowed user actions, controls, selection, manipulation, accessibility and permission checks.
- Renderer adapter: initially the existing web/React path for UI and a proven 2D/3D renderer where needed; do not assume a new engine must be written.
- Persistence / snapshots: save world state and presentation separately; support undo/version history and restore-default for the presentation without resetting simulation state.
- Validation / determinism: tests for state transitions, replayable events where feasible, and separation of authoritative state from visual interpolation.
User-facing capability
A user can ask “show this system as a minimal 2D diagram”, “switch to a low-poly game style”, or “return to default”. The system generates or selects a validated presentation profile and applies it to the same stable world model. Provide preview/accept, undo, reset-to-default, and versioned saved variants. Do not regenerate the domain model just to change colors or shape.
Engine research — do not decide by analogy alone
- Bevy ECS concepts: entities/components/systems and data-oriented logic: https://bevy.org/learn/quick-start/getting-started/ecs/
- Godot scenes/nodes/signals and reusable scene resources: https://docs.godotengine.org/en/4.7/getting_started/introduction/key_concepts_overview.html
- Three.js Object3D and material separation: https://threejs.org/docs/pages/Object3D.html and https://threejs.org/docs/pages/Material.html
Compare against Trinity's existing frontend/runtime and actual project language/toolchain before adopting any engine. These references are architectural examples, not a recommendation to embed all three.
Smallest proof
- Create one stable test world with a few typed entities and known relationships.
- Render it in two presentation profiles (for example, schematic and low-poly 3D) while preserving entity IDs and state.
- Change theme/materials/layout and return to the default profile; verify that simulation state is unchanged.
- Add one explicit behavior/interaction (move/select/trigger) and test that both views operate on the same state.
- Save/load world state and presentation independently; test invalid profile fields and unknown component/action rejection.
- Measure renderer performance and interaction latency before expanding to full game-engine scope.
This is an architectural hypothesis and research scope, not a claim that T27F is already a game engine. Full game functionality (physics, collision, animation, assets, networking, audio, editor and platform builds) must be scoped separately.
Child workstream: Evolution Runtime
Track bounded self-adaptation as a separate vertical slice: #1655 — T27F Evolution Runtime: prototype bounded self-adaptation, hot-swap, rollback and live visualization. The generative-UI MVP validates declarative model → trusted renderer; #1655 separately validates safe runtime changes and live event visualization. #1654 remains a separate Queen/Bee task-intake reliability workstream. No prototype or runtime dispatch is claimed yet.
Activity
dharmarooms commentedon Oct 16, 2026
Product & token economy workstream — subscription + usage + courses
Status: proposed design to validate; not implemented, not a final pricing decision.
Product hypothesis
Use a hybrid model rather than forcing every participant into one payment model:
Required economic model
Build a spreadsheet/calculator with explicit, editable assumptions:
Proof of Compute / trust boundaries
Do not reward merely having a GPU online. Define per-workload evidence: signed job receipt, input/job identity, resource telemetry, accepted output or verifier result, duplicate/replay protection, and dispute/failure handling. Not every workload has a cheap cryptographic proof of correct computation; document the assurance level per workload. Start with an internal ledger/accounting unit; do not promise a tradable token or 1:1 cash value before legal, security, and unit-economics review.
MVP experiment and acceptance
Decision to test
Default hypothesis: subscription for platform access + included allowance; usage credits for metered compute; separate course purchases unless explicitly bundled. Providers can offset a capped subscription amount with verified compute credits. Validate against simpler alternatives before locking this in.
Related work: #1652 (T27F MVP/benchmark) and #1654/#1645 (Queen/Bee reliability and runtime performance).
dharmarooms commentedon Oct 16, 2026
Product integration: T27-native specifications in the existing map
This belongs in this T27F epic. Preserve the existing visual design and map/Arena experience; change the underlying logic and representation so the project can progressively move from TypeScript to the native T27 language instead of building another parallel system.
Product behavior
T27 as the native representation
Treat T27F as a path toward representing and working with the system in T27, not merely rendering TypeScript code in a diagram.
Suggested delivery sequence
Acceptance criteria
dharmarooms commentedon Oct 16, 2026
Product/MVP extension: shareable specification-honeycomb widget + T27-native onboarding
This extends the existing T27F epic. Do not redesign the current honeycomb/map UI or create a parallel product. Reuse the current map, cells/specifications, engineering courses, and existing issue/status infrastructure.
Core interaction
Viral distribution
Onboarding as a course
T27-native full-stack direction
MVP acceptance criteria
This is a scoped extension of T27F, not a claim that the widget, embed flow, onboarding course or fully JS-free frontend already exists.
dharmarooms commentedon Oct 16, 2026
MVP extension: the specification honeycomb becomes a shareable learning unit / open university
This extends T27F and must reuse the existing honeycomb map, specification model, engineering-course system and task/status infrastructure. Preserve the current visual design; do not create a separate course platform or parallel map.
Product concept
Each honeycomb cell is both a system specification and a learning entry point. Zooming into a cell opens its enlarged, explorable specification while neighboring cells remain visible at the edges, preserving context and showing how this unit connects to the larger system. The same view should be shareable via a stable deep link and, where the current architecture permits, an embeddable widget/card suitable for X posts, blogs, documentation and GitHub issues.
A course attached to each specification
Viral sharing / growth loop
T27-native full-stack goal
Treat this as the smallest end-to-end vertical slice for T27F: specification/course references → typed data contracts → focused honeycomb UI → progress/status → deep link/share/optional embed. T27 is the intended native implementation path. First audit actual compiler/runtime/browser integration and document what can run in T27 today; do not claim a fully JavaScript/TypeScript-free browser stack until a runnable, tested build proves it. Avoid adding new JS/TS business logic and migrate incrementally behind stable contracts.
MVP acceptance criteria
This is an MVP/product requirement in the existing epic, not a claim that the university, share widget, course links or full T27-native frontend are already implemented.
dharmarooms commentedon Oct 16, 2026
Follow-up directions split into two concrete workstreams:
Research starting points: Microsoft Research — Data Stories using Animated Transitions, ScrollyVis, Cytoscape.js, Sigma.js, Flourish scrollytelling examples. These are references to evaluate, not a pre-decided dependency choice.
spec(t27f): topic-to-value engine and /t27f skill, phase 1 slice (#9952)
spec(t27f): renderer-neutral UI plan IR and trusted widget catalog (C…
docs(t27f): T27F is the visual spec of .t27, not the topic-to-value e…
spec(t27f): add the spec -> graph IR exporter in t27 (Closes #10162) (#…
feat(website): /t27f/graph/ draws the T27F graph view of a .t27 spec (#…
Deploy aedbc7a
feat(website): /t27f/graph/ in the site's own style (dark, Outfit and…
Deploy eb77dc2
fix(website): Graph layer sets no state in its effect body
test(website): queen-specs-chat pins the frame route with the view
feat(website): a Graph layer in the Spec Explorer, drawn by the T27F …
Deploy ed677e2
gHashTag commentedon Oct 19, 2026
Part of mega epic gHashTag/t27#11038, the one map of every T27F and gen-UI track.
🤖 Generated with Claude Code