Any application, defined in one format and rendered natively.
Its users reshape it live, just by asking an AI.
Vision · Applications · Architecture · Lisp (Clojure) · How it works · Quick start · Documentation
affrescoui-demo-final-web.mp4 #
<sub>The demo: an image editor given a 3D modeller's and a presentation app's features by asking its assistant, a new app made from a name and a description, a small change to a home app, and the Launcher with its apps.</sub>
Warning
The v1.0.0 downloads are not code-signed yet, so macOS and Windows warn that they can't verify the developer when you first open them. Signed builds will come in the next releases.
Best today: build from source. It's one command, gives an optimised build for your machine, and never shows that warning (you need CMake 3.25+ and a C++23 compiler):
cmake -S . -B build && cmake --build build && ./build/affrescoui_launcher
AffrescoUI is a native UI engine whose applications are defined in Lisp. AffrescoUI Lisp, a sandboxed dialect of Clojure, is the standard: an application's window, views, state, behaviour, commands, keys, settings and text are all named Lisp definitions, which the engine builds into one document, draws in C++ and OpenGL, and keeps running. If you write Clojure, you can already read and write these apps. JSON is supported too: the same document can be written directly in JSON, and every example ships both. People and AI agents change an application while it runs: each change is checked against the app's permissions, previewed if it needs approval, and applied in place in milliseconds, with no rebuild, no restart and nothing lost.
Software is frozen at build time: it does what its makers shipped, and every change waits for the next release. AffrescoUI applications keep evolving while they are used, shaped by the people who use them.
- One format for every application. A to-do list and a professional design tool are written the same way and rendered by the same native engine. A feature built for one application can move into another.
- Complex applications, built by anyone. No programming needed: describe what you want, and an AI agent builds it with you, step by step, from a simple board to a full workbench.
- The people who use an app can change it. Ask the app itself, in plain words:"add a Blocked column" ,"dim the lights at sunset" ,"warn me when a streak breaks" , or point at the part to change and ask. You see the change live, then keep it or undo it, even after later changes. Nothing changes without your approval.
- Prototyping without stopping. Every idea is tried in the running application: no rebuilding, no restarting, no re, and your work stays where it was. When the prototype is right, it is already the app.
An application starts from a document, then grows by being talked to: "add a filter to this list", "make the sidebar collapsible", "show the total in red when it's negative". Each request becomes a reviewed revision. A run of revisions becomes a change set, a portable file that works like a plugin, and whole features move between applications: the planetarium below reuses the presentation editor's slide sorter. A person's own version of an app is shared as one file too, and every install is a proposal they review before it lands.
flowchart LR
app["📦 An application<br/>one live document"]
ask["💬 You ask<br/>'add a filter to this list'"]
propose["🤖 An agent proposes<br/>a revision"]
approve["✅ You preview,<br/>accept or reject"]
plugin[("🧩 Change set<br/>or feature")]
catalogue[("🌍 Shared<br/>others can install")]
app --> ask --> propose --> approve --> plugin --> catalogue
catalogue -. "install" .-> app
classDef step fill:#EEF2FF,stroke:#6366F1,color:#312E81
classDef win fill:#10B981,stroke:#047857,color:#fff
class app,ask,propose,approve step
class plugin,catalogue win
The direction: applications as complex as the professional tools people use every day, in one format, rendered natively, and shaped by the people who use them while they run.
Thirteen applications, from everyday apps to professional tools, all in the same format. They are examples
(examples/), not part of the library, and each carries the AI assistant in its bottom right
corner: ask for a change in plain words, or Point at the part to change first, then review the proposal it
becomes. Each is a Lisp program (examples/<app>/lisp/) in the dialect's idiomatic style, small named views and
functions with their text in English, Spanish and French, and keeps the same app as a JSON document beside it
(examples/<app>/json/): choose which opens in the Launcher's Settings. Calamaio, the text editor reprogrammed
from inside, is Lisp only.
<sub>The AffrescoUI Launcher, itself one live document: every application one click away, your own apps, a new app made blank, from an example or from a description, a catalogue of apps and features to install after review, and the AI provider every app's assistant uses.</sub>
| Forge · an IDE<sub>Explorer, editor tabs and split editors, find and replace, quick open and a command palette, problems, output and a terminal, source control, a debugger and language servers, in dark, light and high-contrast themes. examples/forge/lisp/index.screen.lisp, with --folder DIR to open a folder</sub> | Tempera · an image editor<sub>Tools with flyouts and a context options bar, layers with masks, groups and adjustment layers, brushes, selections, history and a navigator, on a tiled image engine. Agents may only propose: every change is reviewed. examples/tempera/lisp/index.screen.lisp</sub> |
| Sinopia · a presentation editor<sub>A ribbon with tabs and galleries, slide thumbnails in sections, a canvas with shapes, zoom and fit, speaker notes and undo. Its slide sorter is a part that other applications install. examples/sinopia/lisp/index.screen.lisp</sub> | Modello · a 3D modeller<sub>A lit 3D viewport with gizmos, an outliner, a properties editor, a timeline, search over every command and glTF import. Every scene edit is a revision, reviewed and undoable. No C++ of its own. examples/modello/lisp/index.screen.lisp</sub> |
| Quaderno · a code editor<sub>Open files and folders, tabs, a minimap, a quick switcher over files, symbols and lines, Find in Files, a command palette and a console. examples/code-editor/lisp/index.screen.lisp</sub> | Orrery · a planetarium<sub>A 3D solar system, the sky from the ground, an orbit graph and a timeline of eclipses. Its bodies strip is Sinopia's slide sorter, installed from that app. Built by an outsider from the public docs. examples/orrery/lisp/index.screen.lisp</sub> |
| Haven · a smart-home dashboard<sub>Rooms by floor, a floor plan, scenes, lights, climate, blinds and media, automations as a node graph with schedules, energy charts, security and notifications, on simulated devices. examples/haven/lisp/index.screen.lisp</sub> | Tempo · a music player<sub>Playlists, a 3,000-song library, albums and artists, a queue to reorder, now playing with a visualiser and lyrics, an equaliser and a mini player. Playback is simulated. examples/tempo/lisp/index.screen.lisp</sub> |
| Streak · a habit tracker<sub>Daily habits with goals and schedules, scores, charts, a calendar, notes and reminders, all kept on disk, written as a Lisp program. examples/streak/lisp/index.screen.lisp</sub> | Arcadia · a game launcher<sub>A library and a store with carousels, game pages, downloads, a wishlist and a cart. Built by an outsider from the public docs. examples/arcadia/lisp/index.screen.lisp</sub> |
| Flow · a Kanban board<sub>Boards with swimlanes, a table and a timeline of every card, a card drawer, a burndown, drag and drop with a keyboard alternative, undo and a command palette. examples/flow/lisp/index.screen.lisp</sub> | Sign in · accounts<sub>Sign in and sign up, two-step codes, a password reset, a sample external provider, an account page and session expiry, all validated in the document. examples/sign-in/lisp/index.screen.lisp</sub> |
Open them from the Launcher (./build/affrescoui_launcher), or run one with ./build/affrescoui_launcher <file>.
None has native code of its own: files, the terminal and pixels are the library's. In Lisp, every app speaks
English, Spanish and French (Sign in: English, Italian and Arabic, right to left).
AffrescoUI renders what it is told to: an application is a folder of documents (and, in a program that embeds the library, any native code it registers), and the engine knows nothing else about it. It is built in three layers, each made only of the one below:
- Apps : folders of files (screen documents, data, assets) that the Launcher opens, with nothing compiled for them.
- Themes (
modules/themes): the kits' components (toolbars, menus, docks, dialogs) and the themes' design tokens, as JSON files built into the library. - Engine (every other module): mechanisms only. It looks a component or token a document doesn't define up in the installed kits and themes, and knows none of them by name; a document's own components win over the kits'.
A change travels down a stack of layers, each with one job.
%%{init: {"theme": "base", "flowchart": {"nodeSpacing": 30, "rankSpacing": 34, "padding": 14, "wrappingWidth": 400}, "themeVariables": {"fontFamily": "Helvetica, Arial, sans-serif", "fontSize": "14px", "lineColor": "#94A3B8", "primaryTextColor": "#0F172A", "edgeLabelBackground": "#FFFFFF"}}}%%
flowchart TB
studio(["<b>You</b> · the app's assistant or a script"])
agent(["<b>AI agent</b> · Claude Code"])
mcp["🤖 <b>MCP server</b> · mcp/<br/>connects AI agents, both ways"]
channel["🔌 <b>Channel</b> · modules/channel, modules/net<br/>local sockets · processes · WebSocket · one session per peer"]
vcs["🛡️ <b>Version control</b> · modules/vcs<br/>allow / ask / deny · proposals · commits · history"]
format["📄 <b>Screen format</b> · modules/format<br/>checks the document · evaluates it · reconciles in place"]
lisp["λ <b>Lisp language</b> · modules/lisp<br/>builds a program's tree · runs its functions"]
render["🎨 <b>Renderer</b> · modules/render<br/>layout · shaped text · input · accessibility · OpenGL"]
themes["🧩 <b>Kits and themes</b> · modules/themes<br/>components · design tokens · JSON"]
agent --> mcp
mcp --> channel
studio --> channel
channel -- "revision" --> vcs
vcs -- "accepted commit" --> format
format -- "panels" --> render
themes -. "components, tokens" .-> format
lisp -. "programs" .-> format
classDef peer fill:#FFFFFF,stroke:#CBD5E1,color:#0F172A
classDef c_mcp fill:#F3E8FF,stroke:#9333EA,stroke-width:1.5px,color:#3B0764
classDef c_channel fill:#E0F2FE,stroke:#0284C7,stroke-width:1.5px,color:#0C4A6E
classDef c_vcs fill:#FEF3C7,stroke:#D97706,stroke-width:1.5px,color:#78350F
classDef c_format fill:#D1FAE5,stroke:#059669,stroke-width:1.5px,color:#064E3B
classDef c_render fill:#EDE9FE,stroke:#7C3AED,stroke-width:1.5px,color:#4C1D95
class studio,agent peer
class mcp c_mcp
class channel c_channel
class vcs c_vcs
class format c_format
class themes c_format
class lisp c_format
class render c_render
- Written in Lisp. An app is a program in AffrescoUI Lisp (LISP.md ,
modules/lisp): named definitions (defscreen,defview,defstate,defn,defcommand,defkey,defcustom,add-hook,advice), run by the library's own interpreter. Each definition is versioned on its own, so a diff names the view or function that changed, and a proposal is rebuilt and judged by the tree it builds. The language can't reach files, processes or the network. Its only ways out are the steps a host grants, each checked against who wrote the code that is running. - One document, drawn natively. What a program builds is a screen document (SCREEN_FORMAT.md , with aJSON Schema ): layout, components, themes, state, bindings, events, timers, services and permissions. It can also be written directly in JSON, for data and tools. Behaviour that usually needs code (wiring a button to a list, validating a form, filtering, drag and drop, shortcuts, navigation, calls to services) is declared, so an agent changes it as safely as a colour.
- Compact for agents. Edits address nodes by id (
{"set": {"#title/text": "Q4"}}, stored as JSON Patch) and re-reads return only what changed: a typical edit is 28 tokens, a re-read after one commit 27 (BENCHMARKS.md ). When the person points at a part, the agent reads only the definition that built it. - Apps that agents can use. An app's commands are tools: an agent lists them, runs one under its own name and the
app's
runrules, never the person's, and can undo its runs (VERSION_CONTROL.md ). - Swappable layers. Modules talk only through the interfaces in
modules/core, andaffresco::Screenplugs them together. No public header exposes OpenGL or GLFW, and each module links on its own (affrescoui::render,affrescoui::vcs, ...) or all together (affrescoui::affrescoui). - Features travel. A part declares the contribution points and contracts it needs, so one application installs another's feature, checked before it lands. A feature can hold Lisp code, which runs with its author's authority, and a person's version of an app is shared as one file (VERSION_CONTROL.md ).
modules/core/ the interfaces between modules: Executor, Channel, VersionControl, Services, Network
modules/render/ windows, panels, layout, shaped text, input, accessibility; OpenGL 4.1 core or ES 3.0
modules/format/ the screen format: rules, checker, {{expressions}}, the runtime that reconciles in place
modules/themes/ the kits' components and the themes' design tokens, as JSON built into the library
modules/notation/ documents read and written in JSON or in the Lisp notation
modules/lisp/ the Lisp language, a Clojure dialect: reader, interpreter, programs built purely into a document
modules/data/ an app's records in SQLite, kept apart from its document: models and migrations
modules/audio/ sound: voices of files, streams and generators, mixed to the system's output
modules/vcs/ version control: commits, proposals, permissions, history
modules/channel/ peers and the live protocol over local sockets and processes
modules/net/ HTTP(S), server-sent events, WebSocket, remote peers
modules/services/ language servers, local programs and folders the host grants
modules/intelligence/ the providers an app's assistant asks (APIs or a command line), behind the assistant capability
modules/screen/ affresco::Screen, the composition root, and the umbrella header affresco/affresco.hpp
modules/automation/ scenarios: scripted input, expectations, golden images
modules/imaging/ layered images on copy-on-write tiles
modules/scene3d/ 3D scenes, glTF 2.0 in and out
modules/export/ panel trees as vector PDF
modules/capi/ the C API, affresco/affresco.h
mcp/ the MCP server for AI agents
apps/server/ the document server: shared, persistent documents over WebSocket
apps/host/ the stock host, affrescoui_launcher: it opens an app's folder and asks for what the app uses
examples/ the apps (each with a lisp/ and a json/ folder), the Launcher among them, the assistant add-on
catalogue/ the apps' versions and features the Launcher's Catalogue lists and installs
editors/ a VS Code extension, and a clj-kondo configuration for the Lisp programs
web/ the WebAssembly build
The layers, the path of a revision and of an event, and the security boundary: ARCHITECTURE.md.
An AffrescoUI app is a program in AffrescoUI Lisp, a sandboxed dialect of Clojure with its own runtime, built into
the library (LISP.md has every definition and rule in tables; modules/lisp, RFC
0005, RFC 0006). Its forms, functions and reader forms are
Clojure's: of 186 everyday Clojure forms, 163 give Clojure's own value and the other 23 are left out or differ on
purpose (everyday.lisp, checked on every test run). It is measured against Clojure's
cross-dialect test suite too (CONFORMANCE.md), every difference is written down with
what to write instead (differences.md), and clj-kondo lints the programs with
its configuration. Every example is written in its idiomatic style
(style.md). The program is a folder of small, named definitions. Building it gives
the document the engine draws, and its functions run whenever a button is pressed, a key is typed or a bound value
changes. From Flow's own code (examples/flow/lisp/flow.lisp):
(ns flow.flow)
(defn cards-of "A column's cards, in their order." [c]
(:cards (column c)))
(defn next-order "The order that puts a card at the end of a column." [c]
(->> (cards-of c) (map :order) (reduce max -1) inc))
(defn column-of "The column that holds a card, or -1." [ref]
(or (first (keep-indexed (fn [c col]
(when (some #(= (:ref %) ref) (:cards col)) c))
computed.columns))
-1))
| You define | In AffrescoUI Lisp |
|---|---|
| The window, as an outline of its parts | defscreen main |
| Its parts, small and named | defview ,defcomponent |
| Its data | defstate ,defcomputed |
| Its looks | deftokens ,defstyle ,defmenu |
| What it does | defn ,defcommand |
| Shortcuts and settings | defkey ,defcustom |
| Extension points | defhook ,add-hook ,advice |
| Its text, in every language | (t "key") andlocales/<language>.lisp |
| Its files | (ns board.index (:require "toolbar.lisp" ...)) |
The document a program builds can also be written directly in JSON. The engine reads both: every example ships a
lisp/ and a json/ folder, and the Launcher's Settings choose which one opens. The two are the same app. Their first
frames match pixel for pixel, they pass the same scenarios, and they share one history, the same diffs and the same
permissions. In tests of the same changes made both ways, an AI agent edited Lisp as accurately as JSON, at about the
same cost (BENCHMARKS.md).
| Lisp: the program you write | JSON: the document it builds |
|---|---|
(defview card-view "One card, in bold when it is a bug." [card]
`(label#card :text ~card.title :bold ~(= card.tag "bug")))
(defscreen main :window {:title "Board"}
(column#cards
~(repeat [card state.cards] (card-view card))))
|
{ "type": "column", "id": "cards", "children": [
{ "type": "label", "id": "card",
"repeat": { "for": "card", "in": "state.cards" },
"text": "{{card.title}}",
"bold": "{{(card.tag == 'bug')}}" } ] }
|
A running app can be reprogrammed from inside. In Calamaio, the text editor among the examples, open the scratch
buffer (C-x b *scratch* RET), type a new definition of a command and evaluate it with C-M-x:
(defcommand kill-line "Says so." :title "Kill Line" :category "Killing" [] (message "redefined"))
The next C-k runs the new definition, and C-x C-z takes it back. describe-key, apropos and the describe-*
functions inspect the running program.
Your own editor can do the same in any Lisp app: start it with --nrepl and connect any nREPL client. The window asks
once whether to let that editor evaluate as you; then every definition you evaluate lands as your own revision, in the
file your buffer is (LISP.md).
./build/affrescoui_launcher examples/flow/lisp/index.screen.lisp --nrepl
Only the definition that changed is rebuilt, and the running app is updated where that definition is read.
- Every change is a revision. Each evaluation revises one definition: it is kept in history, shown in diffs and undone like any other change.
- An agent's code is reviewed. It arrives as a proposal, rebuilt from its source and judged by what it builds. Once accepted, it still runs with the agent's authority, never the person's.
- Your authority covers only what you typed. Text pasted in or written by someone else runs with less, unless you read it in a question the app itself draws (no document or agent can draw or answer it) and say yes.
- Hooks and advice can't take your commands down. An agent's hooks and advice run sealed: they can't stop a person's command from working.
| A from-scratch C++23 engine onOpenGL 4.1 core or ES 3.0 (WebGL2 in the browser). No browser engine, no web view. A change updates only what reads it, only what changed is redrawn, text is sharp at every display scale, and an idle window sleeps. | A whole app in one readable document: layout, components, state, {{expressions}} , events, services. Changes arecompact edits by node id, atomic, and reconciledin place . | Content-addressed commits, proposals as branches with live preview , diff, and anundo of any earlier change that keeps the later ones ;allow /ask /deny rules and change budgets. An AI can change your app butcan never approve its own changes . |
| A two-way MCP server : requests from the app reach the agent, with what you pointed at, and its revisions and replies come back. Agents also run the app's commands as tools, under rules of their own. Works with Claude Code out of the box. | Clients, agents and scripts connect over local sockets, or over the network through the document server. Identity comes from the connection, never from what a peer claims. | Any run of revisions exports as a change set , a small portable file that anyone with the same application can review and install. A whole version of an app shares as one file, installed only after review. |
%%{init: {"theme": "base", "flowchart": {"curve": "basis", "nodeSpacing": 28, "rankSpacing": 46, "padding": 14}, "themeVariables": {"fontFamily": "Helvetica, Arial, sans-serif", "fontSize": "14px", "lineColor": "#94A3B8", "primaryTextColor": "#0F172A", "edgeLabelBackground": "#FFFFFF"}}}%%
flowchart LR
subgraph P["Who changes it"]
direction TB
you["<b>You</b><br/>the app's assistant"]
ai["<b>AI agent</b><br/>Claude Code · MCP"]
any["<b>Scripts & apps</b><br/>any socket client"]
end
subgraph V["Version control"]
direction TB
rules{"<b>Permission rules</b><br/>deny · ask · allow"}
pr["<b>Proposal</b><br/>branch · live preview"]
no["<b>Rejected</b><br/>nothing changes"]
end
subgraph E["Engine"]
direction TB
main[("<b>main</b><br/>SHA-256 commits")]
rt["<b>Runtime</b><br/>reconcile in place"]
gl["<b>Renderer</b><br/>C++23 · OpenGL"]
end
app(["<b>Your running app</b><br/>never restarts"])
you & ai & any -- "revision" --> rules
rules -- "allow" --> main
rules -- "ask" --> pr
rules -- "deny" --> no
pr -- "you accept" --> main
main --> rt --> gl --> app
classDef peer fill:#FFFFFF,stroke:#CBD5E1,stroke-width:1px,color:#0F172A
classDef gate fill:#FFFBEB,stroke:#D97706,stroke-width:1.5px,color:#78350F
classDef wait fill:#FFFFFF,stroke:#D97706,stroke-width:1px,stroke-dasharray:4 3,color:#78350F
classDef stop fill:#FFFFFF,stroke:#E11D48,stroke-width:1px,color:#9F1239
classDef core fill:#EEF2FF,stroke:#6366F1,stroke-width:1.5px,color:#1E1B4B
classDef out fill:#0F172A,stroke:#0F172A,color:#FFFFFF
class you,ai,any peer
class rules gate
class pr wait
class no stop
class main,rt,gl core
class app out
style P fill:#F8FAFC,stroke:#E2E8F0,color:#64748B
style V fill:#F8FAFC,stroke:#E2E8F0,color:#64748B
style E fill:#F8FAFC,stroke:#E2E8F0,color:#64748B
linkStyle 0,1,2 stroke:#94A3B8
linkStyle 3 stroke:#16A34A,stroke-width:2px
linkStyle 4 stroke:#D97706,stroke-width:1.5px
linkStyle 5 stroke:#E11D48,stroke-width:1.5px
linkStyle 6 stroke:#16A34A,stroke-width:2px
linkStyle 7,8,9 stroke:#6366F1,stroke-width:2px
- Anyone can propose a change. The host (
affrescoui_launcher) renders a screen and listens for peers on local sockets. You ask through the app's assistant, pointing at what to change if you like; the AI answers through the provider chosen in the Launcher, or an agent connects through the MCP server, which works both ways; any script can connect too. Every change is arevision of compact edits. - The permission rules decide:
denyrefuses,asksends the change to review,allowapplies it. Rules judge what a changedoes , not how it is written. Flow's rules, for example, let the person's own client change anything, ask before an agent changes behaviour, and protect the status bar from everyone. - You review proposals. A proposal is a branch, like a pull request: the agent can refine it while you preview it live. ThenAccept ,Always allow (don't ask again for that part of the screen) orReject with a reason. The modesaccept edits andplan change how much is asked.
- Accepted changes become commits on
main, with SHA-256 ids, the author and the approver. The runtime updates the running app in place, keeping focus and typing. Any commit can be undone, keeping the changes made after it (where one was built on it, you choose), or restored (VERSION_CONTROL.md ).
cmake -S . -B build && cmake --build build
./build/affrescoui_launcher # the Launcher: every app, your own apps, the AI settings
In the Launcher's Settings, choose the AI the assistants use: Anthropic, OpenAI, an OpenAI-compatible server (such as Ollama) or your Claude Code login, and a model. Keys stay in the system's keychain. Every app you open then has a working assistant, with no MCP. To connect an AI agent through MCP instead (mcp/README.md):
claude mcp add affrescoui -- python3 /path/to/AffrescoUI/mcp/affrescoui_mcp.py
claude --dangerously-load-development-channels server:affrescoui # requests are pushed into the session
Open Flow and ask "add a Blocked column between In progress and In review" in the board's assistant. Claude changes the running board and the change comes back as a proposal: Accept it and the app updates in place, or Always allow to stop being asked about that part of the screen.
./build/affrescoui_launcher examples/haven/lisp/index.screen.lisp # any application, no C++
./build/affrescoui_launcher examples/flow/lisp/index.screen.lisp --mode acceptEdits # agent changes apply unless a rule asks
./build/affrescoui_launcher examples/flow/lisp/index.screen.lisp --plugin my.json # start with a change set applied
Requires CMake 3.25 or later and a C++23 compiler; CMake fetches the pinned dependencies
(cmake/dependencies.json). CI builds and tests it on Linux, Windows and macOS, where it is
developed; web/ builds it for the browser. ctest --test-dir build runs the unit
tests, every application's scenarios and the rendering check, which compares each frame with a golden image, pixel
for pixel (tests/render/README.md).
#include <affresco/affresco.hpp>
int main() {
affresco::Application app;
affresco::Screen screen = affresco::Screen::fromFile("app.screen.json");
screen.createWindow(app);
screen.onAction("save", [&](affresco::Panel&) { /* native code, if needed */ });
screen.listen(app, "/tmp/my-app/agent.sock", "agent"); // optional: let other programs change it live
return app.run();
}
find_package(AffrescoUI REQUIRED) # or add_subdirectory(AffrescoUI) / FetchContent
target_link_libraries(my_app PRIVATE affrescoui::affrescoui)
From C or another language, the C API (affresco/affresco.h) loads, drives and embeds a screen; bindings/python
wraps it.
Everything the engine does #
- Screen format: layout (anchors, rows, columns, grids, splits, tabs, scrolling, overlays), styles, components
with parameters and slots, themes and tokens, fonts, screens and navigation, state,
computed,watch, JS-style{{expressions}},repeat/when/let/check, two-waybind, events with bubbling, commands, menus, keybindings and settings, drag and drop, timers, animations, channels,persist, includes, strings with ICU plurals and locales. - Nodes: labels, text areas, a code editor with declarative languages and syntax trees, diffs, lists, trees and virtualised tables, node graphs, timelines, calendars, vector paths, an editable canvas, images and image operations, raster layers, 3D scenes, native OpenGL surfaces, colour pickers, gradients and curves, plus a kit of desktop and chat components.
- Live documents: in-place reconciliation; revisions as compact edits or JSON Patch, atomic, by
#id; any number of peers over local sockets, processes or the network; request and reply relaying; asking the agents from inside the app, pointing at what to change; updates that run only what read the change (dependency tracking). - Version control: SHA-256 commits, an append-only
main, proposals as branches with merge commits, log, diff, blame, revert, restore, an undo that keeps later changes, three-way merges,HEAD~1names;allow/ask/denyrules judged by effect, modes, grants, budgets, reviewers, protected controls, approvals pinned to the version reviewed; change sets, packages of a whole app and a catalogue, each installed after review; history on disk. - Services and network: language servers and local programs the host allows, folders it grants, HTTP(S), server-sent events, WebSocket, sign-in, and a document server that shares documents live.
- Agents: a two-way MCP server with minified reads, outlines, single-node reads and changes-only re-reads, the source of what the person pointed at, pictures of the screen, scenarios, leases on parts, an app's commands as tools with run rules and undo, and authors set by the connection, never self-declared.
- Lisp: a sandboxed Clojure dialect, measured against Clojure's test suite; definitions versioned one by one, a changed one rebuilt alone; an nREPL server for editors, paired by the person.
- Engine: HarfBuzz shaping and FreeType glyphs with fallbacks, right-to-left text, colour emoji, display scales from 100% to 400% with text hinted sharp below 2×, damage redraws, the platform's accessibility API (VoiceOver, Narrator, Orca), headless windows for tests, vector PDF export.
- Tooling: the
affrescouiCLI (run, check, test, render, fmt, convert between JSON and Lisp, migrate, import from A2UI and Adaptive Cards, export, pack and install, a REPL), scenarios with golden images, a VS Code extension, a clj-kondo configuration, a C API with a Python binding, a WebAssembly build.
| Document | What it covers |
|---|---|
| LISP.md | AffrescoUI Lisp in tables: every definition, views and bindings, running, layout of an app, limits, tools |
| SCREEN_FORMAT.md | The screen format, node by node |
| VERSION_CONTROL.md | Commits, proposals, permissions and review |
| modules/lisp/README.md | The Lisp language: its values, special forms, functions and limits |
| ARCHITECTURE.md | The modules, the path of a revision and of an event, the security boundary |
| mcp/README.md | The MCP server and its tools |
| BENCHMARKS.md | Speed, memory and token budgets, with every measurement |
| ACCESSIBILITY.md | What screen readers see and drive, on every platform |
| SECURITY.md | The trust model, what is protected, and how to report a vulnerability |
| CHANGELOG.md | What changed in each release |
AffrescoUI started in December 2017 as sGLGUI, when I was 16, as a way to teach myself OpenGL and C++: nested panels, pixel/percent sizing, anchors and a signal/slot event system, all from scratch. In 2018 I added a text area. It collected keystrokes but could never draw them, and the project stalled. A restart in 2020 rewrote the layout engine (the image on the right is that demo), then stalled again.
In 2026 I revived it with Claude Code. The first goal was a library you could actually use: we ported it to OpenGL 4.1 core, rewrote it in C++23 and finally rendered text. Then an idea sparked: what if an AI agent could change a native app while it runs, and you approved every change? That took it far beyond the original plan: UIs described in JSON, live revisions, version control and a two-way MCP bridge for AI agents.
How it was built. To be clear about it: all of the 2026 code was written by Claude Code, through agent-driven development. What I brought is the direction and the architecture. I shaped it over many iterations, trying an idea, looking at what it did and changing course, until it worked the way I wanted. The git history shows every step.
timeline
2017 : Started at 16 : nested panels, anchors, signal → slot events
2018 : A text area that can't draw text : the project stalls
2020 : Restarted : new layout engine, stalled again
2026 : Revived with Claude Code : C++23 · OpenGL 4.1 core · real text : live JSON screens · version control · MCP
Apache License 2.0: free to use, modify and distribute, commercially or not. Anyone who distributes it must pass on the NOTICE file, which credits the author. See LICENSE and THIRD_PARTY_NOTICES.md.
Created by Riccardo Sottini · 2017–2026
<sub>If AffrescoUI made you think "wait, an AI can change a native app while it runs?", leave a ⭐.</sub>