Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
b8e92cd
feat(rust): build the docs view and write the model explorer without …
dmealing Nov 28, 2026
f365983
Merge remote-tracking branch 'origin/main' into fm/mo-130-docs-view-rust
dmealing Nov 28, 2026
a5417e2
no-mistakes(review): Close docs-site skip gaps, init list, dead API
dmealing Nov 28, 2026
6010c7c
no-mistakes(review): Key docs-site skip on prompt files, not dirs
dmealing Nov 28, 2026
ac2a0ed
no-mistakes(document): Rust docs view docs mostly current; fixed CONF…
dmealing Nov 28, 2026
229e461
wip: docs view storage section, agent pages from the view (TS referen…
dmealing Nov 28, 2026
34dbdc1
wip: TS agent-docs model-only schema, requirements.md retired in docs
dmealing Nov 28, 2026
8544c82
Merge remote-tracking branch 'origin/main' into fm/mo-130-agent-pages
dmealing Nov 28, 2026
5cf0d74
wip: C# docs view storage, requirements and agent-docs from the view
dmealing Nov 28, 2026
13e6145
wip: JVM docs view storage, requirements and agent-docs from the view…
dmealing Nov 28, 2026
82c3631
wip: Python docs view storage, agent pages from the view, always-on p…
dmealing Nov 28, 2026
6d0f251
wip: Rust docs view storage, requirements and agent-docs from the view
dmealing Nov 28, 2026
04ad416
docs: agent pages in every port (CONFORMANCE, cli, changelog); Java p…
dmealing Nov 28, 2026
d50c953
fix(codegen-ts): schema page keeps its own trailing break (layout rat…
dmealing Nov 28, 2026
30ef3e1
chore(site): payload counts 49 corpora
dmealing Nov 28, 2026
f3fc59d
no-mistakes(review): apply reviewer inline fixes
dmealing Nov 28, 2026
dbea06c
no-mistakes(review): Share requirement-ledger filter; Kotlin pages ho…
dmealing Nov 28, 2026
8c967b8
no-mistakes(review): Align agent-schema contract comments with behavior
dmealing Nov 28, 2026
b699803
no-mistakes(review): apply reviewer inline fixes
dmealing Nov 28, 2026
3bc6e17
no-mistakes(review): Agent-docs subDir replaces agent/; neutral point…
dmealing Nov 28, 2026
666fec2
no-mistakes(test): Agent schema page drops imported nodes in every port
dmealing Nov 28, 2026
cce1e91
no-mistakes(test): apply changes made during test validation
dmealing Nov 28, 2026
30d7c33
no-mistakes(document): Document schema page leaving out imported nodes
dmealing Nov 28, 2026
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 @@ -74,7 +74,7 @@ PyPI has had no product change since `0.25.0` — nothing is broken.
- **Kotlin** — `codegen-kotlin` (laid out by `KotlinWriter`, ADR-0063, on the JVM): entity + Exposed table + Spring controller + payload + relations + filter allowlist + validator + stored-proc + output-parser generators. `integration-tests-kotlin` runs the persistence-conformance corpus through Exposed against Testcontainers Postgres.

**Cross-port conformance corpora** (every port runs the shared corpus):
- Metamodel: `fixtures/conformance/` (584 fixtures; 48 shared corpora in total — per-corpus counts + the corpus x port matrix live in `docs/CONFORMANCE.md`). TS / C# / Java / Python all green.
- Metamodel: `fixtures/conformance/` (584 fixtures; 49 shared corpora in total — per-corpus counts + the corpus x port matrix live in `docs/CONFORMANCE.md`). TS / C# / Java / Python all green.
- Render: `fixtures/render-conformance/`. TS / Java / Kotlin / Python byte-identical; C# and Rust each carry a `KnownDrift` render ledger, recorded in `docs/CONFORMANCE.md`.
- Persistence: `fixtures/persistence-conformance/`. **Query** scenarios run on every port (TS / C# / Java / Kotlin / Python; `op: guardedUpdate` is TS-only until each port's 1.3.0 guarded update lands), each provisioning its test DB by executing the committed, TS-produced `canonical/schema.postgres.sql` (Postgres only — Derby dropped for the cross-port query corpus, ADR-0015; the FR-044 `report-*` scenarios also run on SQLite, MySQL and D1 where a port has the engine, see [docs/CONFORMANCE.md](docs/CONFORMANCE.md)). The **migration** scenarios are exercised by **TS only** (the Node reference helper writes them; a native tool is equally first-class, ADR-0015 Amendment 2). **The corpus now gates WRITES, not just reads (SP-H):** an `op: roundtrip` scenario type INSERTs through each port's runtime/ORM write codec (NOT raw SQL), reads the row back, and asserts the wire-normalized value. The `AllTypes` entity (`roundtrip-all-types.yaml`) carries one field of **every** persistable `field.*` subtype — string/int/long/double/float/decimal/boolean/date/time/timestamp(+tz)/currency/enum/uuid/object — plus an **array-of-VO** `field.object @isArray @storage:jsonb` column (`labels`, written as 2-element / empty-`[]` / single-element arrays across the three rows) — so every subtype write+read (incl. the array-of-value-object jsonb codec) round-trips through every port against Testcontainers PG. (`field.byte`/`field.short`/`field.class` were cut as non-functional registration-only stubs — the matrix tracks only genuinely-supported subtypes; see `fixtures/registry-conformance/README.md` → "Per-subtype write-round-trip matrix".)
- API-contract: `fixtures/api-contract-conformance/`. TS / C# / Java / Kotlin / Python all green — each port runs **two lanes**: a hand-rolled reference server AND its **generated** API artifact booted over HTTP (the deployed controller/routes; TS+C# full-stack vs Testcontainers PG, Java/Kotlin/Python generated controller + in-memory repo behind the consumer seam). The generated fan-out found 10 real deployment bugs golden snapshots missed. Three sub-corpora run the **generated lane only, on all five ports** — `write-through/`, `projection/` (F22: a view-only `object.projection` serves GET list + GET by id and answers every write verb with `405 {"error": "method_not_allowed"}`) and `report/` (FR-044: a view-backed `object.report` serves GET list, answers `POST` with that same `405`, and mounts no `/{id}` route). That is deliberate, not a gap: what is under test is whether a port's GENERATOR emits those routes, and a hand-rolled reference server would answer every scenario by construction. The `m2m/` sub-corpus also gates **TPH x M:N together** (base-declared, subtype-declared, abstract-mid-declared, a non-subtype source onto a subtype TARGET, and the cross-subtype source id answering `200 []`) — the two corpora were originally built disjoint (`tph/` had no relationships, `m2m/` no discriminators), which is precisely how that defect class survived.
Expand Down
7 changes: 7 additions & 0 deletions agent-context-shipped/files/5497499d5dddc2cc.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
## Pages generated for this project

The project's `gen` command writes these from the metadata (they are regenerated output, like the
code). Read the one for a tier before you change that tier:

{{pageList}}

1 change: 1 addition & 0 deletions agent-context-shipped/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"docsRef": "main",
"docsLinkPrefix": "https://github.com/metaobjectsdev/metaobjects/blob/",
"skillsDir": ".claude/skills",
"agentPagesTemplate": "5497499d5dddc2cc.md",
"stacks": [
{
"id": "typescript",
Expand Down
7 changes: 7 additions & 0 deletions agent-context/templates/agent-pages.md.mustache
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
## Pages generated for this project

The project's `gen` command writes these from the metadata (they are regenerated output, like the
code). Read the one for a tier before you change that tier:

{{pageList}}

32 changes: 32 additions & 0 deletions changelog.d/agent-pages-every-port.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
- **The agent pages in every port, from the docs view.** `requirements.toon`,
`agent/requirements.md` and the model-only `agent/schema.md` are now written by C#, Java,
Kotlin, Python, Rust and TypeScript alike: each port's `requirements` and `agent-docs`
generators build the page data from its own docs view and render the shared
`templates/requirements/` and `templates/agent/` Mustache pages, byte for byte what
`fixtures/docs-page-conformance/` pins. A TypeScript project with no dialect now gets the
model-only `agent/schema.md` too (it used to get no schema page); with a dialect it keeps the
physical page. `agent/schema.md` documents the project's own storage in every port: a
dependency's object that `scope.include` does not name is left out of its tables, views,
relationships and enums (Rust loads no dependency, and leaves out a reference node). The
TypeScript physical page used to list an imported table too. `agent/ui.md` stays
TypeScript's. Rust has no requirement ledger of its own yet, so its pages list every
requirement the view carries, an uninherited import's included.

The docs view gains a `storage` section (`docs/features/docs-view.md`): every table and view
the model stores into, its columns (names from the port's naming helpers, each linked to its
field), keys and foreign keys. The physical facts (SQL types, defaults, indexes, checks,
constraint names and actions) are `null` outside a TypeScript run with a dialect, which fills
them. `explorer.json` carries the new key in every port.

**Retired: the human `requirements.md` page.** The `requirements` generator writes only
`requirements.toon`; people read the ledger in the explorer (`docs-site`), and agents read it
embedded in `agent/requirements.md`. Upgrading: the next `gen` no longer writes
`requirements.md`; delete the committed copy (and its `.hashes/` entry goes with the run).

**The always-on agent file points at the agent pages, only when they exist.** `meta init`
(and `--refresh-docs`), `meta agent-docs` (which the C# and Java commands hand off to) and
Python's `metaobjects agent-docs` now add a "Pages
generated for this project" section to `.metaobjects/AGENTS.md`, naming each agent page the
project's last `gen` wrote (read from the committed `.metaobjects/.gen-state/.hashes/`) and
when to read it. A project that wires none of them gets the file unchanged. Refresh the agent
files after wiring `agent-docs`, `api-docs` or `requirements` for the first time.
43 changes: 30 additions & 13 deletions docs/CONFORMANCE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Conformance coverage

The MetaObjects standard ships **48 shared conformance corpora** under
The MetaObjects standard ships **49 shared conformance corpora** under
[`fixtures/`](../fixtures/). Every port runs every corpus that is *applicable to
it* and asserts the same expected behaviour against the same fixtures. **This page
is the inverse index**: fixture → feature doc + per-port pass status, and it is the
Expand Down Expand Up @@ -54,8 +54,9 @@ regenerate with `ls -d fixtures/<corpus>/*/ | wc -l` for directory-shaped corpor
| [`fixtures/dependency-conformance/`](../fixtures/dependency-conformance/) | 47 cases (36 resolution, 7 of them with a ledger arm, + 11 check) + 32 transport cases | ✓ (reference implementation; all four arms) | ✓ (resolution arm, all 36, ledger included; check arm, all 11) | inherits via Java | ✓ (resolution arm, all 36, ledger included; check arm, all 11, as `verify --deps`) | ✓ (resolution arm, all 36 identically, ledger included; check arm, all 11, as `deps check` and `verify --deps`; the transport arm is Node-only) | — |
| [`fixtures/shared-model-conformance/`](../fixtures/shared-model-conformance/) | 15 cases (9 publish + 6 refusal) | ✓ (reference implementation) | ✓ (all 15; `SharedModelConformanceTest`) | inherits via Java (`KotlinSharedModelGeneratorTest` pins the generator) | ✓ (all 15; `SharedModelConformanceTests`) | ✓ (all 15; `test_shared_model_conformance.py`) | — |
| [`fixtures/agent-context-conformance/`](../fixtures/agent-context-conformance/) | 6 | ✓ (the emitter is TS-owned) | — | — | — | — | — |
| [`fixtures/agent-pages-pointer/`](../fixtures/agent-pages-pointer/) (the always-on agent file names the agent pages the last `gen` wrote, from the committed `.hashes/`) | 3 cases | ✓ (reference) | — (`metaobjects:agent-docs` runs the Node CLI) | — | — (`dotnet meta agent-docs` runs the Node CLI) | ✓ | — (no agent-context scaffold) |
| [`fixtures/list-query-conformance/`](../fixtures/list-query-conformance/) (how a list route reads its query string: filter tree, search, sort, page, or the named 400) | 95 cases | ✓ (reference; the source of the expected answers) | planned (R-JV) | planned (R-KT) | ✓ (`ListQueryConformanceTests`) | planned (R-PY) | ✓ (`list_query_conformance.rs`, the parser `meta_http` ships) |
| [`fixtures/docs-page-conformance/`](../fixtures/docs-page-conformance/) (the requirements pages and the model-only schema page: each page's data and bytes) | 4 cases | ✓ (reference; the source of the expected bytes) | planned | planned (through Java) | ✓ | planned | planned (G-RS-1) |
| [`fixtures/docs-page-conformance/`](../fixtures/docs-page-conformance/) (the requirement pages and the model-only schema page, built from the docs view: each page's rows, data and bytes) | 4 cases | ✓ (reference; the source of the expected bytes) | ✓ (`DocsPageConformanceTest`) | ✓ (through Java: the Kotlin generators call the JVM page builder) | ✓ | ✓ | ✓ (rows from the view; no requirement ledger, RS-V2) |
| [`fixtures/metamodel-docs/`](../fixtures/metamodel-docs/) (the vocabulary reference pages: each page's data and bytes, shared `templates/metamodel/`) | 1 (23 pages) | ✓ (reference; the source of the expected bytes) | ✓ (`MetamodelDocsCorpusTest`) | ✓ (through Java's builder and emitter) | ✓ (`MetamodelDocsTests`) | ✓ (`test_metamodel_docs_conformance.py`) | ✓ (`tests/metamodel_docs.rs`) |
| [`fixtures/fmt-conformance/`](../fixtures/fmt-conformance/) (#304 — `meta fmt`) | 13 | ✓ (reference) | ✓ | inherits via Java | ✓ | ✓ | — (no `fmt`) |
| [`fixtures/field-lint-conformance/`](../fixtures/field-lint-conformance/) (the `verify` field authoring lint) | 15 | ✓ (reference) | ✓ | inherits via Java | ✓ | ✓ | — |
Expand Down Expand Up @@ -108,7 +109,7 @@ the contracts and the conformance corpora this repository runs against every por
`jinja-render-conformance/` and `jinja-verify-conformance/` (the Jinja engine and its
payload check, Python and TypeScript only, ADR-0061),
`persistence-conformance/` (runtime reads and writes, and the migration scenarios of
the TypeScript reference helper), `agent-context-conformance/`, `metamodel-docs/`, `fmt-conformance/`
the TypeScript reference helper), `agent-context-conformance/`, `agent-pages-pointer/`, `metamodel-docs/`, `fmt-conformance/`
(the canonical serializer, surfaced per-file — ADR-0034's "canonical format" is core),
`field-lint-conformance/` (the advisory field lint every port's `verify` prints),
`model-lint-conformance/` (the advisory overlay, node-name and deprecated-reference lints),
Expand Down Expand Up @@ -833,16 +834,32 @@ REST-standard work lands, and each port's change flips its own entry. The decisi
All 4 cases → [features/requirements.md](features/requirements.md) (the documentation
surfaces) and [features/templates-and-payloads.md](features/templates-and-payloads.md) (the
shared templates). Each case is a model under `input/` and, under `expected/`, every page it
yields (`requirements.md`, `requirements.toon`, `agent/requirements.md`, the model-only
`agent/schema.md`) plus the data each page's shared template is fed and, under `rows/`, the
ledger and model-only schema rows that data is built from (the shapes the docs site reuses). The TypeScript
builders are the source of the expected bytes. The corpus README writes down what a
non-TypeScript schema page contains and what it leaves out.

**Held to it:** `server/typescript/packages/cli/test/docs-page-conformance.test.ts` and
`server/python/tests/conformance/test_docs_page_conformance.py` (rows, page data, then bytes;
the Python builders derive the schema rows from the model with the port's own naming helpers).
The C#, Java (Kotlin through Java) and Rust page generators are planned.
yields (`requirements.toon`, `agent/requirements.md`, the model-only `agent/schema.md`) plus the
data each page's shared template is fed and, under `rows/`, the ledger and model-only schema
rows that data is built from (the shapes the docs site reuses). Every builder reads the docs view
alone, its `storage` section included, so no port walks the model for a page. The TypeScript
builders are the source of the expected bytes. The human `requirements.md` page is retired: the
explorer shows the ledger. The corpus README writes down what a model-only schema page contains
and what it leaves out.

**Held to it, in every port** (rows, page data, then bytes, and the set of files written):
`server/typescript/packages/cli/test/docs-page-conformance.test.ts`,
`server/csharp/MetaObjects.Codegen.Tests/DocsPageConformanceTests.cs`,
`server/java/codegen-base/src/test/java/com/metaobjects/docs/pages/DocsPageConformanceTest.java`
(Kotlin's generators call the same JVM page builder),
`server/python/tests/conformance/test_docs_page_conformance.py` and
`server/rust/metaobjects-codegen/tests/docs_page_conformance.rs`. Rust has no requirement ledger
of its own (RS-V2), so its pages list every requirement the view carries.

### `fixtures/agent-pages-pointer/` (3 cases)

All 3 cases → [features/cli.md](features/cli.md#agent-context-scaffold). Each case is a project
root and the section the always-on `.metaobjects/AGENTS.md` gains above `## Rules`: the agent
pages the committed `.metaobjects/.gen-state/.hashes/` record, in a fixed order, and nothing at
all when none is recorded. **Held to it:**
`server/typescript/packages/sdk/test/agent-context/agent-pages.test.ts` and
`server/python/tests/unit/test_agent_docs.py`, the two ports that write the always-on file. C#
and Java hand `agent-docs` to the Node CLI, and Rust scaffolds no agent context.

### `fixtures/requirement-test-identity-conformance/` (27 cases)

Expand Down
24 changes: 18 additions & 6 deletions docs/features/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ documentation never lands in the code's output directory by default.
|---|---|---|
| `docs` | `docsFile()` | The NEUTRAL per-entity + per-template pages plus a README index, with the ER diagrams. Makes no language assumption at all (ADR-0020). |
| `api-docs` | `apiDocsFile()` | The generated SDK reference under `api/` — types, endpoints, filter operators — plus `AGENT-API.md`, its condensed agent form. |
| `requirements` | `requirementsFile()` | The declared ledger, as `requirements.md` + `requirements.toon`; nothing for a model with no `requirement.*` node. |
| `requirements` | `requirementsFile()` | The declared ledger, as `requirements.toon` (people read it in the explorer, `docs-site`); nothing for a model with no `requirement.*` node. |
| `agent-docs` | `agentDocsFile()` | Three pages an agent reads BEFORE touching a tier (below), under `agent/`. |
| `metamodel-docs` | `metamodelDocsFile()` | The reference of the BUILT-IN metamodel (every registered type, subtype and attribute), not your model, under `metamodel/`. Its rendered form is published at <https://metaobjects.dev/reference>. |
| `docs-site` | `docsSiteFile()` | The HTML site under `site/`: the model explorer by default ([explorer-site.md](explorer-site.md)), the earlier site with `site: "classic"`; `meta eject docs-site` copies its templates and assets to `codegen/docs-site/` for you to change. |
Expand Down Expand Up @@ -408,19 +408,20 @@ Two properties worth knowing:

**Every page is derived from a builder that already exists**, and none has a derivation of
its own. The schema page reads the expected-schema snapshot `meta migrate` diffs and emits
from; the UI page reads the same descriptor emitted as the `<Entity>` const that
`useEntityForm` consumes at runtime; the requirements page reads the same walk the ledger
surface and the generated test stubs are built on. A page an agent is told to trust has to
from (with no dialect, it is the model-only page every port writes, read off the docs view's
`storage` section); the UI page reads the same descriptor emitted as the `<Entity>` const that
`useEntityForm` consumes at runtime; the requirements page reads the docs view's requirements, as the ledger surface does in every
port. A page an agent is told to trust has to
be true, and this is the only way to keep three more of them true.

**An empty page is no file.** Each renders nothing when its tier has nothing to describe —
no physical schema, no generated UI, no ledger — so a project sees only the pages it has
no table or view, no generated UI, no ledger — so a project sees only the pages it has
content for, and one with none sees no `agent/` directory at all.

Physical names, the dialect and view dispatch all come from `metaobjects.config.ts`, which
`meta gen` always has. The neutral model pages make no use of them and stay neutral. `agent/schema.md` asks the same
guard `meta gen` does — a model that emits database code must declare a `dialect`, and
`DEFAULT_DIALECT` is inert — so the page is skipped, with the runner's own message, exactly
`DEFAULT_DIALECT` is inert — so the physical page is skipped, with the runner's own message, exactly
when `meta gen` would refuse the model, and also when the expected schema cannot be built at
all (a primary-key move, a duplicate physical name: conditions `meta migrate` reports
properly, and docs must not be the command that fails on them).
Expand Down Expand Up @@ -942,6 +943,17 @@ file gets the fresh text beside it as `<file>.new`, and the `.metaobjects/.agent
manifest is rewritten only when its text changed. `--skills-dir` and `--no-skills` stay with
the Node CLI. Until the other ports' commands land, their stubs below still redirect.

**The always-on file points at the agent pages only when they are wired.** When the project's
committed `.metaobjects/.gen-state/.hashes/` record an agent page the last `gen` wrote
(`agent/schema.md`, `agent/ui.md`, `agent/requirements.md`, `AGENT-API.md`, `requirements.toon`),
both `meta agent-docs` and Python's `metaobjects agent-docs` add a section above `## Rules` in
`.metaobjects/AGENTS.md` that names each one by its path. With none recorded the file is exactly
as shipped, so it never sends an agent to a page that does not exist. It recognises the pages
by those default paths only: an `agent-docs` run with a custom `subDir` (`llm/schema.md`) writes
pages the section does not name, so they get no line rather than a wrong one, and a project whose
only agent pages are such gets no section. The section's template is the shipped manifest's
`agentPagesTemplate`, and `fixtures/agent-pages-pointer/` gates it.

The C# and Java/Kotlin CLIs keep a **non-executing `agent-docs` pointer
stub** that prints `agent-context scaffolding moved to the meta CLI — run: npx meta
agent-docs --server <lang>` to stderr and exits non-zero. The **live staleness check**
Expand Down
Loading
Loading