The Tom framework

A Dart/Flutter enterprise & AI ecosystem — explore every module and component, what it does, and how far along it is.

0
released
21
published
16
in the works
5
not started

What Tom is

The Tom framework is a Dart/Flutter ecosystem for building uniform enterprise applications — and for generating their business logic with AI. A Tom application is a Flutter client and a Dart server joined by a typed interface, with the server reaching external services and an application-owned MySQL/PostgreSQL database. Both halves are built on Tom Core, so every app gets the same guarantees by construction: a resource-driven configurable UI, full internationalization, uniform authentication and a four-state authorization system, one architecture, and uniform deployment, operations, and provisioning — regardless of how its business logic was written.

That business logic is produced by a staged, AI-assisted flow — manual specification → DocSpec → CodeSpec → implementation — orchestrated by ai_build, which scripts the steps on tom_flow, draws on tom_brain for the AI work through external interfaces, and executes dynamic, sandboxed code through D4rt. tom_reflection provides the runtime reflection that lets an application assemble itself. The same architecture can also host AI-generated agents: a server can expose tom_brain as a service whose agent surfaces run inside the Flutter client via tom_d4rt_flutter.

The seven building blocks

Tom is organised into seven areas. Five provide runtime and authoring capabilities, one is the AI cognition, and one is the process that creates applications.

  • Reflection — the base technology for runtime introspection and analyzer-based

API extraction. It lets applications assemble themselves at runtime and lets tools read a codebase's API without re-running the analyzer.

  • D4rt Interpreter — a sandboxed Dart interpreter family that runs and generates

code at runtime, with an analyzer-based line and an analyzer-free line sharing one bridge API. It is the dynamic-execution engine beneath Tom's scripting, creation flow, and agentic UI.

  • Tom Brain Agent — the intelligence layer: an OpenAI-format server that runs

D4rt procedures over a self-organising, dreaming graph memory, turning a language model into a process that produces answers rather than just tokens, bound to a user-dedicated assistant persona.

  • Docspecs/Codespecs Software Factory — the staged, AI-assisted process that

turns an idea into specified, generated, tested code, with full traceability from a requirement through DocSpec and CodeSpec to its implementation and test.

  • Build tools — the command-line machinery that builds, tests, documents, and

deploys the framework and its applications, all built on the shared tom_build_base CLI foundation.

  • Core Application Framework — the client+server foundation every Tom app is

built on, over a shared kernel and the tom_basics floor. It is what enforces the cross-cutting uniformity described above.

  • VS Code Extension and VS Code Scripting — Dart-first editor automation: a

TypeScript extension hosts a Dart bridge so framework tooling runs in Dart through D4rt with full VS Code API access.

How a Tom application is built

A Tom application is a client+server pair on Tom Core, and its business logic is produced by the DocSpec/CodeSpec Software Factory and authored in Tom Forge. Three views tell the story: the anatomy of the running application, the spec-to-code flow that derives it, and the development environment that drives that flow.

Anatomy of a Tom application

Anatomy of a Tom application — a Flutter client and a Dart server over a REST API, with the framework stack (tom_core_flutter, tom_flutter_ui, tom_core_server, tom_core_kernel, tom_basics) inside the application and the database, external services and tom_uam outside.

A Tom application is a Flutter client and a Dart server that talk over a REST API. Its whole framework stack lives inside the application: the client is built on tom_core_flutter and the tom_flutter_ui widget layer, the server on tom_core_server, all three rest on the shared tom_core_kernel, and that in turn stands on the tom_basics floor — so both halves share one type system and the same cross-cutting guarantees. Outside the application sit only the things it talks to at runtime: its own database, any external services the server integrates, and the tom_uam authentication/authorization server that issues and validates identities.

DocSpec/CodeSpec-driven development

DocSpec/CodeSpec-driven development — a free-form specification becomes a project definition, which fans out into detailed sub-documents (UI, Server API, Object model, Data model, and more as needed); each sub-document drives a matching CodeSpec, and each CodeSpec generates the corresponding part of the application.

The application's four facets — its UI, server API, object model, and data model — are not hand-written from scratch but derived. A free-form specification is distilled into a project definition (the initial, whole-application spec), which fans out into detailed sub-documents, one per facet the application needs — and as many more as it calls for. Each sub-document drives a matching CodeSpec — UI/forms, the abstract API definition, the abstract object-model classes, and the data-model classes — and each CodeSpec in turn generates the corresponding part of the running application. The chain keeps every generated artifact traceable back to the document, and ultimately the requirement, that produced it.

The development environment

The development environment — a manual specification seeds the creation flow (DocSpecs → CodeSpecs → Implementation); Tom Forge's three development surfaces point to the matching flow stages and all rely on a multi-role agent driver with D4rt access, which reaches out to the LLM providers (with Tom Brain as an optional layer in between).

Day to day, the creation flow simplifies to three stages — DocSpecs → CodeSpecs → Implementation — seeded by a manual specification that sits outside the automated pipeline. Tom Forge is the environment that drives those stages: it pairs each stage with a development surface (DocSpec development, CodeSpec development, Implementation), all of which run on a shared multi-role agent driver and tool set with D4rt access. That driver is what reaches out to the LLM providers; when richer, memory-backed cognition is wanted, Tom Brain can sit optionally between the driver and the raw providers.

Areas

Start with an area — the big picture — then drill into its components and modules.

Reflection

1 member
Reflection is the base technology that lets a Tom application assemble itself at runtime and lets tools read a codebase's API without re-running the analyzer.

D4rt Interpreter

1 member
The D4rt Interpreter is where Tom runs and generates Dart code at runtime, inside a permission-guarded sandbox, without ahead-of-time compilation.

Tom Brain Agent

1 member
Tom Brain is the intelligence layer of the Tom framework: from the outside it looks like an ordinary OpenAI-format LLM API server, but inside it is a single always-running engine that runs procedures — sandboxed D4rt scripts — over a self-organising, "dreaming" graph memory.

Docspecs/Codespecs Software Factory

0 members
The Docspecs/Codespecs Software Factory is the staged, AI-assisted process by which Tom applications are created — from an initial idea, through structured specifications, to working, tested code — with complete traceability from a business requirement to the implementation and the test that covers it.

Build tools

2 members
Build tools are the command-line machinery that develops, builds, tests, documents, and deploys the Tom framework and the applications made with it.

Core Application Framework

1 member
The Core Application Framework is the foundation every Tom application is built on: a Flutter client and a Dart server joined by a typed interface, both resting on a shared kernel.

VS Code Extension and VS Code Scripting

1 member
This area is how the Tom framework is developed inside the editor: a VS Code extension that hosts a Dart bridge, so framework tooling and automation can be written in Dart — the same language as the framework itself — with full access to the VS Code API.

Components

Each component is a family of modules — hover for its status mix, click to open its modules.

Basics

basics · 12 modules
20.6k loc · 1.2k tests · 18.9k test LOC
The foundation layer beneath the Tom stack: a minimal-dependency utility floor and the unified CLI/build framework, surrounded by focused libraries for console, network, crypto, chat, and documentation/workspace tooling.
0 rel 7 pub 2 wip 3 ns

Core

core · 9 modules
499.6k loc · 3.1k tests · 259.3k test LOC
The Flutter-client and Dart-server foundation every Tom application is built on, over a shared kernel and the tom_basics floor. It guarantees a resource-driven UI, i18n, authentication, four-state authorization, and uniform deployment by construction.
0 rel 0 pub 8 wip 1 ns

D4rt

d4rt · 13 modules
1.7M loc · 12.8k tests · 3.2M test LOC
D4rt runs Dart source at runtime in a permission-guarded sandbox. It is the dynamic-execution engine that lets Tom's AI scripting and flow layers generate and run code safely.
0 rel 11 pub 2 wip 0 ns

Reflection

reflection · 5 modules
28.7k loc · 420 tests · 285.5k test LOC
The reflection layer gives Tom programs runtime introspection and dynamic invocation, plus analyzer-based extraction of a codebase's API. It is the base technology behind auto-assembling Tom applications at runtime.
0 rel 2 pub 2 wip 1 ns

Vscode

vscode · 3 modules
97.5k loc · 1.5k tests · 19.5k test LOC
The VS Code extension ecosystem used to develop the Tom framework. A TypeScript extension hosts a Dart bridge that runs Dart scripts inside the editor with full VS Code API access, driven by a typed Dart scripting layer.
0 rel 1 pub 2 wip 0 ns