Skip to content

Nomos: domains compiled to OpenAPI, MCP, CLI and SDKs

Nomos is a system for expressing business domains in a way that compiles to multiple interface formats.

The problem

Every domain ends up implemented multiple times:

  • Once as an API (REST, GraphQL)
  • Once as CLI commands
  • Once as SDK methods
  • Once as agent tool definitions

Each implementation drifts. Invariants are enforced inconsistently. Documentation lags reality.

The solution

Define the domain once, in a typed, validated format. Compile to all targets.

Nomos provides:

  • Single source of truth: The domain model is authoritative
  • Generated interfaces: OpenAPI, MCP tools, CLI, SDKs all derived
  • Enforced invariants: Business rules checked at compile time
  • Consistent documentation: Generated from the same source

For agents, this means they interact with domains through well-typed, well-documented interfaces that cannot contradict each other.

Current Implementation (Dart/Firebase)

The current Nomos implementation is in Dart, running on:

  • Cloud Firestore: Document database for domain state
  • Cloud Functions for Firebase: Backend logic and API endpoints
  • Cloud Storage for Firebase: File and blob storage
  • Firebase Authentication: User identity

This stack powers the CO2 Target Asset Management project.

Migration Path

We’re migrating Nomos to TypeScript with a pluggable backend:

  1. TypeScript Port: Rewrite core in TypeScript with Effect-TS
  2. Cloudflare Migration: Primary target using Workers, D1, Durable Objects
  3. Convex Option: Alternative backend for simpler domains

The TypeScript version will support multiple backends through a persistence abstraction layer.

Depends On

Uses Supplier Primitives

Uses Tooling

Supports Thesis

Enables Products

Enables Projects