λεξις — When the Diagram Is the Code

A formal language designed for the era of human–AI collaborative computation. Ten geometric primitives. Five ontological levels. One unified notation where drawing and programming are the same act.

The Problem

Software systems are designed in one notation (diagrams, whiteboards, flowcharts) and implemented in another (code). This translation gap is where intent is lost, where AI assistants hallucinate, and where formal verification becomes impractical.

λεξις collapses the gap. A λεξις diagram is the program. There is no translation step — only increasing levels of formalization applied to the same underlying structure.

Six Design Principles

Six principles found the language and explain why every design decision was made.

  1. P1 — Atomicity. Every construct is indivisible and composable. No implicit syntax, no hidden control flow.
  2. P2 — Geometric Density. One symbol carries dense semantics. Form = meaning = structure. Glyphs are drawn from universal geometric families, so no tokens are wasted.
  3. P3 — Bidirectionality. The same artifact is readable by a human and by a machine with identical fidelity.
  4. P4 — Visual Formality. The diagram is the code, not documentation. Structure is directly executable.
  5. P5 — Explicit Intent. Every statement declares who, what, why, and when.
  6. P6 — Monadic Composition. Everything is state transformation. Side effects are first-class, not exceptions.

Ten Primitive Atoms

Every λεξις program — no matter how complex — is built from ten irreducible primitives, organized into three geometric families. The family encodes a construct’s category from its shape alone, independent of the specific glyph.

Closed — entities that exist

Context (ctx)

Semantic domain frame: domain, agent, SLA, compliance. Every atom lives inside a context.

State (state)

Immutable state snapshot with an identity guarantee.

Open — entities that happen

Agent (agent)

Autonomous actor with declared identity and intent scope — human, ai, system, or hybrid.

Effect (effect)

Declared side effect with an event-emission contract.

Branch (branch)

Conditional or probabilistic routing.

Flow (flow)

Sequential, deterministic composition.

Parallel (parallel)

Concurrent composition — simultaneous execution of independent branches.

Bordered — entities that govern

Time (time)

Temporal constraint: deadline, duration, ordering.

Proof (proof)

Inline proof obligation: pre-condition, post-condition, invariant.

Fail (fail)

Explicit failure mode with a declared recovery path.

The Ontological Framework

Every atom carries an ontological level — the logical category you can read straight from the program’s structure. Each level has its own glyph shape in Morphē, so the shape tells you the category before you read a single label.

The five ontological levels and their Morphē glyph shapes L1 · Structure L2 · Flow L3 · Data L4 · Rule L5 · Role what exists what happens what is known what constrains who acts
The glyph is the level: hexagon, arrow, rectangle, diamond, ellipse. Same colors used inside Morphē.
L1Structure

What exists as stable elements — containers, hierarchies, institutions.

L2Flow

What happens over time, with order and transformation — processes, workflows, pipelines.

L3Data

What is known, represented, stored — records, snapshots, documents, states.

L4Rule

What constrains, permits, obliges, prohibits — norms, SLAs, proof obligations.

L5Role

Who acts, with what identity and authority — agents and actors.

Levels are not mutually exclusive. A real entity activates several at once — a hospital department is L1 + L4 + L5 (a structure that contains roles and applies rules); a patient record is L3 + L4 (data subject to retention and privacy). Badges at a node’s corners show the active combination.

Part of noema.tools

Everything in noema.tools is an atom — a minimal, typed, addressable unit of meaning. λεξις gives those atoms a formal, verifiable semantics.

And the tools talk to each other: your Claude Code sessions in Pragma become project memory that Morphē reads back as a live map of the real code.

See how the ecosystem fits together →

The Paper

The full language design — including formal grammar, ontological framework, proof calculus, and worked examples — is published open-access on Zenodo (CERN).

"λεξις (Lexis): A Language Design for Human–AI Collaborative Computation"
Paolo Tanzi & Claude (AI assistant) · March 2026 · DOI: 10.5281/zenodo.19302004
Read the Paper →