Skip to content

Repository files navigation

genesis

A framework-agnostic, bare-VM Component → Element keyed-reconcile engine — Flutter's element/reconciliation model extracted to pure Dart — and the layers built on it: a measurement domain, schema-first codegen, the A2UI v0.9 wire format, a terminal render backend, and an enforce/reject action substrate.

genesis is positioned as the substrate and framework-agnostic renderer for the A2UI ecosystem: it speaks the same v0.9 wire as Google's flutter/genui, but runs with no Flutter / dart:ui dependency, so an agent can author, drive, render, and act on a UI tree on a plain Dart VM.

The engine deliberately stops at Component → Element: it reconciles desired state into live identity, and what that identity spawns and owns — the artifact layer — is each consumer's to define (a character grid, a serialized observation, live processes). See "The artifact layer — deliberately not shipped" in the tree README, and docs/design/artifact-layer-extension-pattern.md for the four pieces a consumer defines, with typesetting, perception, and the_grid's Allocation Tree walked end to end.

Status: pre-1.0. The engine and domains are well-tested and ADR-grounded, but the composition layer is still experimental (see Stability) and some wire/render surface is deliberately deferred — see docs/release-scope.md.

Packages

Package (dir · pub name) What it is
tree · genesis_tree the engine — Component (immutable config) → Element (mounted node), BuildContext (a separate capability handle, never the element), BuildOwner (scheduler), keyed reconcile, and an experimental composition layer (Stateless/Stateful/State, InheritedComponent, Watch, HookComponent — hooks, MultiChildComponent, and the SingleChildComponent/Nest chain)
perception · genesis_perception the measurement domain, rebuilt on the tree spine by subclassing
taxonomy · genesis_taxonomy schema-first node catalog → a Dart factory registry and an LLM tool schema (codegen, one source of truth)
dialogue · genesis_dialogue the A2UI v0.9 wire: the updateComponents codec, a receive-side surface that reconciles re-emissions by key, and action-message parsing
typesetting · genesis_typesetting a bare-VM cell/ANSI render backend — render-bearing tree vocabulary (a terminal A2UI renderer Flutter structurally can't offer)
consent · genesis_consent the enforce/reject action substrate: validates an action by hit-testing the live tree against catalog-declared affordances, enforcing or refusing with a structured, side-effect-free outcome
tmux · genesis_tmux a zero-dependency, injection-safe tmux client for supervising long-lived agent panes — off-spine, depends only on meta

Plus apps/console (genesis_console, publish_to: none) — the terminal driver app that renders an A2UI surface to a character grid and drives it from natural language.

The dependency arc: tree ← perception; taxonomy (codegen); dialogue (consumes taxonomy + tree); typesetting (render backend on tree); consent (consumes dialogue + taxonomy + the live tree); tmux sits off-spine (no genesis_* dependencies).

Build & test

A Dart pub workspace driven by Melos.

dart pub global activate melos   # once
dart pub get                     # resolve the workspace
melos run test                   # all package tests
melos run analyze                # dart analyze
melos run format                 # formatting check

Pure Dart, no Flutter — everything runs on the bare VM.

Design model

Consumers of genesis_tree follow the D–H tree-consumption doctrine: five rules for dependency tracking, reactive reads, service boundaries, pure descriptions, and I/O.

genesis is built decision-first, tracked in the decision register at docs/decisions/:

  • the register itself — every AI-made API/naming/semantic decision lands here directly, status: accepted on write, per the format specified by engineering.memento/decisions's SPEC.md (which now carries the rule the retired ADR-0000 register-rule document used to state): "Entries are born accepted. This profile never uses proposed." A later challenge to a filed entry runs through SPEC.md's docket, not a hand-edit.
  • the six foundational entries — foundations, schema-first codegen, the A2UI wire format, render backends, the projection/action substrate, and the pull-free build — are dated 2026-06-11 through 2026-06-17 with adr-000N slugs, e.g. 2026-06-11-adr-0001-foundations.md.

Read the foundations entry before changing anything structural.

Stability

The tree composition layer (Stateless/Stateful/State, InheritedComponent, Watch, HookComponent, MultiChildComponent, SingleChildComponent/Nest) is marked EXPERIMENTAL and may change before 1.0. The core spine (Component/Element/BuildContext/BuildOwner/keyed reconcile) and the measurement domain are stable in shape. Deferred surface and the 1.0 boundary are tracked in docs/release-scope.md.

Releasing

All packages publish to pub.dev under the memento.engineering verified publisher, following the house rules in docs/publishing.md: pre-publish gates (workspace green, an internal-references scrub over everything the archive ships, a clean dry-run), pre-1.0 version discipline (breaking changes bump the minor; additive/fix/docs bump the patch), dependency-order publishing, and a <pub-name>-v<version> tag per release.

License

BSD-3-Clause.

About

A framework-agnostic, bare-VM Seed → Branch keyed-reconcile engine — Flutter's element model extracted to pure Dart — plus the A2UI v0.9 wire, a terminal render backend, and a schema-first node catalog.

Topics

Resources

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages