Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ MetaObjects is a **cross-language metadata standard** for declaring typed entity

The metamodel is the **durable spine**; generated code is the **disposable artifact**. Substrate is local-first: typed metadata lives in your repo, generated code is idiomatic per-language output with **no proprietary runtime**: the generated entity and model code imports nothing from MetaObjects at runtime, and the REST, prompt, client and runtime tiers import ordinary Apache-2.0 packages you can vendor, fork or replace. If `@metaobjectsdev/*` disappears tomorrow, you keep working code.

**Core vs helpers (ADR-0034 Amendment 3, 2026-09-22).** Only the core is a product promise: the metamodel, loader, canonical format and registry; runtime metadata access (the `ObjectManager` and its drivers; the HTTP adapters that mount it on a web framework are helpers, 2026-09-24 ruling); schema migrations (`meta migrate`); the drift gates (`meta verify`); prompt render and the reply parser. Every generator that writes application code into an adopter's repo — routes, controllers, ORM wiring, DTOs, forms, grids, hooks, filter allowlists — is a **reference helper**: it must compile and pass its reference fixtures, and the adopter copies it with `meta eject` and owns the copy. Mechanical test: what the tool guarantees is core; what it writes into your repo is a helper. Every port can eject: `meta eject` (TypeScript), `metaobjects eject` (Python), `mvn metaobjects:eject` (Java/Kotlin), `dotnet meta eject` (C#). Not every generator ships a reference copy: `meta gen --list` marks the ones that do not `package-only` (in TypeScript: `template`, which is exempt for good, and `docs-site`, whose builder stays packaged and whose theme `meta eject docs-site` copies; ADR-0034 Amendment 3 correction, 2026-09-26, narrowed by Amendments 5 and 7, and held to the shared manifest by Amendment 8). When you find a generator defect, fix the reference; do not describe it as a broken core guarantee.
**Core vs helpers (ADR-0034 Amendments 3 and 11).** The core is the contracts and the conformance kits, and only the core is a product promise: the metamodel, loader, canonical format and registry; the store-neutral contracts (the expected schema and the guarded update, which a persistence-conformance scenario is to hold every store driver to — ADR-0066 §6); the drift gates (`meta verify`); prompt render and the reply parser. Store-specific code — SQL writers, introspectors, drivers (the `ObjectManager` drivers, the `meta migrate` writer) and mappings — is a **supported helper**, and so is every generator that writes application code into an adopter's repo (routes, controllers, ORM wiring, DTOs, forms, grids, hooks, filter allowlists, and the HTTP adapters that mount the `ObjectManager` on a web framework): it compiles, passes its reference fixtures, gets the same capabilities in every port unless a ruling says otherwise (parity is capability, not identical output), and is fixed in the reference when it is wrong. **Generated code is real code**: run it as shipped, extend it through hooks, or copy it with `meta eject` and own the copy. The freeze on non-TypeScript REST generators is lifted. Mechanical test: what the tool guarantees as a contract is core; what it writes into your repo or a store is a helper. Every port can eject: `meta eject` (TypeScript), `metaobjects eject` (Python), `mvn metaobjects:eject` (Java/Kotlin), `dotnet meta eject` (C#). Not every generator ships a reference copy: `meta gen --list` marks the ones that do not `package-only` (in TypeScript: `template`, which is exempt for good, and `docs-site`, whose builder stays packaged and whose theme `meta eject docs-site` copies; ADR-0034 Amendment 3 correction, 2026-09-26, narrowed by Amendments 5 and 7, and held to the shared manifest by Amendment 8). When you find a generator defect, fix the reference; do not describe it as a broken core guarantee.

## Six pillars

Expand Down
502 changes: 256 additions & 246 deletions CHANGELOG.md

Large diffs are not rendered by default.

16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ first-week wedge plan — and `meta init` picks up from there.
A "Yes" means the feature is covered by the shared conformance corpora at
[`fixtures/`](fixtures/) for that port, or by a port-local test of equivalent
scope. For rows that describe generated code, the coverage is of the reference
generators on their fixtures — a quality check on the starting point, not a promise
generators on their fixtures — a quality check on the generators, not a promise
about the code in your repo. A "partial" means the loader recognizes the metamodel feature but the
codegen / runtime tier doesn't fully exercise it yet.

Expand All @@ -218,16 +218,16 @@ the consumer-side wiring (React + TanStack, and the
## What is guaranteed, and what is yours

MetaObjects has two layers, and only the first is a promise
([ADR-0034 Amendment 3](spec/decisions/ADR-0034-codegen-scaffold-and-own.md#amendment-3-2026-09-22--generators-are-reference-helpers-the-core-is-what-metaobjects-guarantees)):
([ADR-0034 Amendments 3 and 11](spec/decisions/ADR-0034-codegen-scaffold-and-own.md#amendment-11-2026-11-19--the-core-is-contracts-and-conformance-kits-and-generated-code-is-real-code)):

| | Core — guaranteed | Helpers — yours |
|---|---|---|
| **What** | The metamodel, loader, canonical format and registry; runtime metadata access (the `ObjectManager`, not the HTTP adapters that mount it); schema migrations (`meta migrate`); the drift gates (`meta verify`); prompt render and the reply parser | Every generator that writes code into your repo — the ones you write for the outputs you need, and the reference routes, controllers, ORM wiring, DTOs, forms, grids and hooks you copy |
| **Promise** | Conformance-gated, the same behaviour in every port that ships it, covered by the [compatibility policy](docs/compatibility-policy.md) | Reference starting points that compile and pass their reference fixtures. Run one as shipped, or copy it with `meta eject` and change it freely |
| **What** | The contracts and the conformance kits: the metamodel, loader, canonical format and registry; the store-neutral contracts (the expected schema, and the guarded update once its persistence-conformance scenario lands, ADR-0066 §6); the drift gates (`meta verify`); prompt render and the reply parser | Store-specific code (SQL writers, introspectors, drivers such as the `ObjectManager` drivers and the `meta migrate` writer, mappings) and every generator that writes code into your repo — the ones you write for the outputs you need, and the routes, controllers, ORM wiring, DTOs, forms, grids and hooks MetaObjects ships |
| **Promise** | Conformance-gated, the same behaviour in every port that ships it, covered by the [compatibility policy](docs/compatibility-policy.md) | Supported helpers that compile and pass their reference fixtures, with the same capabilities in every port unless a ruling says otherwise. The code they generate is real code: run it as shipped, extend it through hooks, or copy it with `meta eject` and own it |
| **A defect is** | A MetaObjects bug, fixed in a release | A bug in the reference, fixed there; your copy is yours |

The test is mechanical: what the tool guarantees is core; what it writes into your repo
is a helper. Every port can eject: `meta eject` (TypeScript), `metaobjects eject` (Python),
The test is mechanical: what the tool guarantees as a contract is core; what it writes into
your repo or a store is a helper. Every port can eject: `meta eject` (TypeScript), `metaobjects eject` (Python),
`mvn metaobjects:eject` (Java and Kotlin) and `dotnet meta eject` (C#).

## Six pillars
Expand All @@ -250,9 +250,9 @@ sixth ships two libraries at their own stability labels:
20-line shape plus worked examples to copy. The reference generators
(Drizzle/Zod + Fastify for TS, Spring REST + DTO + repository for Java, `data class` +
Exposed for Kotlin, EF Core entity class + ASP.NET routes for C#, Pydantic + FastAPI for
Python) are starting points: run one as shipped when it already emits what you want, or
Python) emit real code: run one as shipped when it already emits what you want, or
eject the one that is close, change it, and regenerate.
The engine that runs generators is core; their output is yours.
The engine that runs generators is core; the code it writes is yours.
2. **Runtime metadata** — load metadata at runtime, drive behavior dynamically
(CRUD, validation, relationships, dynamic admin UIs; typed tool payloads are
declared today, with MCP exposure on the roadmap).
Expand Down
7 changes: 4 additions & 3 deletions SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ fix and disclosure timeline.

## Supported versions

MetaObjects is pre-1.0 and ships from the `main` line. Security fixes target the latest
released version of each language package (npm, NuGet, Maven Central, PyPI). Please
verify against the latest release before reporting.
MetaObjects is at 1.x and ships from the `main` line. Security fixes target the latest
released version of each language package (npm, NuGet, Maven Central, PyPI); a fix that has to
reach an earlier minor is made on a `release/<major>.<minor>` branch. No support window or fix
time is promised beyond that. Please verify against the latest release before reporting.
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,17 @@ Then do **not**:
- pin an older MetaObjects release, or wait for a newer one, to get past it;
- branch, patch, or rebuild a clone of the MetaObjects repository.

The reference generators are starting points you take a copy of. They are
The reference generators emit real code, and you may take a copy of one. They are
conformance-gated so the copy starts out correct — not so that each project's output
becomes the library's problem. Once you run a generator in your build, what it emits for
your model is yours, exactly as if you had written it.

**What is legitimately upstream** is only what you cannot own: the **loader and
metamodel** (valid metadata rejected, invalid metadata accepted, a wrong resolution), the
**core runtime** your app imports (the metadata-driven `ObjectManager`, prompt render, the
reply parser — not an HTTP adapter you ejected, which is yours), the **codegen engine
itself** (the runner, the three-way merge, `verify`), and **`meta migrate`**. The test is
**core contracts and runtime** your app imports (prompt render, the reply parser, the
store-neutral contracts — not an HTTP adapter you ejected, which is yours), the **codegen engine
itself** (the runner, the three-way merge, `verify`), and the **store-specific helpers you
cannot eject** (the `ObjectManager` drivers and `meta migrate`), which MetaObjects supports and fixes. The test is
mechanical: if changing a generator — or a file eject copied beside it — fixes it, it is
yours.

Expand Down
6 changes: 4 additions & 2 deletions agent-context/skills/metaobjects-fit-assessment/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,9 @@ Omitting a real option is a scored defect, just like inventing one.

**M8 — The verdict-deciding fact is not always in the code.** Size you can count; trajectory
you cannot.
- **Structural disqualifiers ARE in the repo**: language outside the five ports, no
- **Structural disqualifiers ARE in the repo**: language outside the five published ports (Rust
is a sixth port in preview and unpublished: it generates code today with `cargo meta gen`, but
there is no crate to depend on, so treat it as a trial, not a fit), no
entity-shaped data at all, a DBA-gated schema. Cite them. They rule out scopes, not the whole
spectrum: a Go estate has no port, but a TypeScript web client on the other side of it may
still have a seam worth a contract.
Expand Down Expand Up @@ -330,7 +332,7 @@ invalid output). Each row rules out *scopes*, not MetaObjects wholesale:

| Check | Consequence |
|---|---|
| Backend language outside TS/Java/Kotlin/C#/Python | no codegen or runtime for that side; a seam to a supported-language consumer can still take a contract, generated for that side only |
| Backend language outside TS/Java/Kotlin/C#/Python | no published codegen or runtime for that side; a seam to a supported-language consumer can still take a contract, generated for that side only. **Rust is the exception in preview:** `cargo meta gen` runs the `entity`, `client` and `commands` generators from a checkout, with nothing published to depend on (`docs/ports/rust.md`), so say it is a trial, not a supported port |
| No relational store (MongoDB, Cassandra, Neo4j, a remote API) | schema pillar N/A; model the stored records as sourceless entities (`identity.primary`, no `source.*`) — types, create/PATCH schemas, filter allowlists, `verify` and prompts IN; data access is a generator the adopter owns (`docs/recipes/document-graph-and-wide-column-stores.md`) |
| DB not Postgres/SQLite/D1 (MySQL, ClickHouse, SQL Server, …) | `meta migrate` / `verify --db` OUT for that database — say so; types and data access unaffected. MySQL is a supported codegen + runtime dialect (`dialect: "mysql"`; `docs/recipes/mysql.md`) |
| ORM no reference generator targets (TypeORM, Sequelize, SQLAlchemy ORM, Django ORM, Hibernate-only entities on the Java lane; Prisma on TypeScript IS targeted: `orm: "prisma"` generates `schema.prisma`, so FULL keeps Prisma) | FULL means replacing the data layer — price it as such; CONTRACT SPINE and PARTIAL leave it untouched |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,10 @@ building block. Every generator is a reference helper an adopter selects, ejects
Views, expression/partial indexes and SQLite CHECKs are refused, not dropped
(`docs/recipes/prisma.md`);
- ship an AsyncAPI generator;
- reach a consumer outside the five ports (Go, Rust, Ruby, PHP, Swift…) directly.
- reach a consumer outside the five published ports (Go, Ruby, PHP, Swift…) directly. **Rust is a
sixth port in preview, unpublished** (`docs/ports/rust.md`): `cargo meta gen` runs the `entity`,
`client` and `commands` generators from a checkout of this repository, and there is no crate to
install, so a Rust estate can try it but cannot yet depend on it.

**Each of those is a generator the project writes**, and that is the primary codegen path, not
a workaround: a generator is a function from the loaded model to files, a few dozen lines, and
Expand All @@ -73,8 +76,8 @@ day or two for a first generator), and do not report it as impossible.
**OpenAPI and JSON Schema are stock generators, unreleased, targeting 1.2.1.** `openapi` writes one
OpenAPI 3.1 document for the generated REST surface, and `contract-schema` writes JSON Schema 2020-12
for each object's read, create and update shapes, plus a strict structured-output subset. A project
on any port runs them through the Node `meta` CLI. They reach the languages outside the five ports
through those languages' own OpenAPI tooling, and oasdiff over two emitted documents checks a change
on any port runs them through the Node `meta` CLI. They reach the languages outside the five published
ports through those languages' own OpenAPI tooling, and oasdiff over two emitted documents checks a change
against the last release (`docs/features/contract-emitters.md`). Until 1.2.1 ships, an assessment of
a released version counts these as generators the project writes, from the examples in
`docs/recipes/write-your-own-generator.md`.
Expand Down
9 changes: 5 additions & 4 deletions docs/CONFORMANCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,9 @@ fixtures as passing, but a future port-level reconciliation pass would close the

### Core corpora and template quality checks

Since [ADR-0034 Amendment 3](../spec/decisions/ADR-0034-codegen-scaffold-and-own.md#amendment-3-2026-09-22--generators-are-reference-helpers-the-core-is-what-metaobjects-guarantees),
the corpora above do two different jobs. Only the first is a promise to adopters.
Since [ADR-0034 Amendments 3 and 11](../spec/decisions/ADR-0034-codegen-scaffold-and-own.md#amendment-11-2026-11-19--the-core-is-contracts-and-conformance-kits-and-generated-code-is-real-code),
the corpora above do two different jobs. Only the first is a promise to adopters: the core is
the contracts and the conformance kits that hold every port to them.

- **Core — the contract.** `conformance/`, `yaml-conformance/`, `registry-conformance/`,
`validation-conformance/`, `provider-composition-conformance/`,
Expand All @@ -122,15 +123,15 @@ the corpora above do two different jobs. Only the first is a promise to adopters
`rules-check-conformance/` (the business-rules gate every port's `verify` runs, ADR-0066) and
`codegen-skip-conformance/` (ADR-0064: which changes make `gen` render, and what a local `verify --codegen` may answer from the stored key), core for the same reason.
A red cell here is a MetaObjects bug.
- **Template quality checks — not a promise.** The generated lane of
- **Generator quality checks — a supported helper's tests, not a core promise.** The generated lane of
`api-contract-conformance/`, `generator-registry-conformance/` (stable generator names),
`codegen-noop/` (vocabulary with no lowering yet emits nothing), `writer-conformance/` (the code
writer the reference generators write through, ADR-0063), `contract-conformance/` (the JSON Schema and OpenAPI output), `cube-model/` (the Cube
exporter's output, a TypeScript reference helper),
`requirement-test-identity-conformance/` (which tests the `requirement-tests` reference
generator yields from a ledger and what each is called; the text it writes is not
pinned), the codegen-compile gate and the eject contract (below). They check that the
reference generators are correct starting points; an adopter's ejected copy is theirs and is not gated. The hand-rolled
reference generators emit correct code; an adopter's ejected copy is theirs and is not gated. The hand-rolled
reference-server lane of `api-contract-conformance/` still pins the wire contract that
the runtimes and the client speak, which is core.

Expand Down
3 changes: 2 additions & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ docs/
│ ├── explorer-data.md # explorer.json and its inputs: export --effective, the verify ledger rows, manifest provenance
│ ├── explorer-site.md # the model explorer site docsSiteFile() builds from explorer.json
│ ├── metadata-driven-runtime.md # one grid, one form and one route mount for every entity, read from the loaded metadata (TypeScript example, measured)
│ └── own-your-codegen.md # scaffold-and-own generator ownership (ADR-0034)
│ ├── own-your-codegen.md # scaffold-and-own generator ownership (ADR-0034)
│ └── stability-labels.md # which pieces are stable, preview or experimental today (a list of facts, no promise)
└── ports/ # one file per language/framework port
├── typescript.md
├── typescript-client.md # browser-side TS (React, TanStack, Angular, codegen pairs)
Expand Down
2 changes: 2 additions & 0 deletions docs/compatibility-policy.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@ work*. A release can move one without the other, and most releases move neither.

## Shipped libraries (`libraries: [...]`)

_Which pieces carry which label today is listed in [Stability labels](features/stability-labels.md); that page is a list of facts and adds no promise._

A [library](features/libraries.md) is declared design MetaObjects ships as metadata —
nodes an adopter opts into and then generates from. What its SHAPE promises depends on
the `stability` its manifest declares, and `meta gen --list` prints it:
Expand Down
4 changes: 2 additions & 2 deletions docs/features/codegen-concepts.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ The library also ships a documented **template library** of reference generators
already emits what you want, import it and run it as shipped; when one is close to what you
need, you copy it into your repo and own it. A single standard template set has never fit
across projects — framework conventions, naming, structure, and business patterns are
per-project. Don't fight a black-box generator; own a starting point and edit it.
per-project. Don't fight a black-box generator; eject the one that is close and own the copy.
Choosing and adapting a starting template is a **human/Claude judgment call**, not a
CLI flag. (See ADR-0034.)

Expand Down Expand Up @@ -243,7 +243,7 @@ drop the files of objects the run did not name.

A generator picks its scope by which helper it composes — the same way it picks
object vs model today. Reference templates and the guidance call out the scope each
starting point is for, so "I need a per-package service layer" maps to a clear
generator is for, so "I need a per-package service layer" maps to a clear
pattern instead of hand-rolled grouping.

### Declarative template scopes
Expand Down
Loading
Loading