Skip to content

Commit fc02e48

Browse files
committed
docs: close out FR-023 Phase 2 (shipped matrix, skills, agent-context fixtures)
Rewrite the feature page's Phase 2 section as the shipped per-port matrix, name what stays deferred, fix stale transport wording in the port docs, and teach the Java/Kotlin/C# publish paths, the deps checks and the maven/nuget transports in the verify, codegen, authoring, audit and capability-sheet skills. Agent-context expected copies regenerated with the repo generator.
1 parent 7c41344 commit fc02e48

33 files changed

Lines changed: 351 additions & 140 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,13 @@ loading. A port that reports `1.2` does not know that vocabulary; upgrade every
292292
`docs/features/extending-with-providers.md` now has a worked example per language, and the
293293
`metaobjects-authoring` skill teaches it, with a reference file per language.
294294

295+
### Documentation
296+
297+
- **Separate-repo model sharing (FR-023 Phase 2) close-out.** The feature page's Phase 2 section is now
298+
the shipped per-port matrix (consume, check, publish, runtime load, transports), the deferred list
299+
names what is still not built, and the verify, codegen, authoring, audit and capability-sheet skills
300+
teach the Java, Kotlin and C# publish paths, the `deps` checks and the `maven` and `nuget` transports.
301+
295302
### Changed
296303

297304
- **`docsSiteFile()` builds the model explorer by default.** A project that lists

‎agent-context/skills/metaobjects-audit/references/csharp.md‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,15 @@ dotnet meta gen metaobjects --out Generated --generators entity # narrow to de
4242

4343
dotnet meta verify --codegen # regenerate to temp, diff vs committed output
4444
dotnet meta verify --templates # check {{field}} refs vs payload VO (bare default)
45+
dotnet meta verify --deps # shared-model dependencies vs deps.lock.json (opt-in)
4546
```
4647

48+
`verify --deps` applies when the project declares `dependencies` in `.metaobjects/config.json`: it
49+
hashes each `path` dependency against the lock and fails with `ERR_DEPENDENCY_UPSTREAM_DRIFT` on
50+
`drifted` or `unresolved` (a `maven`, `nuget`, `npm` or `python` dependency reports `unresolved`;
51+
run the Node `meta deps check` for those). A project that publishes a model wires the
52+
`SharedModelGenerator` in `codegen/Generators.cs`; `verify --codegen` drift-gates its output.
53+
4754
Schema migration + live-DB drift run through the **Node `meta` CLI** regardless of
4855
server language — see the migration reference. `dotnet meta verify --db` is
4956
rejected (exit 2).

‎agent-context/skills/metaobjects-audit/references/java.md‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,13 @@ mvn metaobjects:verify -Dmeta.verify.mode=codegen # regen to temp, diff vs c
4040
mvn metaobjects:verify -Dmeta.verify.mode=templates # {{field}} refs vs payload VO
4141
```
4242

43+
If the project declares `dependencies` in `.metaobjects/config.json` (a model shared from another
44+
repository), also run `mvn metaobjects:verify -Dmeta.verify.mode=deps`: it hashes each `path`
45+
dependency against `.metaobjects/deps.lock.json` and fails with `ERR_DEPENDENCY_UPSTREAM_DRIFT` on
46+
`drifted` or `unresolved` (a `maven`, `nuget`, `npm` or `python` dependency reports `unresolved`;
47+
run the Node `meta deps check` for those). A project that publishes a model wires the
48+
`shared-model` generator; `verify --codegen` drift-gates its output.
49+
4350
Schema migration + live-DB drift run through the **Node `meta` CLI** regardless of
4451
server language — see the migration reference. `mvn metaobjects:verify -Dmeta.verify.mode=db`
4552
is rejected (exit 2).

‎agent-context/skills/metaobjects-audit/references/kotlin.md‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,13 @@ mvn metaobjects:verify -Dmeta.verify.mode=codegen # regen to temp, diff vs c
4444
mvn metaobjects:verify -Dmeta.verify.mode=templates # {{field}} refs vs payload VO
4545
```
4646

47+
If the project declares `dependencies` in `.metaobjects/config.json` (a model shared from another
48+
repository), also run `mvn metaobjects:verify -Dmeta.verify.mode=deps`: it hashes each `path`
49+
dependency against `.metaobjects/deps.lock.json` and fails with `ERR_DEPENDENCY_UPSTREAM_DRIFT` on
50+
`drifted` or `unresolved` (a `maven`, `nuget`, `npm` or `python` dependency reports `unresolved`;
51+
run the Node `meta deps check` for those). A project that publishes a model wires the
52+
`shared-model` generator; `verify --codegen` drift-gates its output.
53+
4754
Kotlin generators run through the **same Maven plugin goal** as Java generators —
4855
both are SPI-discovered by the `metaobjects-maven-plugin`. Schema migration + live-DB
4956
drift run through the **Node `meta` CLI** regardless of server language — see the

‎agent-context/skills/metaobjects-audit/references/python.md‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,14 @@ metaobjects gen # run every target's generators (metaobjec
4040
metaobjects gen --generators entity # narrow to declared entries
4141
metaobjects verify --codegen # regenerate to temp, diff vs each committed outDir (bare default)
4242
metaobjects verify --templates # {{field}} refs vs payload VO
43+
metaobjects deps check # shared-model dependencies vs deps.lock.json (also: verify --deps)
4344
```
4445

46+
`deps check` applies when the project declares `dependencies` in `.metaobjects/config.json`: it
47+
hashes each `path` dependency against the lock and fails with `ERR_DEPENDENCY_UPSTREAM_DRIFT` on
48+
`drifted` or `unresolved` (a `maven`, `nuget`, `npm` or `python` dependency reports `unresolved`;
49+
run the Node `meta deps check` for those). Python consumes a shared model but cannot publish one.
50+
4551
With no `metaobjects.config.yaml`, `gen` exits 2 and generates nothing. A target's
4652
`generators` takes stable generator names: `entity`, `routes`, `filter-allowlist`,
4753
`names`, `output-parser`, `extractor`, `output-prompt`, `render-helper`, `trace-helper`,

‎agent-context/skills/metaobjects-authoring/references/metadata-dependencies.md‎

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,14 @@ committed snapshot — that snapshot loads BEFORE your own files, so a foreign
99
abstract resolves via `extends` and a foreign node re-opens via `overlay: true`
1010
exactly like a local one. A dependency names one transport: `path` (a directory
1111
relative to the directory holding `.metaobjects/`), `npm` (an installed npm
12-
package, e.g. `{ "name": "acme-model", "npm": "@acme/model", "dir": "metaobjects" }`)
13-
or `python` (an installed Python package by its import name, e.g.
14-
`{ "name": "acme-model", "python": "acme_model", "dir": "metaobjects" }`). For
15-
`npm`/`python`, install the package with the project's package manager first;
12+
package, e.g. `{ "name": "acme-model", "npm": "@acme/model", "dir": "metaobjects" }`),
13+
`python` (an installed Python package by its import name, e.g.
14+
`{ "name": "acme-model", "python": "acme_model", "dir": "metaobjects" }`), `maven`
15+
(`{ "name": "acme-model", "maven": "com.acme:acme-model", "version": "1.0.0" }`, a JAR in the
16+
local Maven repository) or `nuget`
17+
(`{ "name": "acme-model", "nuget": "Acme.Model", "version": "1.0.0" }`, a package in the NuGet
18+
global packages folder). For
19+
`npm`/`python`/`maven`/`nuget`, install or restore the package with the project's package manager first;
1620
`meta deps sync` locates it, copies its shared model into the snapshot, and says
1721
what to install when it is missing. Prefer the package transport over a `path` into
1822
someone else's checkout when the publisher releases a package. Two rules are

‎agent-context/skills/metaobjects-codegen/references/dependencies-and-shared-models.md‎

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,19 @@ replace those calls: an unmodified copy publishes the same bytes as the packaged
4141
generator. To publish through a package, point its `target` inside the package
4242
(an npm package's directory listed in `files`; a Python package's directory shipped
4343
as package data), run `meta gen`, then release the package as usual; consumers
44-
declare an `npm` or `python` dependency on it. With no `version` option the
44+
declare an `npm`, `python`, `maven` or `nuget` dependency on it. With no `version` option the
4545
manifest takes the nearest `package.json` version, else a `pyproject.toml`
4646
`[project]` version — pass `version` when neither is the package consumers install.
47-
Only TypeScript can run it in Phase 1a. TypeScript, Python, Java, Kotlin (through
48-
Java's loader and Maven plugin) and C# can *consume* a dependency, and only the
49-
TypeScript toolchain can *publish* one.
47+
TypeScript, Java, Kotlin and C# can *publish* with byte-identical output: the Java and Kotlin
48+
`shared-model` generator runs through `mvn metaobjects:generate` (`SharedModelGenerator` /
49+
`KotlinSharedModelGenerator`, args `name`, `include`, `exclude`, `files`, `version`; the version
50+
defaults to the module `<version>`); the C# one is `new SharedModelGenerator { ModelName, Include,
51+
Files, OutDir }` in `codegen/Generators.cs` through `dotnet meta gen` (version from the project
52+
`<Version>`). Eject with `mvn metaobjects:eject -Dnames=shared-model -Dport=java|kotlin` or `dotnet
53+
meta eject shared-model`. A JVM publisher ships the pair as the JAR's `metaobjects/` resources and a
54+
C# publisher as the NuGet package's `metaobjects/` content; consumers declare
55+
`{ "name": "x", "maven": "com.acme:model", "version": "1.0.0" }` or
56+
`{ "name": "x", "nuget": "Acme.Model", "version": "1.0.0" }` (also `npm`/`python`/`path`).
57+
TypeScript, Python, Java, Kotlin and C# *consume*; Python cannot publish. Node `meta deps sync`
58+
remains the only writer of the lock and snapshot in every port.
5059
Full detail: `docs/features/metadata-dependencies.md`.

‎agent-context/skills/metaobjects-fit-assessment/references/capability-sheet.md‎

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,18 @@ building block. Every generator is a reference helper an adopter selects, ejects
3636
- **Sharing a model** (`docs/features/metadata-dependencies.md`): in one repository, every port
3737
reads the same metadata directory (`sources`), so a TS service and a Java, C# or Python
3838
service can generate from one declaration today. **Across repositories**, a published model
39-
with a hash-locked snapshot works for **TypeScript publishers only**; **TypeScript, Python,
40-
Java, Kotlin and C# consume** it at build time (a committed `.metaobjects/deps/` snapshot loaded
41-
ahead of the project's own files; `extends`/overlay onto a dependency's node resolves; imported
42-
nodes are not generated unless `scope.include` names their package). The Node `meta deps sync`
43-
is the only writer of the lock and snapshot, so a Java, Kotlin or C# consumer needs Node to
44-
sync. Dependencies come from a `path`, an npm package or a Python package; the Maven and NuGet
45-
transports are design only. Java, Kotlin, Python and C# cannot publish; the Spring runtime does
46-
not yet auto-load the snapshot, and the Java/Kotlin `verify` does not yet check dependency
47-
drift. Plain vendoring (`docs/features/metadata-sources.md`, "Vendoring") still works and
39+
with a hash-locked snapshot works in every port: **TypeScript, Java, Kotlin and C# publish** it
40+
(`sharedModelFile()`, or the `shared-model` generator through `metaobjects:generate` and
41+
`dotnet meta gen`, all ejectable); **TypeScript, Python, Java, Kotlin and C# consume** it at
42+
build time (a committed `.metaobjects/deps/` snapshot loaded ahead of the project's own files;
43+
`extends`/overlay onto a dependency's node resolves; imported nodes are not generated unless
44+
`scope.include` names their package), and the Spring runtime auto-loads the snapshot. Every port
45+
can check drift (`meta deps check`, `metaobjects deps check`, `mvn metaobjects:verify
46+
-Dmeta.verify.mode=deps`, `dotnet meta verify --deps`). The Node `meta deps sync` is the only
47+
writer of the lock and snapshot, so a Java, Kotlin, C# or Python consumer needs Node to sync.
48+
Dependencies come from a `path`, an npm or Python package, a Maven artifact (a JAR in the local
49+
repository) or a NuGet package; only Node resolves the package transports in `check`. Python
50+
cannot publish, and a JVM classpath read with no committed snapshot is not built. Plain vendoring (`docs/features/metadata-sources.md`, "Vendoring") still works and
4851
carries no upstream hash check. Source: `docs/features/metadata-dependencies.md`, "Phase 2".
4952
- **Libraries** (`docs/features/libraries.md`): `iam` (preview) and `ai` (stable) ship as
5053
declared designs; the core layer is sourceless and adds no tables. Mention one only when the

‎agent-context/skills/metaobjects-verify/SKILL.md‎

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -166,15 +166,14 @@ with `ERR_DEPENDENCY_SNAPSHOT_STALE` naming the fix: run `meta deps sync`.
166166
if any reference isn't on the payload VO. This is the build-time gate for the
167167
prompt-construction pillar.
168168

169-
- **`--deps`** — dependency drift (FR-023, **Node `meta` only** — but **any
170-
backend**, like `--db`: the check reads only `.metaobjects/config.json` and has
171-
no backend dependency of its own). Re-resolves each declared dependency's `path`
169+
- **`--deps`** — dependency drift (FR-023). Re-resolves each declared dependency
172170
right now and compares its installed artifact's hash against
173-
`.metaobjects/deps.lock.json` — the same comparison `meta deps check` runs. Only
174-
TypeScript and Python additionally LOAD the resulting snapshot and honour the
175-
default-exclusion it implies — a Java/Kotlin/C# project can run this gate today
176-
even though its own codegen can't yet consume a dependency. Never part of the
177-
bare-`verify` default: it
171+
`.metaobjects/deps.lock.json` — the same comparison `meta deps check` runs. Node
172+
`meta` resolves every transport (`path`, `npm`, `python`, `maven`, `nuget`); the
173+
Python, Java/Kotlin and C# checks resolve `path` only and report any other
174+
transport `unresolved`, naming Node `meta deps check` (a check that cannot check
175+
must not pass). Every port also loads the committed snapshot and honours the
176+
default-exclusion it implies. Never part of the bare-`verify` default: it
178177
needs the publisher's `path` reachable, which CI checking out only your own repo
179178
may not have. Reports `current` / `drifted` / `unresolved` per dependency;
180179
`drifted` or `unresolved` fails with `ERR_DEPENDENCY_UPSTREAM_DRIFT`, fix is
@@ -188,6 +187,16 @@ port's own build tool, not the Node `meta`:
188187
| TS | `meta verify --codegen` | `meta verify --templates` | `meta verify --db <url>` |
189188
| Java / Kotlin | `mvn metaobjects:verify -Dmeta.verify.mode=codegen` | `mvn metaobjects:verify -Dmeta.verify.mode=templates` | Node `meta verify --db` only |
190189
| C# | `dotnet meta verify --codegen` | `dotnet meta verify --templates` | Node `meta verify --db` only |
190+
| Python | `metaobjects verify` (`--codegen` is in the default) | n/a | Node `meta verify --db` only |
191+
192+
Dependency drift (`--deps`) per port:
193+
194+
| Port | Dependency drift |
195+
|---|---|
196+
| TS | `meta deps check`, `meta verify --deps` |
197+
| Python | `metaobjects deps check`, `metaobjects verify --deps` |
198+
| Java / Kotlin | `mvn metaobjects:verify -Dmeta.verify.mode=deps` |
199+
| C# | `dotnet meta verify --deps` |
191200
| Python | `metaobjects verify --codegen` | `metaobjects verify --templates` | Node `meta verify --db` only |
192201

193202
Every non-TS port's `verify` rejects `--db` outright (exit 2, "schema verify is the

‎docs/CONFORMANCE.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -485,7 +485,7 @@ above: one committed `cases.json`, no per-port fixture, no ledger. The corpus ha
485485
Kotlin runs the same goal), by **Python**, in `tests/conformance/test_dependency_conformance.py`
486486
(`metaobjects deps check` and `verify --deps`), and by **C#**, in `DependencyConformanceTests`
487487
(`dotnet meta verify --deps`). The arm exists so that each port's check is written against the
488-
same edge cases (Phase 2, #482).
488+
same edge cases (FR-023 Phase 2, #482, shipped).
489489
- **Transport (32 cases, `transport-cases.json`).** The `npm`, `python`, `maven` and `nuget` transports
490490
`meta deps sync` uses to find an installed package: npm packages under a temp `node_modules`, Python
491491
packages on a temp import path, jars in a temp local Maven repository, packages in a temp NuGet cache,

0 commit comments

Comments
 (0)