# Sean Filimon > Entrepreneur and product engineer. Guides, articles, and resources on building developer tools, distributed systems, and cloud platforms. Full content from 37 pages. Professional network: 2,350 LinkedIn connections across 1,792 organizations, as of Nov 2026. The full list is in the NETWORK section at the end. ============================================================ PROJECTS ============================================================ # Better Compute (https://seanfilimon.com/projects/better-compute) An embeddable TypeScript control plane for GPU, CPU, and bare-metal capacity. Tracks what hardware exists, what is free, and who holds it, with double-booking impossible by construction. Better Compute is an embeddable control plane for GPU, CPU, and bare-metal capacity. It tracks what hardware exists, what is free, and who holds it — and the database referees every booking, so double-booking is impossible by construction. It also makes machines useful: adopt a running server, deploy an image over PXE, run a VPS or a sandbox on your own hosts or a provider's, and hand capacity to customer tenants with their own networks and firewall rules. Better IAM handles identity, authorization, and billing. GitHub · better-compute.com --- # Better Files (https://seanfilimon.com/projects/better-files) Embeddable data rooms for TypeScript applications, built on Better IAM. Rooms, versions, permissions, guests, NDA gating, watermarking, e-signature, and a tamper-evident activity log. Better Files brings data rooms into your own TypeScript application. Install it, call a factory with your database and storage, and mount it into the framework you already use. It is a library, not a hosted service. It covers everything a serious data room needs — rooms, folders, versions, granular permissions, guests, NDA gating, watermarking, share links, Q\&A, e-signature, legal holds, and a tamper-evident activity log — with files encrypted at rest under a key per room. Identity and authorization come from Better IAM. GitHub --- # Better IAM (https://seanfilimon.com/projects/better-iam) An embeddable TypeScript authentication, identity provisioning, and access-management platform. Runs in your application with your database. Better IAM is an embeddable authentication, identity provisioning, and access-management platform for TypeScript. You install it from npm, point it at your own database, and it runs inside your application — no separate hosted identity service to call out to. It covers the whole identity surface in one library: multi-tenant directories, sign-in methods from passwords to passkeys, enterprise SSO and SCIM, fine-grained authorization with roles and policies, temporary credentials, and a tamper-evident audit log. Better IAM is also the foundation for Better Compute and Better Files, which use it as their identity provider and policy decision point. GitHub · better-iam.com --- # Foltrac (https://seanfilimon.com/projects/foltrac) Cross-cloud deployment platform with full visibility. One pipeline, every provider. Foltrac came from deploying the same service across three cloud providers and losing hours to inconsistent dashboards. One pipeline, every provider. A unified dashboard showing health across AWS, GCP, and Azure simultaneously. --- # LegionEdge (https://seanfilimon.com/projects/legionedge) Parent company behind Nokuva, Foltrac, Tavoc, and W0rktree. Building the next generation of developer tools. LegionEdge is the parent company behind Nokuva, Foltrac, Tavoc, and W0rktree. Every product under LegionEdge starts from the same premise: the tools developers use every day are broken, and nobody is fixing them properly. Nokuva is the premier AI-native design editor. Foltrac unifies cross-cloud deployment into a single pipeline. Tavoc is an IDE purpose-built for monorepo speed. W0rktree replaces Git with a version control system designed for the realities of modern software teams. Different problems, same company, same team, same obsession with getting developer tooling right. AMD featured our custom AI model work in LegionEdge advances custom AI models with AMD. --- # Nokuva (https://seanfilimon.com/projects/nokuva) The premier AI-native design editor. Describe your vision, refine on a real canvas, build your design system, and convert to production-ready code. Design tools that jump straight from prompt to code skip the entire design phase — the exploration, refinement, and token systems that make products scalable. Nokuva is the professional design editor rebuilt for the AI era. Full visual editor with layers, frames, and an infinite canvas. AI that generates designs, not code dumps. A design token system. The Figma feel — but AI-native from the ground up. ## design-first-code-second The central thesis. When you skip design and go straight to code, every iteration costs engineering hours, token bloat from AI code generation eats your budget, no design system means inconsistent UI across features, and UX issues become expensive technical debt. Nokuva keeps you in the cheap phase until it is right. ## design-first-code-second Fixing a spacing issue in a visual editor: 30 seconds. Fixing the same issue in production: 30 minutes to 3 hours. The design phase is not overhead. It is leverage. ## the-canvas Every element on the Nokuva canvas is a VNode — a lightweight, JSON-serializable object that represents a real HTML element. Not vectors. Not screenshots. Not code previews. ## the-canvas A `div` on the canvas is a `div` in the VNode tree. A heading is an `h1`. A button is a `button`. The 40+ element primitives span layout, typography, forms, media, and interactive categories. What you see on the canvas is exactly what developers get. ## the-canvas The visual editor provides the muscle memory of professional design tools: ## the-canvas Infinite canvas with multi-page support and frame-based artboards with device presets ## the-canvas Complete layer tree with drag-and-drop reordering, visibility, locking, and grouping ## the-canvas Visual inspection overlays — click any element, see every property ## the-canvas Pixel-level control over spacing, typography, and hierarchy ## the-canvas Direct manipulation with alignment guides and snapping ## virtual-dom-architecture VNodes are the fundamental unit. Each VNode carries: ## virtual-dom-architecture **type** — the HTML element type (`div`, `h1`, `button`, `nav`, etc.) ## virtual-dom-architecture **props** — element attributes and class names ## virtual-dom-architecture **styles** — CSS properties that reference design tokens (`var(--primary-600)`, `var(--spacing-4)`) ## virtual-dom-architecture **children** — nested VNodes forming the component tree ## virtual-dom-architecture **meta** — design tokens referenced, Tailwind class mappings, component membership ## virtual-dom-architecture Everything is JSON-serializable. The entire canvas can be saved, version-controlled, diffed, and restored. The AI generates VNodes directly — structured JSON, not code strings. The conversion to code reads the same tree the canvas renders. No translation layer. No handoff. ## multi-agent-ai Not a single model doing everything poorly. Six specialized agents with focused context: ## multi-agent-ai **Orchestrator** — understands intent and decomposes it into tasks for the right specialists. ## multi-agent-ai **Plan Agent** — produces structured blueprints before canvas work begins, preventing the common failure mode of generating without planning. ## multi-agent-ai **Design Theme Agent** — builds complete color systems with oklch palettes, semantic naming, dark mode variants, and proper contrast ratios. ## multi-agent-ai **Design Spec Agent** — handles typography selection from 250+ Google Fonts, type scale generation, spacing systems, and shadow hierarchies. ## multi-agent-ai **Frame Builder Agent** — constructs the VNode tree on the canvas using theme and spec tokens as constraints, ensuring every element references the design system. ## multi-agent-ai **UI Agent** — converts the perfected design to clean, tokenized production code. Reads the canvas state, not the original prompt. ## multi-agent-ai Each agent sees only what it needs. The Theme Agent does not see the layout. The Frame Builder does not make color decisions. Specialization produces better results than a generalist model trying to hold everything simultaneously. ## design-token-system Tokens from day one. Every VNode references tokens instead of literal values: ## design-token-system **Colors** — hex and oklch with full palette generation. Primary, secondary, accent, neutral, and semantic scales (50-950). Light and dark mode. ## design-token-system **Typography** — font family, size scale (configurable ratio), weight scale, line height, letter spacing. 250+ Google Fonts with fuzzy search. ## design-token-system **Spacing** — consistent rhythm from a configurable base unit (4px default). Named tokens from `spacing-1` through `spacing-24`. ## design-token-system **Border radius** — small, medium, large, full. Consistent across every component. ## design-token-system **Shadows and elevation** — layered shadow system with semantic names (sm, md, lg, xl). ## design-token-system All editable from a dedicated Theme Editor panel. Change a token value and every element using it updates instantly across every frame and page. The Theme Editor is not buried in settings — it is a first-class panel alongside the layer tree and inspector. ## real-time-collaboration SpacetimeDB — an in-memory relational database with built-in real-time subscriptions. Not WebSocket relay with bolted-on conflict resolution. ## real-time-collaboration Every canvas change is a database operation. Every subscriber gets updates instantly: ## real-time-collaboration **Live cursors and selections** from every team member at database latency ## real-time-collaboration **Per-node granular updates** — move a button, subscribers get the delta for that node, not a full-frame reload ## real-time-collaboration **Collaborative undo/redo** that respects each user's history independently ## real-time-collaboration **Advisory node locking** — see who is editing what in real-time ## real-time-collaboration **Presence detection** — active, idle, or away status without polling ## real-time-collaboration The dual-database architecture pairs SpacetimeDB for real-time canvas state with PostgreSQL for persistent data — authentication, billing, accounts, audit logs, and asset storage. Each database handles what it is good at. ## asset-libraries **10,000+ icons** from 8 libraries: Material Design, Heroicons, Feather, Font Awesome, Ionicons, Ant Design, and more ## asset-libraries **250+ Google Fonts** with fuzzy search and instant loading ## asset-libraries **Professional component collection**: navigation bars, hero sections, feature grids, pricing tables, testimonials, footers — all tokenized and theme-aware ## asset-libraries Everything declared as JSON — serializable, AI-readable, version-controllable. No external dependencies. No broken imports. ## code-output The perfected design converts to clean, production-ready code. The conversion reads the VNode tree — the same structure rendered on the canvas — and outputs tokenized component code. CSS custom properties, Tailwind utilities, or both. ## code-output No regeneration bloat from re-prompting. No inconsistencies from prompt iteration. No inline values where tokens should be. Just intentional, structured code that reflects the design system. ## the-three-eras **Era 1 — Static Design (2000s)**: Photoshop, Sketch. Design as image manipulation. Output: PNGs and PDFs that developers rebuilt from scratch. ## the-three-eras **Era 2 — Collaborative Vectors (2010s)**: Figma, web-based multiplayer. Design as real-time vectors. Output: inspect panels and handoff links that developers interpreted. ## the-three-eras **Era 3 — AI-Native Design (2026+)**: Nokuva. Design as structured, code-aware documents. Output: tokenized, production-mapped designs that are the source of truth. AI generates from natural language. Virtual DOM means design equals code structure. SpacetimeDB means real-time at database speed. ## the-workflow **Describe your vision** — tell Nokuva what you want in plain English ## the-workflow **AI generates your design** — structured layout on a real canvas in seconds ## the-workflow **Refine and iterate** — visual editor with layers, frames, inspect panels, pixel-level control ## the-workflow **Build your system** — tokens, themes, components in the Theme Editor ## the-workflow **Convert to code** — clean, tokenized, production-ready output from the perfected design ## the-workflow Design interfaces at the speed of thought. --- # OpticEngine (https://seanfilimon.com/projects/opticengine) Backend server engine for building and scaling systems with a full integrated admin panel. OpticEngine is a backend server engine designed for building and scaling systems with minimal configuration. It comes with a full integrated admin panel, giving you visibility and control over your entire infrastructure from a single dashboard. --- # Tavoc (https://seanfilimon.com/projects/tavoc) IDE built for speed and monorepo workflows with sub-millisecond file switching. Tavoc exists because my IDE choked on a monorepo with 200k files. Built from scratch for the workflows monorepo developers actually use — fast file switching, cross-package navigation, and workspace-aware search. --- # W0rktree (https://seanfilimon.com/projects/worktree) Next-generation distributed version control system built in Rust. Replaces Git with multi-tenant architecture, real-time collaboration via staged snapshots, declarative access control, native large file handling, and append-only history. Git solved the problems of 2005. W0rktree replaces it entirely — a new version control system designed from scratch for the realities of 2026: monorepos with thousands of contributors, multi-tenant organizations, real-time collaboration, fine-grained access control, license compliance, and performance that scales. W0rktree is not a Git wrapper, not a Git hosting platform, not a layer on top of Git. It is its own system with its own protocol, its own storage model, its own identity system, and its own history model. It speaks Git when needed — for migration and interop — but Git is a compatibility target, not a dependency. ## the-two-runtime-architecture W0rktree is split into two cooperating runtimes. Neither is optional. Neither duplicates the other. ## the-two-runtime-architecture The **local background process** (`worktree-bgprocess`) runs on the developer's machine. It watches files in real-time using OS-native APIs (inotify, FSEvents, ReadDirectoryChangesW), creates snapshots automatically as the developer works, manages branches, handles local merges, and orchestrates sync with the server. It is the only process that touches the working directory. ## the-two-runtime-architecture The **remote server** (`worktree-server`) is the canonical source of truth. It stores authoritative history, enforces access control, aggregates staged snapshots for team visibility, manages license compliance, enforces branch protection rules, and provides APIs for the admin panel, CLI, and SDKs. ## the-two-runtime-architecture This separation is a core architectural constraint: the bgprocess never enforces access control, the server never watches files, the bgprocess never stores canonical history, the server never creates auto-snapshots. ## trees--the-fundamental-unit Trees replace Git repositories, submodules, and monorepo directory conventions with a single model. Each tree has its own snapshot history, its own branches, its own access rules via `.wt-tree/access/`, and its own ignore patterns. Trees can be nested, creating hierarchies where each level maintains independence. ## trees--the-fundamental-unit A microservices project might have one tree per service. A multi-platform app might have trees for frontend, backend, mobile, and shared libraries. Each tree gets its own `.wt-tree/` folder for configuration. Every tree can be synced independently — a frontend developer does not need to download the entire backend history. ## snapshots--not-commits Snapshots are immutable, content-addressed records of a tree's complete state at a point in time. They are created automatically by the bgprocess or manually via `wt snapshot`. There is no staging area, no index, no `add` command. The developer's job is to write code; the version control system's job is to capture it. ## snapshots--not-commits Key properties: immutable once created, content-addressed (identical states produce identical hashes), complete state (captures the full tree, not a delta), and append-only (snapshots are only ever added, never removed or reordered). ## staged-snapshot-visibility This is the feature that changes how teams collaborate. ## staged-snapshot-visibility In Git, your work is invisible until you push. There is no middle ground — either you push work-in-progress to a branch or you stay silent. W0rktree introduces staged snapshots as a visibility layer between local work and branch history. ## staged-snapshot-visibility The bgprocess syncs snapshots to the server automatically. Your team can see which files you have changed, which branch you are on, and how far along you are — but nothing enters branch history until you explicitly run `wt push`. Staged snapshots can be discarded without any trace in history. ## staged-snapshot-visibility The server aggregates staged snapshots across all team members and warns when two developers have staged changes to the same files. Not a block — an advisory. Just enough information to coordinate before a conflict happens instead of after. ## declarative-access-control Access control is defined in TOML files alongside the code. Changes to access rules go through the same snapshot and review process as code changes. The full history is in the snapshot log. Policies are diffable, auditable, and version-controlled. ## declarative-access-control W0rktree ships with five built-in roles (Owner, Admin, Maintainer, Developer, Viewer) and supports custom roles with over 20 atomic permissions. The system combines RBAC with ABAC for conditional access based on tenant attributes like department, location, or security clearance. ## declarative-access-control A permission ceiling model ensures safety at scale: root `.wt/access/` defines maximum permissions across the worktree, each tree's `.wt-tree/access/` can only restrict further. The server enforces the ceiling — a misconfigured tree policy that tries to grant more than its parent allows is rejected. ## declarative-access-control Path-level access requires explicit path registration in `config.toml` — no globs, no wildcards, no regex. This is intentional: predictable, auditable, O(1) lookup, and refactoring-safe. ## multi-tenant-architecture Every actor in W0rktree is a tenant — a user or organization with verified identity. Tenants own worktrees, grant cross-tenant access, and are the unit of authentication throughout the system. ## multi-tenant-architecture Organization tenants support multiple accounts, teams for group-based access control, and role hierarchies. Cross-tenant collaboration is built into the protocol: a tenant can grant read, write, or admin access to specific trees for other tenants, with optional expiration. ## multi-tenant-architecture Worktrees have three visibility modes: private (only owner and explicit grants), shared (discoverable by listed tenants), and public (readable by all authenticated tenants, write requires explicit grants). ## license-compliance-engine W0rktree tracks licenses at the file path level using SPDX identifiers. The server enforces license compliance on every sync, export, fork, and copy operation. Both IAM and license checks must pass for an operation to succeed — a tenant with full admin permissions still cannot redistribute proprietary code without a license grant. ## license-compliance-engine Three grant levels control what tenants can do with licensed code: read-only (view within the platform), modify (edit but cannot export), and redistribute (full permission). License metadata travels with the code through forks, exports, and archives. Proprietary paths are automatically excluded from public archives and Git exports. ## native-large-file-handling There is no separate LFS system. Files exceeding a configurable threshold are automatically split into content-addressable chunks using the FastCDC algorithm. Chunk boundaries are determined by content, not fixed offsets — small edits to a large file only produce new chunks for the changed regions. ## native-large-file-handling The bgprocess serves large file content through platform-native virtual filesystems: FUSE on Linux, FUSE-T on macOS, and ProjFS on Windows. Applications see regular files. The lazy loading is invisible to editors and build tools. Cloning a tree does not require downloading every file. ## append-only-history There is no rebase. There is no `reset --hard`. There is no force-push. History is a record, not a narrative. If you make a mistake, you create a new snapshot that fixes it. The original remains in history because that is what happened. ## append-only-history One merge model instead of four. No accidental data loss from a bad command. Teammates can always find a common ancestor. Soft deletes with configurable recovery windows mean nothing is permanently destroyed immediately. A full reflog is maintained both locally and server-side with configurable retention. ## cross-tree-dependency-system W0rktree tracks dependencies across trees at three levels: tree dependencies (declared in config), branch dependencies (linked branches that must merge together), and snapshot dependencies (individual requirements on work in other trees). ## cross-tree-dependency-system When a frontend developer needs a backend endpoint, `wt depend add` creates a structured TODO in the backend tree, links the branches for synchronized merging, and notifies the backend team. Linked branches enforce atomicity — if `frontend/feature-oauth` merges to main, then `backend/feature-oauth` must also merge. The server prevents partial feature deployments. ## sync-protocol Communication between bgprocess and server uses gRPC over QUIC (with HTTP/2 fallback). QUIC provides connection migration (laptop moves from WiFi to cellular without dropping), multiplexed streams, 0-RTT reconnection, and built-in TLS 1.3 encryption. ## sync-protocol Delta sync ensures only changed objects are transferred. Have/want negotiation identifies what the server already has. Large file chunks are deduplicated at the server level. All data in transit is compressed with zstd. When the server is unreachable, the bgprocess continues all local operations and catches up on reconnection. ## storage-architecture All objects are content-addressed using BLAKE3 hashing — faster than SHA-256, with tree-hashing mode for large inputs. Object types include blobs, tree objects (directory listings), snapshots, manifests (large file chunk references), deltas, tags, and branches. ## storage-architecture Local storage lives in platform-appropriate locations (not in the working directory). The server maintains per-tenant namespace isolation with configurable storage quotas. Pack files group objects for efficient transfer with delta compression. Garbage collection runs periodically, with grace periods before actual deletion. ## configuration-hierarchy Configuration follows a strict hierarchy: system defaults, user global config, root `.wt/config.toml`, tree `.wt-tree/config.toml`, subtree overrides, and environment variables (highest priority). Everything from snapshot intervals to sync behavior to rename detection thresholds is configurable at any level. ## configuration-hierarchy The `.wt/` directory at the worktree root contains configuration, access rules, identity, hooks, reflog, and conflict metadata. Each tree's `.wt-tree/` directory holds tree-specific overrides. Both are version-controlled alongside the code. ## git-compatibility W0rktree speaks Git when needed. `wt init --from-git` imports a Git repository with full history. Live mirror mode keeps a W0rktree and a Git remote in bidirectional sync for gradual adoption. Developers on W0rktree use `wt` commands while developers still on Git use `git` commands — both see the same history. ## git-compatibility The goal is risk-free adoption. Try W0rktree on one team. If it works, expand. If it does not, the Git remote has everything. ## design-philosophy Every design decision in W0rktree follows six constraints enforced by the protocol: ## design-philosophy **One job per command.** No `checkout` that creates branches, switches branches, and restores files. `wt branch create`, `wt branch switch`, `wt restore` — each command does exactly one thing. ## design-philosophy **Plain terminology.** Snapshot, tree, switch, restore — words that mean what they say without requiring explanation of internal data structures. ## design-philosophy **Automatic by default.** Auto-snapshots, auto-sync, auto-merge for non-conflicting changes. The developer's job is to write code, not babysit version control. ## design-philosophy **Append-only history.** Enforced by the protocol, not by convention. ## design-philosophy **Non-destructive operations.** Soft deletes with recovery windows. A full reflog server-synced. Accidental data loss requires active effort. ## design-philosophy **Real-time collaboration.** Staged snapshot visibility is a core protocol feature, not an add-on. ## design-philosophy W0rktree is not the next version of Git. It is what comes after Git. ============================================================ BLOG ============================================================ # Building Nokuva — the thought process behind AI-native design (https://seanfilimon.com/blog/building-nokuva) The decisions, constraints, and convictions that shaped a design editor built for the AI era from the ground up. ## the-gap-nobody-was-filling I did not set out to build a design tool. I set out to fix a workflow that was costing every team I worked with weeks of wasted effort. ## the-gap-nobody-was-filling The pattern was the same everywhere. Designers create mockups in Figma. Developers interpret the mockups and rebuild them in code. The rebuild never matches perfectly. Stakeholders request changes. Developers go back to code. The mockups drift out of sync. Within two sprints the Figma file is a historical artifact that nobody updates and nobody trusts. ## the-gap-nobody-was-filling Then the prompt-to-code tools arrived and the industry collectively decided the solution was to skip design entirely. Type a description, get code, ship it. No mockups, no handoff, no gap. ## the-gap-nobody-was-filling Except now there was a different gap. No exploration — you get one output per prompt. No refinement — you edit code or re-prompt. No system — every generated page is an island with its own inline values. The design phase was not eliminated. It was eliminated and nothing replaced it. ## the-gap-nobody-was-filling Nokuva started as a question: what if the design phase had its own AI-native tool? Not AI bolted onto a vector editor. Not AI that generates code. AI that generates designs on a real canvas with a real editor and a real token system. ## choosing-the-virtual-dom The first architectural decision was the most consequential. What is the fundamental unit on the canvas? ## choosing-the-virtual-dom Traditional design tools use proprietary vector formats. Figma has its own internal representation. Sketch has its own. These formats are optimized for rendering fidelity but bear no structural relationship to the code that developers write. A Figma frame and a React component might look the same but they are different data structures with different semantics. ## choosing-the-virtual-dom We chose HTML. Every element on the Nokuva canvas is a VNode — a lightweight, JSON-serializable object that represents a real HTML element. A `div` on the canvas is a `div` in the VNode tree. A heading is an `h1`. A button is a `button`. The 40+ element primitives span layout (`div`, `section`, `header`, `footer`, `main`, `aside`, `nav`), typography (`h1`-`h6`, `p`, `span`, `blockquote`), forms (`input`, `select`, `textarea`, `button`), media (`img`, `video`, `svg`), and interactive elements. ## choosing-the-virtual-dom This decision had three consequences we were betting on: ## choosing-the-virtual-dom **Design structure equals code structure.** There is no translation layer between what the designer sees and what the developer gets. The VNode tree is the component tree. Handoff is not interpretation — it is serialization. ## choosing-the-virtual-dom **AI reads and writes the native format.** The VNode is JSON. AI models are excellent at structured JSON generation. The multi-agent system generates VNodes directly, not code strings that need parsing. This is why generation is fast and accurate — the AI is working in its native medium. ## choosing-the-virtual-dom **Everything is serializable.** The entire canvas state can be saved as JSON, version-controlled, diffed, and restored. No proprietary binary formats. No lock-in. ## choosing-the-virtual-dom The trade-off was real: we gave up the infinite fidelity of vector graphics. But design tools for UI are not illustration tools. UI is made of HTML elements. Building a design tool on HTML elements means the tool speaks the same language as the output. ## the-multi-agent-architecture Early prototypes used a single model for everything. Describe a page, get a page. It worked — in the way that a Swiss Army knife works. It could do everything and it did nothing particularly well. ## the-multi-agent-architecture The layouts were structurally reasonable but the color choices were generic. When the color system was good, the typography was an afterthought. When everything looked decent, the component hierarchy was flat and unsemantic. ## the-multi-agent-architecture The breakthrough was separating concerns the way a design team separates roles. A design director does not pick fonts. A typographer does not choose the layout grid. Each role has focused expertise and a defined scope. ## the-multi-agent-architecture We built six agents: ## the-multi-agent-architecture **The Orchestrator** receives the user's intent and decomposes it into tasks. "A SaaS pricing page with three tiers, dark theme, gradient accents" becomes: establish a dark color system with gradient tokens, define a typography scale for marketing pages, build a three-column pricing layout with tier hierarchy, populate with content structure. ## the-multi-agent-architecture **The Plan Agent** takes the decomposed tasks and produces a structured blueprint — a JSON specification that describes what will be built before any canvas work begins. This prevents the common failure mode of AI generation: plunging into output without planning. ## the-multi-agent-architecture **The Design Theme Agent** builds color systems. Not "pick a blue." Full palette generation with semantic naming, oklch color space for perceptual uniformity, light and dark mode variants, and proper contrast ratios. The output is a set of design tokens, not CSS variables. ## the-multi-agent-architecture **The Design Spec Agent** handles typography and spacing. Font selection from 250+ Google Fonts, type scale generation (major third, perfect fourth, or custom), spacing systems based on a consistent base unit, and shadow/elevation hierarchies. Everything output as tokens. ## the-multi-agent-architecture **The Frame Builder Agent** constructs the actual canvas layout. It consumes the theme tokens and spec tokens as constraints, builds the VNode tree, applies the design system, and handles component hierarchy, alignment, and responsive structure. ## the-multi-agent-architecture **The UI Agent** handles code-level output when the design is ready for conversion. It reads the VNode tree with all resolved tokens and produces clean, tokenized code — not a re-generation from the prompt, but a direct conversion from the perfected design. ## the-multi-agent-architecture Each agent sees only what it needs. The Theme Agent does not see the layout. The Frame Builder does not make color decisions. Focused context produces better results than a generalist model trying to hold everything in memory simultaneously. ## spacetimedb-for-real-time-collaboration Most collaborative tools use WebSocket connections with a relay server. Client A makes a change, sends it to the server, the server broadcasts to Client B. Conflict resolution is bolted on — either last-write-wins, or operational transforms, or CRDTs layered on top of the message passing. ## spacetimedb-for-real-time-collaboration We wanted something fundamentally different. SpacetimeDB is an in-memory relational database with built-in real-time subscriptions. Every canvas change is a database operation. Every subscriber gets updates from the database directly. There is no message relay. There is no separate conflict resolution layer. The database is the collaboration engine. ## spacetimedb-for-real-time-collaboration What this enables: ## spacetimedb-for-real-time-collaboration **Per-node granular updates.** When you move a button, the database updates that node's position. Subscribers receive the delta for that node. Not a full-frame reload. Not a serialized canvas state. One node, one update. ## spacetimedb-for-real-time-collaboration **Live cursors and selections.** Each user's cursor position and selection state is a database row. Subscribing to cursor updates is subscribing to a table. The latency is database latency, not WebSocket-relay latency. ## spacetimedb-for-real-time-collaboration **Collaborative undo/redo.** Each user's operation history is stored in the database. Undoing your change does not undo someone else's. The database maintains the causal ordering. ## spacetimedb-for-real-time-collaboration **Advisory node locking.** Select a text element to edit it and the database marks it as locked by you. Other users see the lock indicator in real-time. Not a hard lock — an advisory that prevents accidental concurrent edits. ## spacetimedb-for-real-time-collaboration **Presence detection.** Active, idle, or away status per user. Updated by the database, not by periodic WebSocket pings. ## spacetimedb-for-real-time-collaboration The dual-database architecture pairs SpacetimeDB for real-time canvas state with PostgreSQL for persistent data — authentication, billing, accounts, audit logs, and asset storage. Each database handles what it is good at. SpacetimeDB handles the hot path. PostgreSQL handles the durable path. ## the-design-token-system Tokens were not an afterthought. They were the second decision after the Virtual DOM. ## the-design-token-system Every VNode can reference tokens instead of literal values. A heading does not have `color: #1a1a2e`. It has `color: var(--primary-900)`. A card does not have `padding: 24px`. It has `padding: var(--spacing-6)`. The token system includes: ## the-design-token-system **Colors**: hex and oklch with full palette generation. Semantic naming (primary, secondary, accent, neutral, success, warning, error) with numbered scales (50-950). ## the-design-token-system **Typography**: font family, size scale, weight scale, line height, letter spacing. All from a dedicated type scale generator. ## the-design-token-system **Spacing**: consistent rhythm based on a configurable base unit. 4px base gives you 4, 8, 12, 16, 20, 24, 32, 40, 48, 64, 80, 96. ## the-design-token-system **Border radius**: small, medium, large, full. Consistent across every component. ## the-design-token-system **Shadows and elevation**: layered shadow system with semantic names (sm, md, lg, xl). ## the-design-token-system All tokens are editable from a dedicated Theme Editor panel. Change a value and every element referencing that token updates instantly across every frame and page. The Theme Editor is not a settings page buried in a menu — it is a first-class panel alongside the layer tree and the inspector. ## the-design-token-system This is what prevents the inconsistency that plagues prompt-to-code workflows. When every element references tokens instead of literals, consistency is structural. You cannot accidentally introduce a rogue color value because the workflow encourages tokens by default. ## what-i-would-do-differently If I started over, I would build the Theme Editor first. We built the canvas and the AI generation pipeline before the token management UI was complete, which meant early designs used inline values that had to be retrofitted to tokens. Building the token system first would have made every subsequent feature cleaner. ## what-i-would-do-differently I would also ship a simpler agent architecture initially. Six agents is the right number for production quality, but two agents — a planner and a builder — would have been sufficient for the first usable prototype. We over-engineered the agent system before validating the core canvas experience. ## where-it-stands Nokuva is an AI-native design editor with a full visual editor, multi-agent AI generation, a design token system, and real-time collaboration via SpacetimeDB. The canvas supports 40+ HTML element primitives, 10,000+ icons from 8 libraries, 250+ Google Fonts, and a professional component collection including navigation bars, hero sections, feature grids, pricing tables, testimonials, and footers — all tokenized and theme-aware. ## where-it-stands The thesis has not changed since day one. Design is not overhead. It is leverage. The fastest way to ship quality is not to skip design. It is to design 50x faster. --- # Building W0rktree — the thought process behind replacing Git (https://seanfilimon.com/blog/building-worktree) The decisions, constraints, and convictions that shaped a new version control system from scratch. ## the-moment-it-clicked I did not wake up one morning and decide to replace Git. No one sane does that. Git is the most successful version control system ever built. It runs the infrastructure of nearly every software company on the planet. ## the-moment-it-clicked But I kept running into the same walls. Managing a monorepo across multiple teams, watching two engineers unknowingly rewrite each other's work for a week, debugging a production incident only to find the relevant history had been squashed and rebased into oblivion. And every time I hit a wall, the answer was the same: "Git was not designed for that." Add a wrapper. Install an extension. Use a platform feature. Work around it. ## the-moment-it-clicked The problem was never one thing. It was the accumulation. Access control bolted on by GitHub. Large files handled by a parallel system called LFS. Team visibility achieved through Slack messages and standups. History safety maintained by hoping nobody runs `--force`. None of these were integrated. All of them were essential. ## the-moment-it-clicked The question that started W0rktree was not "can we build a better Git?" It was "if we designed version control today, knowing what we know about teams, monorepos, compliance, and collaboration, what would we build?" ## choosing-rust The language choice came early and was not controversial. Version control is systems software. It touches every file on the developer's machine, runs continuously in the background, and needs to handle repositories with millions of files without becoming the bottleneck. ## choosing-rust Rust gave us memory safety without garbage collection pauses, fearless concurrency for the background process, and the kind of performance ceiling that means we are never the slow thing in the pipeline. The ecosystem was also mature enough — the content-addressable storage layer uses Blake3 for hashing, gRPC for the sync protocol, and CRDT data structures for eventual consistency in the collaboration layer. ## choosing-rust But honestly, the real reason was correctness. A version control system that corrupts data is worse than useless. Rust's ownership model catches entire categories of bugs at compile time that would be runtime surprises in C or Go. When you are building something people trust with their source code, that matters. ## the-two-runtime-split The earliest architectural decision — and the one that shaped everything — was splitting W0rktree into two cooperating runtimes. ## the-two-runtime-split Most version control systems are either local tools that optionally talk to a remote (Git) or hosted platforms that require a server (Perforce). We wanted both. A local process that is fast, works offline, and owns the developer's working directory. A server that is authoritative, enforces policies, and provides collaboration features. ## the-two-runtime-split The constraint we set was strict: the bgprocess never enforces access control, and the server never watches files. No overlap. No duplication. The bgprocess handles everything local: file watching, auto-snapshots, branch management, sync. The server handles everything shared: canonical history, IAM, compliance, visibility. ## the-two-runtime-split This split was not obvious at first. Early prototypes had the bgprocess validating access rules locally. It worked, but it meant every policy change had to propagate to every client before enforcement was consistent. Moving all enforcement server-side made the system simpler to reason about and impossible to bypass. ## killing-the-staging-area One of the first Git concepts we removed was the staging area. In Git, you `add` files to a staging area, then `commit` the staging area to history. This creates a two-step workflow where the developer manually curates which changes go into each commit. ## killing-the-staging-area The original purpose was sensible — it lets you commit part of your working state. But in practice, most developers either `git add .` everything or spend mental energy on staging choreography that does not improve the end result. ## killing-the-staging-area W0rktree has no staging area. No index. No `add` command. The bgprocess watches the filesystem and creates snapshots of the working state. If you want to capture a specific point, run `wt snapshot`. The snapshot captures everything. ## killing-the-staging-area This made auto-snapshots possible. The bgprocess can create snapshots on an interval or when enough files have changed, without requiring the developer to think about it. Your job is to write code. The version control system's job is to capture your work. ## why-we-banned-rebase This was the most debated decision. Rebase is deeply embedded in Git culture. "Clean up your branch before merging" is standard advice. Interactive rebase is considered a power-user feature, not a dangerous one. ## why-we-banned-rebase But rebase rewrites history. It changes parent hashes, which changes commit hashes, which means the commits you had are different objects from the commits on the remote. Force-pushing is required. Teammates who branched off your work find their branches pointing to commits that no longer exist. ## why-we-banned-rebase We decided early: history is a record, not a narrative. If you make a mistake, you create a new snapshot that fixes it. The mistake stays in history because that is what happened. This is how every other record-keeping system works — financial ledgers, audit logs, legal records. Version control should not be different. ## why-we-banned-rebase The trade-off is visible. Your history shows the actual development process, including the messy parts. We think that is worth it. One merge model instead of four. No accidental data loss from a bad command. Teammates can always find a common ancestor. ## staged-snapshots--the-feature-that-changes-teams The idea for staged snapshots came from watching teams. Two developers on the same branch, working on adjacent files, discovering at merge time that they had been stepping on each other for days. The standup three hours earlier had not surfaced it. The ticket board showed them assigned to different tasks. ## staged-snapshots--the-feature-that-changes-teams Git gives you two states: invisible (haven't pushed) or permanent (pushed to branch history). There is no middle ground. Either you push your work-in-progress — polluting the branch with half-finished commits — or you stay silent and surprise everyone at merge time. ## staged-snapshots--the-feature-that-changes-teams Staged snapshots are the middle ground. The bgprocess syncs your snapshots to the server as a visibility layer. Your team can see which files you have changed and which branch you are on. But nothing enters branch history until you explicitly push. ## staged-snapshots--the-feature-that-changes-teams The server aggregates staged snapshots across all team members and presents a real-time view of active work. When you push, the system warns you if someone else has staged changes to the same files. Not a block — an advisory. Just enough information to coordinate before the conflict happens instead of after. ## declarative-access-control Every enterprise team I have worked with has the same problem: Git permissions live in a web UI on GitHub or GitLab, disconnected from the code they protect. No one knows who changed a permission three months ago. There is no review process. The audit trail is platform-specific and non-portable. ## declarative-access-control W0rktree's access control is defined in TOML files stored alongside the code. Changes to access rules go through the same snapshot and review process as code changes. The full history is in the snapshot log. The policies are diffable, auditable, and version-controlled. ## declarative-access-control The ceiling model took longer to get right. A root `.wt/access/` defines maximum permissions. Each tree's `.wt-tree/access/` can restrict further but never expand. Subtrees restrict further still. The server enforces the ceiling — a misconfigured tree policy that tries to grant more than its parent is rejected. ## declarative-access-control This means you can delegate tree ownership to teams without worrying about permission escalation. The root policy is the safety boundary. ## designing-for-migration We knew from the start that nobody adopts a new version control system overnight. The Git compatibility layer was not an afterthought — it was designed alongside the native protocol. ## designing-for-migration `wt init --from-git` imports a Git repository with full history. Live mirror mode keeps a W0rktree and a Git remote in bidirectional sync, so teams can adopt incrementally. Developers on W0rktree use `wt` commands. Developers still on Git use `git` commands. Both see the same history. ## designing-for-migration The goal is to make adoption risk-free. Try W0rktree on one team. If it works, expand. If it does not, the Git remote has everything. No data loss. No big-bang migration. ## what-i-would-do-differently If I started over, I would write the specification documents first. We built a working prototype before fully specifying the sync protocol and the IAM model, which led to two rewrites of the permission engine when edge cases surfaced. ## what-i-would-do-differently I would also invest in the CLI experience earlier. The protocol and storage layer are the hard engineering problems, but developers interact with the CLI every day. The command names, the output formatting, the error messages — that is where adoption lives or dies. We got the one-job-per-command principle right early, but the output formatting went through four iterations before it felt right. ## where-it-stands-now W0rktree is open source. The core — snapshot engine, branch management, merge system, access engine — is implemented in Rust. The bgprocess runs on Linux, macOS, and Windows. The sync protocol handles staged snapshot visibility and branch synchronization. ## where-it-stands-now We are still building. The admin panel, the SDK event subscriptions, the full ABAC condition engine, and the policy simulation mode are in progress. The specification documents grow as the protocol stabilizes. ## where-it-stands-now But the foundation is solid. The architecture principles — one job per command, append-only history, non-destructive operations, real-time collaboration — are not aspirations. They are constraints enforced by the protocol. Everything built on top follows them. ## where-it-stands-now W0rktree is not the next version of Git. It is what comes after Git. --- # How I think about building products (https://seanfilimon.com/blog/how-i-think-about-building-products) Reflections on the product engineering mindset that shaped LegionEdge and everything I build. ## start-with-the-problem Every product I have built started with a problem I hit personally. Foltrac came from deploying the same service across three cloud providers and losing hours to inconsistent dashboards. Tavoc came from watching my IDE choke on a monorepo with 200k files. ## start-with-the-problem If I can't explain the problem in one sentence, I don't build the product. ## ship-the-smallest-useful-thing The first version of LegionEdge had one feature: generate a full-stack scaffold from a prompt. No teams, no collaboration, no marketplace. One feature, done well, that solved a real workflow gap. ## ship-the-smallest-useful-thing Scope creep kills startups faster than bad code. ## measure-with-your-hands Dashboards lie by omission. I use every product I ship, daily, as a real user. If I can't feel the friction, I'm too far from the product. --- # Design tokens as the foundation of consistency (https://seanfilimon.com/blog/nokuva-design-tokens-foundation-consistency) Inline values create inconsistency that compounds with every feature. Nokuva's token system makes consistency the default from the first component to the fiftieth page. ## the-inconsistency-tax Open any production application that was built without a design system. Inspect the CSS. Count the unique color values. Count the unique spacing values. Count the unique font sizes. ## the-inconsistency-tax A typical application without tokens has 30-50 unique colors when it needs 12-15. It has 20+ spacing values when it needs 8-10. It has 8-12 font sizes when a proper type scale uses 6-8. ## the-inconsistency-tax Each rogue value was reasonable when it was written. The developer needed a slightly darker border, so they picked a hex value. The designer wanted a bit more padding, so they specified 18px instead of the system's 16px. One-off decisions that are invisible individually and devastating collectively. ## the-inconsistency-tax This is the inconsistency tax. It compounds with every feature, every developer, every sprint. Fixing it after the fact means auditing every component, replacing every literal value with a token reference, and testing every screen. That is a project measured in weeks, not hours. ## tokens-as-the-unit-of-design A design token is a named value that represents a design decision. Not "the color blue" but "the primary brand color." Not "16 pixels" but "the base spacing unit." The name carries intent. The value can change without changing the name. ## tokens-as-the-unit-of-design Nokuva's token system covers five categories: ## colors Every color in Nokuva is a token. The system generates complete palettes in both hex and oklch color space: ## colors **Primary**: 50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950 ## colors **Secondary**: same scale ## colors **Accent**: same scale ## colors **Neutral**: same scale (used for text, borders, backgrounds) ## colors **Semantic**: success, warning, error, info — each with light and dark variants ## colors oklch provides perceptual uniformity: stepping from 400 to 500 looks like the same visual jump as stepping from 700 to 800. Hex values do not guarantee this. Two colors equidistant in hex space can look dramatically different to the human eye. ## colors The Design Theme Agent generates these palettes from a single seed color. Provide a brand blue and the agent produces the full primary scale, derives complementary secondary and accent palettes, generates the neutral scale, and creates semantic variants — all with proper contrast ratios for accessibility. ## typography The typography token system manages: ## typography **Font families**: selected from 250+ Google Fonts with fuzzy search and instant loading ## typography **Size scale**: generated from a configurable ratio (major third at 1.25, perfect fourth at 1.333, or custom). Sizes are named (`text-xs`, `text-sm`, `text-base`, `text-lg`, `text-xl`, `text-2xl`, through `text-6xl`) ## typography **Weight scale**: thin (100) through black (900), mapped to named tokens (`font-light`, `font-normal`, `font-medium`, `font-semibold`, `font-bold`) ## typography **Line height**: tight (1.15), normal (1.5), relaxed (1.75) — applied contextually (headings get tight, body gets normal) ## typography **Letter spacing**: tighter (-0.02em), normal (0), wider (0.05em) ## typography The type scale is not a flat list of sizes. It is a mathematical relationship. Each step up multiplies by the ratio. This creates visual rhythm — the jumps between sizes feel consistent because they are proportionally consistent. ## spacing Spacing tokens follow a base unit system. A 4px base generates: ## spacing Token ## spacing Value ## spacing Common use ## spacing `spacing-1` ## spacing 4px ## spacing Tight inline gaps ## spacing `spacing-2` ## spacing 8px ## spacing Icon-to-text gaps, compact padding ## spacing `spacing-3` ## spacing 12px ## spacing Small card padding ## spacing `spacing-4` ## spacing 16px ## spacing Standard padding, section gaps ## spacing `spacing-5` ## spacing 20px ## spacing Medium padding ## spacing `spacing-6` ## spacing 24px ## spacing Card padding, form gaps ## spacing `spacing-8` ## spacing 32px ## spacing Section padding ## spacing `spacing-10` ## spacing 40px ## spacing Large section gaps ## spacing `spacing-12` ## spacing 48px ## spacing Page section spacing ## spacing `spacing-16` ## spacing 64px ## spacing Hero padding ## spacing `spacing-20` ## spacing 80px ## spacing Major section breaks ## spacing `spacing-24` ## spacing 96px ## spacing Full section spacing ## spacing No magic numbers. Every spacing value in the design references a token. When the design team decides that `spacing-4` should be 18px instead of 16px (perhaps for better touch targets), one change in the Theme Editor updates every element using that token across the entire project. ## border-radius Four semantic tokens: `radius-sm`, `radius-md`, `radius-lg`, `radius-full`. Consistent rounding across every card, button, input, and container. No element has a bespoke border radius unless it is a deliberate design decision expressed as a new token. ## shadows-and-elevation A layered shadow system with semantic names: ## shadows-and-elevation **shadow-sm**: subtle depth for cards and inputs ## shadows-and-elevation **shadow-md**: moderate elevation for dropdowns and popovers ## shadows-and-elevation **shadow-lg**: prominent elevation for modals and dialogs ## shadows-and-elevation **shadow-xl**: maximum elevation for overlays ## shadows-and-elevation Each shadow token defines offset, blur, spread, and color values that respect the overall color palette. Dark mode shadows use different opacity and color values than light mode shadows — managed automatically by the theme system. ## the-theme-editor Tokens are not a hidden configuration file. They are managed from a dedicated Theme Editor panel — a first-class interface alongside the layer tree and the inspector. ## the-theme-editor The Theme Editor shows every token category with live previews. Click a color token to open the oklch picker. Adjust a spacing value and watch every element referencing it reflow in real-time on the canvas. Change a font family and see every heading and paragraph update instantly across every frame and page. ## the-theme-editor This is the critical workflow difference. In a prompt-to-code tool, changing the primary color means re-prompting every page that uses it. In Nokuva, changing the primary color means changing one token value. The propagation is instant and complete. ## live-theme-resolution When a VNode references `var(--primary-600)`, the canvas rendering engine resolves that token to its current value and renders the computed color. But the VNode data retains the token reference, not the resolved value. ## live-theme-resolution This distinction is important: ## live-theme-resolution **Canvas rendering** sees the resolved value (the actual blue) for visual fidelity ## live-theme-resolution **The VNode tree** stores the token reference (primary-600) for portability and consistency ## live-theme-resolution **Code export** outputs the token reference in the chosen format (CSS custom property, Tailwind class, or SCSS variable) ## live-theme-resolution Changing a token value triggers re-resolution for every VNode that references it. The canvas updates in real-time. No manual find-and-replace. No re-prompting. No rebuild. ## the-compound-effect The value of tokens is not in any single decision. It is in the compound effect across a project's lifetime. ## the-compound-effect Sprint one: three pages, 50 elements, all using tokens. Changing the primary color updates 50 elements. ## the-compound-effect Sprint ten: thirty pages, 2,000 elements, all using tokens. Changing the primary color still updates with one click. The cost of a brand refresh does not scale with the size of the project. It remains constant: change the token. ## the-compound-effect Without tokens, that same brand refresh at sprint ten means auditing 2,000 elements for the old color value, replacing each one, and testing every page for regressions. That is not a design task. That is a migration. ## the-compound-effect Design tokens are not a nice-to-have for large projects. They are the difference between a design system that scales and inline values that accumulate into debt. --- # Multi-agent AI: why one model doing everything produces mediocre results (https://seanfilimon.com/blog/nokuva-multi-agent-ai) Nokuva uses six specialized agents instead of one generalist model. Here is the architecture, the reasoning, and why specialization beats generalization in AI-assisted design. ## the-generalist-failure-mode Ask a single AI model to generate a complete landing page. You will get a landing page. It will have a hero section, some feature cards, maybe a testimonial block. The layout will be structurally sound. The typography will be readable. The colors will not clash. ## the-generalist-failure-mode And it will look like every other AI-generated landing page. ## the-generalist-failure-mode The failure mode of generalist AI is not incompetence — it is mediocrity. The model optimizes for the safest average across all design decisions simultaneously. Color choices converge toward the same handful of palettes the training data over-represents. Typography defaults to system fonts or the three most popular Google Fonts. Spacing is uniform because uniform spacing is never wrong, even when it is never excellent. ## the-generalist-failure-mode This is the single-model ceiling. Good enough across the board. Exceptional at nothing. ## how-design-teams-actually-work A senior design team does not have one person making every decision simultaneously. The process has layers: ## how-design-teams-actually-work **Intent and planning.** What is this page for? What is the hierarchy of information? What actions should the user take? A design director or product designer scopes the problem. ## how-design-teams-actually-work **Visual foundation.** What is the color system? What is the brand tone — warm, cool, energetic, restrained? A visual designer or brand designer establishes the palette and mood. ## how-design-teams-actually-work **Typography and rhythm.** What is the type scale? What font pairing balances personality with readability? How does the spacing system create visual rhythm? A typographer or design system specialist defines the rules. ## how-design-teams-actually-work **Layout and structure.** Given the color system, type scale, and spacing rules, how do the components arrange on the page? A UI designer builds the layout within the constraints the previous steps established. ## how-design-teams-actually-work **Code output.** When the design is finalized, a design engineer or frontend developer converts it to production code. ## how-design-teams-actually-work Each step has focused context. The typographer does not agonize over color. The layout designer does not reinvent the spacing system. Each role accepts constraints from the previous step and focuses entirely on its domain. ## six-agents-six-roles Nokuva's multi-agent architecture mirrors this division: ## the-orchestrator The entry point. Receives the user's natural language input — "A SaaS pricing page with three tiers, dark theme, gradient accents" — and decomposes it into structured tasks. ## the-orchestrator The Orchestrator does not generate designs. It understands intent, identifies which agents are needed, determines the execution order, and delegates. A pricing page with a dark theme triggers the Theme Agent for a dark palette with gradient tokens, the Spec Agent for marketing-appropriate typography, and the Frame Builder for a three-column tier layout. A simple button component might only need the Frame Builder with the existing theme. ## the-plan-agent Before any canvas work begins, the Plan Agent produces a structured blueprint. This is a JSON specification that describes the components, their hierarchy, their content structure, and their relationship to each other. ## the-plan-agent The blueprint prevents the most common AI generation failure: diving into output without planning. A pricing page generated without a plan might produce three identical cards with no visual hierarchy between tiers. The plan establishes that the middle tier is featured, the CTA buttons have different visual weights, and the price typography is the dominant element — before a single VNode is created. ## the-design-theme-agent Builds complete color systems. Not "here is a blue" but a full token hierarchy: ## the-design-theme-agent Primary palette: 50 through 950 in oklch color space for perceptual uniformity ## the-design-theme-agent Secondary and accent palettes with the same scale ## the-design-theme-agent Neutral palette for text, borders, and backgrounds ## the-design-theme-agent Semantic colors: success, warning, error, info ## the-design-theme-agent Dark mode variants with proper contrast ratios ## the-design-theme-agent Gradient tokens when requested ## the-design-theme-agent The Theme Agent outputs design tokens, not CSS. The tokens are format-agnostic — they resolve to CSS custom properties, Tailwind colors, or any other format at export time. ## the-design-spec-agent Handles typography and spacing. Selects fonts from 250+ Google Fonts based on the design intent (a SaaS marketing page gets different typography than a dashboard). Generates a type scale using configurable ratios — major third (1.25) for compact interfaces, perfect fourth (1.333) for editorial, or custom ratios. ## the-design-spec-agent Spacing follows the same principle: a base unit (typically 4px) generates a consistent scale. The Spec Agent defines which scale values map to semantic names — `spacing-1` through `spacing-20` — and sets guidelines for padding, gap, and margin usage. ## the-design-spec-agent Shadows and elevation round out the spec. A three-tier elevation system (sm, md, lg, xl) with consistent blur, spread, and offset values that respect the color palette's tone. ## the-frame-builder-agent The constructor. Consumes the theme tokens and spec tokens as constraints, then builds the actual VNode tree on the canvas. ## the-frame-builder-agent The Frame Builder is the only agent that creates canvas elements. It works within the design system the previous agents established, which means it cannot introduce a rogue color value or an off-system spacing unit. The constraints are architectural, not advisory. ## the-frame-builder-agent This is where component hierarchy gets built. A pricing section is not a flat group of elements — it is a `section` containing a heading group, a `div` with CSS grid for the tier cards, and each card is a structured subtree with header, price, feature list, and CTA button. The semantic HTML structure is intentional, not coincidental. ## the-ui-agent The final agent in the pipeline, invoked when the design is ready for code conversion. The UI Agent reads the perfected VNode tree with all resolved tokens and produces clean, tokenized component code. ## the-ui-agent The UI Agent does not re-generate from the original prompt. It converts from the canvas state. Every refinement the designer made — the adjusted padding, the swapped color, the restructured hierarchy — is in the VNode tree and therefore in the code output. The code reflects the design as it is, not as it was first generated. ## the-coordination-protocol Agents do not run in isolation. The Orchestrator manages a structured pipeline: ## the-coordination-protocol User input is decomposed into tasks ## the-coordination-protocol The Plan Agent produces a blueprint ## the-coordination-protocol The Theme Agent and Spec Agent run in parallel (they do not depend on each other) ## the-coordination-protocol The Frame Builder receives both the theme and spec as input constraints ## the-coordination-protocol The canvas renders the result ## the-coordination-protocol The user refines visually ## the-coordination-protocol When ready, the UI Agent converts the final state ## the-coordination-protocol Steps 3 and 4 are the key optimization. Color and typography are independent design decisions — they can be made in parallel. The Frame Builder needs both as input, so it waits. This parallelism is why generation feels fast despite involving multiple agents. ## specialization-over-generalization The multi-agent approach has a structural advantage that compounds over time: each agent can be improved independently. ## specialization-over-generalization When the color generation quality needs improvement, only the Theme Agent is updated. The Spec Agent, Frame Builder, and UI Agent are unaffected. When a new component pattern is needed, only the Frame Builder and Plan Agent need updates. When a new code output format is added, only the UI Agent changes. ## specialization-over-generalization In a single-model system, improving color generation means retraining or re-prompting the entire model, with unpredictable effects on layout, typography, and code output. Every improvement risks a regression in an unrelated domain. ## specialization-over-generalization One AI doing everything produces mediocre results across the board. Six AIs, each doing one thing well, produce results that are excellent in every domain. That is not a philosophical claim. It is an architectural one. --- # Real-time collaboration at database speed: SpacetimeDB vs. WebSocket relay (https://seanfilimon.com/blog/nokuva-real-time-collaboration-spacetimedb) Most collaborative tools relay messages through WebSocket servers. Nokuva uses an in-memory relational database as the collaboration engine. Here is why and what it enables. ## the-relay-model The standard architecture for real-time collaboration looks like this: ## the-relay-model Client A makes a change. The change is serialized into a message. The message travels over a WebSocket connection to a relay server. The relay server broadcasts the message to all other connected clients. Client B receives the message, deserializes it, and applies the change locally. ## the-relay-model This works. It has powered collaborative tools for over a decade. But it has structural limitations that become visible at scale: ## the-relay-model **Conflict resolution is a separate system.** The relay server passes messages. When two clients edit the same element simultaneously, something else — operational transforms, CRDTs, or last-write-wins logic — has to resolve the conflict. This resolution system is bolted onto the relay, not built into it. ## the-relay-model **Granularity is coarse.** Most relay-based systems serialize entire objects or frames as the unit of change. Move a button and the message might contain the entire frame state, not just the button's new position. The receiving client re-renders the full frame to apply the change. ## the-relay-model **Undo/redo is client-local.** Each client maintains its own operation history. Collaborative undo — undoing your changes without affecting someone else's — requires additional bookkeeping layered on top of the relay. ## the-relay-model **Presence is a polling mechanism.** "Is this user online?" is answered by periodic heartbeat messages. The relay server tracks when it last heard from each client and marks them as away after a timeout. ## the-database-model Nokuva replaces the relay server with SpacetimeDB — an in-memory relational database with built-in real-time subscriptions. ## the-database-model The difference is not cosmetic. Every canvas change is a database operation — an `INSERT`, `UPDATE`, or `DELETE` on a row in a table. Every connected client subscribes to the tables they care about. When a row changes, the database pushes the delta to all subscribers. There is no relay. There is no message broker. The database is the collaboration engine. ## per-node-granular-updates Every VNode on the canvas is a row in a SpacetimeDB table. When you move a button from position (100, 200) to (150, 250), the database updates that node's position fields. Subscribers receive the delta for that specific node — two numbers changed on one row. ## per-node-granular-updates Compare this with a relay model that serializes the entire frame: every node's position, style, children, and metadata, transmitted and deserialized by every client, even though only one node moved. ## per-node-granular-updates The difference is negligible for a canvas with 20 elements. For a canvas with 2,000 elements across multiple frames, per-node updates are the difference between real-time and "real-time with visible lag." ## live-cursors-at-database-latency Each user's cursor position and selection state is a row in a `cursors` table. Moving your cursor updates the row. Other clients subscribe to the cursors table and render the positions they receive. ## live-cursors-at-database-latency The latency is database write plus subscription push. No WebSocket round-trip to a relay server. No serialization of the full cursor state. One row, two fields (x, y), pushed to subscribers at the speed of an in-memory database. ## collaborative-undoredo Each user's operations are stored in an `operations` table with a user ID and a causal ordering. When you undo, the database reverses your most recent operation. Other users' operations are unaffected. ## collaborative-undoredo This is not special logic layered on top of a relay. It is a database query: "find the most recent operation by user X and apply its inverse." The database maintains the causal ordering. Undo and redo are reads and writes, not algorithmic complexity bolted onto a message system. ## advisory-node-locking Select a text element to edit its content and the database sets a `locked_by` field on that node's row. Every subscriber sees the lock indicator in real-time. Release the selection and the field clears. ## advisory-node-locking This is not a hard lock — other users can still select and edit the node if they choose. It is an advisory signal: "someone is working on this." Enough to prevent accidental concurrent edits. Not enough to block deliberate parallel work. ## advisory-node-locking The lock is a database field, not a distributed lock protocol. It has the consistency guarantees of the database and the latency of an in-memory write. ## presence-detection Each connected user has a row in a `presence` table with fields for status (active, idle, away), last activity timestamp, and current view (which frame, what zoom level). The database updates the status based on activity. Subscribers render the presence indicators. ## presence-detection No polling. No heartbeat messages. No timeout-based guessing. The database knows the state. Subscribers know the state. The latency between a user going idle and every other user seeing the idle indicator is the latency of a database update. ## the-dual-database-architecture SpacetimeDB excels at real-time state: canvas nodes, cursor positions, presence, operations. It is an in-memory database — fast, reactive, purpose-built for live collaboration. ## the-dual-database-architecture But not all data belongs in an in-memory database. Authentication tokens, billing records, account settings, audit logs, and asset metadata are durable data that needs the guarantees of a traditional database. ## the-dual-database-architecture Nokuva uses a dual-database architecture: ## the-dual-database-architecture Data ## the-dual-database-architecture Database ## the-dual-database-architecture Reason ## the-dual-database-architecture Canvas nodes and state ## the-dual-database-architecture SpacetimeDB ## the-dual-database-architecture Real-time subscriptions, per-node granularity ## the-dual-database-architecture Cursor positions ## the-dual-database-architecture SpacetimeDB ## the-dual-database-architecture Sub-millisecond update latency ## the-dual-database-architecture Operation history ## the-dual-database-architecture SpacetimeDB ## the-dual-database-architecture Causal ordering for collaborative undo ## the-dual-database-architecture Presence and locking ## the-dual-database-architecture SpacetimeDB ## the-dual-database-architecture Instant status propagation ## the-dual-database-architecture Authentication ## the-dual-database-architecture PostgreSQL ## the-dual-database-architecture ACID guarantees for security-critical data ## the-dual-database-architecture Billing and accounts ## the-dual-database-architecture PostgreSQL ## the-dual-database-architecture Transactional consistency for financial data ## the-dual-database-architecture Audit logs ## the-dual-database-architecture PostgreSQL ## the-dual-database-architecture Append-only durability for compliance ## the-dual-database-architecture Asset storage metadata ## the-dual-database-architecture PostgreSQL ## the-dual-database-architecture Referential integrity with external storage ## the-dual-database-architecture Each database handles what it is good at. SpacetimeDB handles the hot path — the data that changes every second and needs to reach every client instantly. PostgreSQL handles the durable path — the data that changes rarely and needs to be correct forever. ## the-cost-of-the-relay-model When collaborative features are built on WebSocket relay, each new feature requires its own message type, its own serialization format, its own conflict resolution strategy, and its own undo/redo logic. Adding cursor sharing is a project. Adding presence is another project. Adding node locking is another. ## the-cost-of-the-relay-model When collaborative features are built on a database, each new feature is a table and a subscription. Cursors are a table. Presence is a table. Locks are a field on the nodes table. The subscription infrastructure is the same for all of them. ## the-cost-of-the-relay-model The relay model has linear complexity growth per feature. The database model has constant infrastructure cost with table-level feature additions. At five collaborative features, the difference in engineering complexity is significant. At twenty, it is decisive. ## the-cost-of-the-relay-model Real-time collaboration at database speed is not a tagline. It is an architectural choice that makes every collaborative feature cheaper to build and faster to deliver. --- # Virtual DOM: why design structure equals code structure (https://seanfilimon.com/blog/nokuva-virtual-dom-design-equals-code) Every element on the Nokuva canvas is a VNode — a real HTML element, not a vector. Here is why that architectural decision changes everything about design-to-code workflows. ## the-translation-layer-problem Every design tool ships with an implicit promise: what you design here will become code over there. The gap between "here" and "there" is where projects lose weeks. ## the-translation-layer-problem Traditional design tools represent UI as vectors. Rectangles, ellipses, lines, text nodes — geometric primitives rendered to a canvas. These primitives look like UI but they are not UI. A rectangle with rounded corners and a text label inside it is not a button. It is a rectangle with text. The developer looks at it, recognizes the intent, and rebuilds it as an actual `