Define the data, publish a version, and give the application something precise to build against.

An AI is asked to build an order application: capture an item and quantity, use the customer’s phone number for delivery updates, process payment and generate a printable confirmation. Before it writes the code, it needs to know which data definitions and rules to use.

Which fields are required? Which quantities are valid? Where should the phone number come from? Can the phone number or credit card number appear unencrypted/unmasked and as clear text in file system logs or the confirmation email? Those requirements should not depend on how much the developer remembered to put in the prompt – and even if it was part of the prompt the probabilistic nature of LLMs  does not guarantee that rules are applies.

Worse, a malicious developer or agent will deliberately circumvent the rules, for example by adding credit card information to a log file or hidden information into the UI. Project Delphi brings those requirements together in one enforceable and versioned contract built on JSON Schema.

The proposed Data Semantic Vocabulary (DSV) adds meaning and rules for using and working with the data. The Project Delphi repository gives that contract an identity, manages its versions, controls access and makes it available to the build process (for example CI/CD pipelines).

Understanding the Data Semantic Vocabulary, its impact, and the versioning.

The AI agent can resolve Order 1.0.0, generate code against it, and carry that binding into testing and production. Later changes to the contract do not silently change what this application was built against.

The broader ecosystem is introduced in AI Can Write the App. Now It Needs to Build Against the Data. Here, we focus on the vocabulary and repository, using the same simplified order application.

The examples describe the intended design. The DSV syntax and binding manifest shown below are illustrative, not finalized interface specifications.

Use JSON Schema to say which orders are valid

Here is an order the application might receive:

JSON

{
  "item": "SKU-1234",
  "quantity": 2,
  "phoneNumber": "+1-202-555-0100"
}

The JSON document contains an item, a quantity, and a phone number. It does not tell us whether any of those fields can be missing or whether quantity zero is allowed.

JSON Schema gives those structural requirements a machine-readable form. Tools can read the definition and check actual documents against it. Project Delphi builds on that existing language instead of inventing a new way to describe JSON structure. [1]

A JSON Schema for these orders looks like this:

JSON

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://contracts.example.com/order",
  "title": "Order",
  "type": "object",
  "properties": {
    "item": {
      "type": "string",
      "minLength": 1
    },
    "quantity": {
      "type": "integer",
      "minimum": 1
    },
    "phoneNumber": {
      "type": "string",
      "minLength": 1
    }
  },
  "required": ["item", "quantity", "phoneNumber"],
  "additionalProperties": false
}

An order with quantity zero fails. So does an order without an item or with an unexpected property. The phone number rule is deliberately basic in this example: it just requires a nonempty string. Passing that check does not prove the number is correctly formatted, reachable, or verified. [2]

$schema identifies the JSON Schema dialect: the rules and features used to interpret this schema. $id identifies the schema resource. [3]

The definition now says what an acceptable JSON document looks like. Next, it needs to say how the application may use it.

Put the phone number’s rules beside its definition

For this application, the phone number is the customer’s delivery contact. The Customer System of Record is the authoritative source. The number must stay out of diagnostic logs and the printable confirmation.

A label such as “personal data” does not express all of that. It classifies the field, but it does not tell a tool which specific actions are prohibited. This is why comments or data annotations fall short.

The Data Semantic Vocabulary (dsv) attaches the meaning and the specific rules beside the field they govern:

JSON

{
  "type": "object",
  "properties": {
    "phoneNumber": {
      "type": "string",
      "minLength": 1,
      "classifications": ["customer-phone"],
    }
  },
  "dsv": {
    "classifications": {
      "customer-phone": {
        "description": "Customer phone",
        "policies": ["personal-data"]
      }
    },
    "policies": {
      "personal-data": {
        "description": "Never log personal data; mask it",
        "rules": [
          {
            "operation": "log",
            "constraint": "deny",
            "enforcement": "block"
          },
          {
            "operation": "display",
            "constraint": "require",
            "obligation": {
              "type": "mask",
              "method": "full"
            },
            "enforcement": "block"
          },
          {
            "operation": "respond",
            "constraint": "require",
            "obligation": {
              "type": "mask",
              "method": "full"
            },
            "enforcement": "block"
          }
        ]
      }
    }
  }
}

This excerpt belongs under properties in the JSON schema. The dsv block contains the additional meaning and usage rules. This makes dsv a part of the schema, not an extra field in the order document.

Classifications carry policies that attach to similar data. The policy identifiers let an enforcer name the rule it evaluated. For example, personal data prohibits logging; it also requires masking on display and respond operations before including the number in that output. The application still needs the number for delivery updates, so removing it everywhere would not be a correct implementation.

The meaning stays with the field it describes. A delivery contact is not necessarily a billing contact or an account-recovery number, even when all three are strings. It is important to understand that the vocabulary and its declarations state requirements, not proof. Naming the authoritative source does not by itself prove that a particular value came from it. Declaring “do not log” does not magically prevent a logging statement being implemented by an agent. The AI builder, the application code and its checks must put the rules into practice and enforce them.

Make sure tools understand the extension

By extension, just adding a keyword is not enough. Every supporting tool needs to know what it means, where it applies, and how to handle conflicts.

JSON Schema provides a vocabulary mechanism for defining those keywords and their meaning. A dialect brings vocabularies together; its meta-schema describes the permitted schema syntax and declares which vocabularies are required. [4]

A schema selects its dialect through $schema. The meta-schema uses $vocabulary to declare the vocabularies involved. A tool that does not recognize a required vocabulary must refuse to process that dialect rather than silently skip it. [4]

Checking that a policy declaration is well formed is also different from checking the application. A meta-schema cannot inspect a log or prevent a phone number from entering a PDF. The extension needs supporting implementation code. [5]

The repository supplies the requirements. Validators check document structure. Enforcers (called Nomos in Project Delphi) check application behavior and supports enforcement at the relevant operations.

That behavioral role is explained in Valid Data Can Still Be Used Wrong: Introducing Nomos.

Give the build an exact version

The AI agent creating the application has found an Order definition. It now needs to record exactly which release it selected when building the application. The Project Delphi repository manages contract versions such as 1.0.0 separately from the schema’s $id. Pinning a release lets testing and production use the same requirements as the build.

ElementWhat it establishes
Contract identityWhich definition this is: for example, the Order contract.
Contract versionWhich release the application depends on: for example, 1.0.0.
Content hashThe exact registered bytes associated with that version.
Resolved dependenciesThe exact referenced definitions needed to interpret the contract.

In the intended repository design, registered content is immutable. If someone submits different content as Order 1.0.0, the repository rejects the conflict instead of replacing the original. Parsed or compiled forms are derived from those registered bytes; they are not new definitions.

A recommended version can help the builder choose a starting point. Before the build is accepted, that choice becomes an exact binding. Publishing Order 2.0.0 does not move an application already pinned to 1.0.0.

The content hash identifies the bytes, not whether they have been approved. Ownership, review, and publication decisions determine which version is authorized for use and set a status. The draft, active, or Deprecated status for a version indicate its availability to an agent or consumer. Furthermore, the repository controls who has access to contracts and who is allowed to make changes. A (rogue) agent cannot just change a schema prior of merging malicious code.

Pin the definitions the contract refers to

An Order contract can reuse Address or Product Identifier definitions through JSON Schema’s $ref and $defs. [6] The Project Delphi repository resolves external references at registration and pins them to exact versions. That keeps Order 1.0.0 tied to the same Address rules even when a newer Address definition is published.

Missing definitions must be supplied or reported; validation does not fetch them from the network. Reused classifications and policies must also be declared explicitly—a structural $ref does not automatically import unrelated policies from another document.

The Delphi repository makes it easy to consolidate contract and rules in one place – together with enforcers that cannot be compromised.

Review the draft before publishing it

Start by searching for a contract to reuse. If a new one is needed, create it from an existing schema, an imported artifact, or an application specification. Whether authored by a person or an agent, it begins as a draft—not an approved definition.

Before publication, check the schema syntax, references, required metadata, policy consistency, and compatibility with earlier versions. Reviewers must also confirm the meaning: a schema could pass structural checks while incorrectly describing a delivery phone number as an account identifier.

Required reviewers approve the contract before applications rely on it. The repository records its owner, source, and publication decisions.

Git still holds the application source, tests, adapters, and contract bindings. The Project Delphi repository supplies the published definitions they depend on.

Commit the binding with the application

Once Order 1.0.0 is available, the developer or agent records that dependency with the source code. An illustrative binding manifest looks like this:

JSON

{
  "application": "order-entry",
  "contracts": [
    {
      "contract": "https://contracts.example.com/order",
      "version": "1.0.0",
      "contentHash": "sha256:<resolved-content-hash>",
      "roles": ["consumes", "produces"]
    }
  ]
}

The hash is a placeholder, and the manifest is not a finalized file format. A complete resolved manifest would also record the referenced contract dependencies.

The AI uses the selected definition to generate models, validation calls, and tests. CI/CD resolves the same version to check the implementation. The accepted application artifact carries that binding into deployment.

A GitHub Actions integration could resolve the manifest and supply the contracts to document validators and Nomos checks.

It is important to understand that binding the contract to the data does not mean copying the entire schema into every order document. The association can live at an application interface, collection, or runtime validation boundary. What matters is that the system knows which version governs the document.

Versioning records the change. Compatibility determines whether it is allowed.

A new version number records a change. It does not establish that the change is an acceptable replacement for the definition applications already use.

The intended workflow sets the compatibility policy with the first published version. Version 1 has no predecessor to compare against, but it establishes the rule for later changes. The repository records and enforces this rule.

For example, backward compatibility can require the new schema to accept every document allowed by the previous one. The policy also selects the comparison scope: the previous published version, or the relevant published history for a transitive check.

Try a change to the quantity rule

Order 1.0.0 requires a positive integer quantity. Someone proposes Order 2.0.0, raising the minimum from one to two:

CheckOrder v1 (1.0.0)Candidate v2 (2.0.0)
Quantity ruleInteger, minimum 1Integer, minimum 2
Order with quantity 1AcceptedRejected

This order shows the break:

JSON {
  “item”: “SKU-1234”,
  “quantity”: 1,
  “phoneNumber”: “+1-202-555-0100”
}

Version 1 accepts it. Version 2 rejects it. The proposed schema is valid, but it fails a policy requiring continued acceptance of previously valid orders.

Check the proposal before publishing it

When Order v2 is proposed, the repository asks the validation engine whether it meets the contract’s compatibility policy. The engine compares v2 with v1 – or older versions too, when required – and explains any problems. The repository uses that result to allow or block publication. Just declaring a new version number does not bypass the policy.

Authors can run the check while preparing a change to catch problems early. It must also pass before activation. A failed candidate remains a draft for revision, and each result applies only to the exact definitions that were checked.

Use the engine to compare definitions, not just samples

The fast validation technology in Project Delphi does two jobs: compare schemas when a contract changes, and check documents when the application processes data. The repository selects the policy and versions; the fast validators perform the analysis and returns the findings.

Testing sample orders is not enough. Samples with quantities of two or more pass both versions, hiding the break for quantity one. The engine must compare the schema rules. If it cannot determine whether the change meets the policy, it reports that clearly – not as a pass.

While the same engine is used, these are two separate operations. The runtime system does not repeat compatibility analysis for every incoming order. The implementation and its supported scope are discussed in From Definition to Execution: Fast JSON Schema Validation.

Version changes to behavior, not just structure

A different proposal for Order 2.0.0 might require masking the customer’s phone number on an internal support screen. The JSON fields and types could stay the same while the application needs new display logic.

A change to meaning, policy, or enforcement requirements still needs a new version when it changes machine behavior or permitted use. Structural compatibility does not prove that an existing application implements the new obligation. The relevant Nomos checks must evaluate that behavior.

The reverse matters too. If an AI adds a logging statement that exposes the number under Order 1.0.0, the existing rule has not changed. The implementation is wrong because it violates the rules. The agent should fix the code, not weaken the contract or silently select another version to make the check pass.Change the contract when the requirement changes. Change the application when it fails an existing requirement.

Use the selected definition without calling the repository for every order

The repository is not in the per-document request path. It supplies the authoritative definition, but the runtime does not contact it each time an order arrives.

During preparation, the integration retrieves the pinned contract and its referenced definitions, checks the required capabilities, and prepares a reusable validator. Each order is then checked locally against that prepared definition.

The prepared form remains tied to the contract content, dependencies, and relevant validation settings. A different version or configuration needs the appropriate preparation; a cached result must not silently change the requirements.

Nomos integrations address the handling rules at the operations they support. A valid order can still be logged incorrectly, so a successful structural check is not a result for every rule in the contract. The runtime detail is covered in From Definition to Execution: Fast JSON Schema Validation.

Keep the language open and the repository portable

We aim to develop dsv openly and work toward standardization with the JSON Schema community. It is a proposal, not a vocabulary already adopted by the standard.

Tools need to agree on what the declarations require, not just recognize the same keywords. Shared examples, conformance tests, and clear reporting of unsupported capabilities help make those differences visible.

The repository model should be implementable across platforms. A contract should keep its meaning and identity without depending on one coding framework or database vendor.

Database integration can connect the definition directly to stored data. It is one way to use the model, not a condition for using the vocabulary. The Database AI Builds From – Not Just the Place It Stores Data explores the Oracle direction and the opportunity for other databases.

Related reading: Overview – link | Nomos – link | Validators – link | Database integration – link.

A definition the build can depend on

Our order application now has more than a schema file. It has an approved definition, exact versions of its dependencies, a binding carried with its source, and a compatibility policy for future changes.

The AI has something concrete to build against. The pipeline knows which requirements to test. Production can keep using that same version rather than reconstructing the rules.

A schema becomes a software dependency when the build can resolve it, the implementation can be checked against it, and production can continue to rely on the same versioned definition.

Public references

[1] JSON Schema: Understanding JSON Schema – Reference. https://json-schema.org/understanding-json-schema/reference

[2] JSON Schema: Understanding JSON Schema – Objects. https://json-schema.org/understanding-json-schema/reference/object

[3] JSON Schema: Understanding JSON Schema – The basics. https://json-schema.org/understanding-json-schema/basics

[4] JSON Schema Core, Draft 2020-12: dialects and required vocabularies. https://json-schema.org/draft/2020-12/json-schema-core

[5] JSON Schema: Understanding JSON Schema – Creating your own meta-schema. https://json-schema.org/understanding-json-schema/reference/schema

[6] JSON Schema: Structuring a complex schema. https://json-schema.org/understanding-json-schema/structuring