$ fssg build --deterministic --validate |

What Is NADL? A Language for Compiling AI System Architecture

FACET

Most prompt languages describe text.

NADL describes the architecture that constructs the request.

That distinction is the reason the term exists. In the FACET v2.1.3 specification, NADL means Neural Architecture Description Language: a language for defining, validating, and executing AI request construction in a deterministic, type-safe, resource-bounded way.

This is not a claim that model inference becomes deterministic. It does not. The model can still produce different answers. NADL controls the part we can engineer before inference: inputs, dependencies, interfaces, policy, context allocation, evaluation order, and the exact artifact sent to a provider.

A prompt is a value; an AI request is a system

A prompt is usually treated as a string assembled by application code:

prompt = system + memory + user + tools + instructions

The line looks harmless. The architecture hidden behind it is not.

Which memory enters the request? In what order are imports merged? Which variables depend on runtime input? Who is allowed to call a tool? What happens when the context budget is exceeded? How do two implementations prove that they constructed the same request?

Once these questions matter, prompt templating stops being enough. We are no longer formatting text. We are describing a small executable architecture.

That is the job NADL gives FACET.

What the language describes

A FACET document can declare several kinds of structure in one source artifact:

  • inputs and their types;
  • variables and dependency relationships;
  • message facets such as system, user, and assistant sections;
  • interfaces for tools;
  • policies governing capabilities and effects;
  • context budget and layout behavior;
  • pure transformations through lenses;
  • tests and expected failure conditions;
  • metadata needed for provenance.

A minimal contract is readable:

@context
  budget: 32000

@vars
  query: @input(type="string") |> trim()
  task: "Explain NADL using one concrete example."

@system
  content: "You are a precise technical assistant."

@user
  content: "$task\n\nQuestion: $query"

But the important object is not the source text alone. The compiler resolves and validates the document, computes dependencies, applies a deterministic layout, and renders provider-agnostic Canonical JSON.

The .facet file is source code. The canonical request is the build artifact.

The five-phase compiler pipeline

FACET's Hypervisor profile defines a strict pipeline:

1. Resolution
2. Type checking
3. Reactive compute (R-DAG)
4. Layout (Token Box Model)
5. Render (Canonical JSON)

Each phase owns a different class of uncertainty.

1. Resolution

Source is normalized to UTF-8, NFC, and LF. Imports are resolved and merged in a defined order. The result is a resolved syntax tree rather than a collection of prompt fragments whose order depends on host code.

2. Type checking

Variables, interfaces, policies, pipelines, and input placement are validated before execution. A malformed architecture fails before a provider request is created.

3. Reactive compute

The R-DAG derives dependencies from variable references. Forward references are allowed, but unknown references and cycles are rejected. Independent nodes use a stable insertion-order tie-break.

This matters because evaluation order becomes a property of the language, not an accidental property of a Python dictionary, async scheduler, or framework callback sequence.

4. Layout

The Token Box Model allocates context using provider-independent FACET Units. Critical sections must fit. Flexible sections can be compressed, truncated, or dropped according to declared rules.

Context pressure is therefore handled as layout—not as emergency string slicing after the request has already been assembled.

5. Render

The compiler emits Canonical JSON containing ordered messages, tool interfaces, metadata, document and policy hashes, budget information, and target-provider identity. A provider adapter may translate this artifact, but it must preserve its semantics.

This is the boundary where an AI request becomes inspectable and comparable.

Why call it an architecture description language?

Hardware description languages do not describe what a chip should “roughly feel like.” Infrastructure-as-code does not ask a cloud provider to improvise a network. Build systems do not represent dependencies as prose in a README.

They declare structure that another system validates and executes.

NADL applies the same idea to AI request construction. It describes:

architecture =
  typed inputs
  + dependency graph
  + message topology
  + tool interfaces
  + authorization policy
  + resource allocation
  + deterministic transforms
  + provenance

This makes NADL closer to a build language for AI behavior than to a better prompt format.

The model remains probabilistic. The architecture around the model does not need to be.

Core and Hypervisor are different promises

FACET deliberately defines two conformance profiles.

The Core profile supports normalization, resolution, type checking, and rendering for a constrained subset. It is useful when a host needs portable contracts without runtime effects.

The Hypervisor profile adds the complete five-phase pipeline: runtime inputs, R-DAG evaluation, Token Box layout, interfaces, tests, policy enforcement, guards, gas accounting, cache rules, and execution provenance.

This separation matters. “FACET-compatible” should not be a vague marketing label. An implementation declares which profile and mode it supports, and conformance is tied to normative behavior.

What NADL can guarantee—and what it cannot

For fixed normalized source, profile, mode, runtime inputs, and host configuration, FACET specifies deterministic behavior for:

  • import and merge ordering;
  • type checks and diagnostic codes;
  • dependency evaluation order;
  • context layout;
  • canonical ordering and serialization;
  • policy hashing and execution evidence.

It does not standardize:

  • model internals;
  • sampling behavior;
  • truthfulness of generated text;
  • provider availability;
  • correctness of external APIs.

This boundary is essential. NADL does not pretend to solve probabilistic inference. It makes the request-construction system reproducible enough that model behavior can finally be investigated against a stable input artifact.

A practical debugging change

Without an architecture artifact, a failed agent run often produces weak questions:

  • What prompt did we send?
  • Did memory change?
  • Were tools listed in the same order?
  • Was a policy inserted?
  • Did truncation remove an instruction?

With NADL, the investigation can start from explicit artifacts:

source document
resolved AST
R-DAG
layout result
canonical request
policy hash
execution artifact

That changes debugging from archaeology into comparison.

If two runs have the same canonical request hash but different model outputs, the variation belongs after the contract boundary. If the hashes differ, the construction pipeline can explain why.

NADL is the missing name for the layer

The AI industry already has model APIs, orchestration frameworks, prompt templates, tool schemas, and agent runtimes. What it often lacks is a formal language for the architecture immediately before inference.

That layer decides what the model sees, what it may request, how resources are allocated, and what evidence survives the run.

NADL gives that layer a name and a compiler contract.

FACET is one concrete implementation of the idea: human-readable source, deterministic compilation, bounded context, typed interfaces, fail-closed policy, and canonical output.

The long-term thesis is simple:

AI behavior should not begin with a string. It should begin with an architecture that can be compiled, inspected, tested, and reproduced.

That is what NADL is for.

Sources and further reading

FACET AI CLI Terminal
facet@ai:~$