The C# port of the cross-language MetaObjects metadata standard. Targets .NET 8 (C# 12).
- Loader (
MetaObjects) — multi-file JSON / YAML loader with overlay merge and cross-fileextends:resolution. - Canonical serializer — byte-identical output to the TypeScript reference (the cross-language wire format).
- YAML authoring front-end — sigil-free attrs +
[]-array suffix + fused-key default subtype + the D2 type-coercion guard (ADR-0006), via YamlDotNet. The cross-language interchange remains canonical JSON; YAML lowers to it. - Codegen (
MetaObjects.Codegen) — idiomatic .NET emit: EF Core entities, anAppDbContext, ASP.NET minimal-API CRUD routes, filter allowlists, payload records, output parsers/prompts, TPH per-subtype surfaces and M:N navigation. - Render + verify (
MetaObjects.Render) — Mustache render, payload value-object codegen and theverifydrift gates, byte-identical with the other four ports against the shared render corpus. - CLI (
MetaObjects.Cli) — packaged as a .NET tool invokeddotnet meta, withgenandverifyverbs. - Conformance runners — auto-discover the shared corpora under
fixtures/(metamodel, yaml, render, verify, validation, api-contract, persistence, registry manifest). The corpora are the oracles — when a fixture goes red the port is wrong, never the fixture.
- Schema migrations. Per ADR-0015 the migration engine is owned by the TypeScript toolchain; the C# migrate engine and its
migrate/--from-dbCLI surface were removed. Use the NodemetaCLI (meta migrate,meta verify --db) for schema. This is only about schema — C# codegen and runtime data access are first-class here. - Byte-equal generated code. Each language emits its own idiomatic output; byte equivalence is a goal at the render/canonical-serializer layer, not the codegen layer. Cross-port codegen parity is enforced behaviourally, through the api-contract corpus.
- The
dbProviderprovider — the metamodel conformance corpus uses onlymetaobjects-core-types.
To scaffold MetaObjects context files (.metaobjects/AGENTS.md, .metaobjects/CLAUDE.md, and
.claude/skills/metaobjects-*/) into your project so your AI assistant understands how to
author metadata and run codegen, use the Node meta CLI:
npx meta agent-docs --server csharp(Running dotnet meta agent-docs prints this redirect and exits.)
cd server/csharp
dotnet testThe test suite includes per-fixture Lint and Conformance theories over the shared corpus at ../fixtures/conformance/ plus unit tests for the parser, serializer, registry, tree, and loader.
MetaObjects/— class library (MetaObjects.csproj)Constants.cs,Errors.cs,Registry.cs,Provider.cs,DataType.cs,DataConverter.csMeta/MetaData.csand the concrete node classes (MetaRoot,MetaObject,MetaField, etc.)CoreAttrSchemas.cs,CoreTypes.cs— themetaobjects-core-typesproviderParser.cs,SuperResolve.cs,SerializerJson.csYamlDesugar.cs,ParserYaml.cs— YAML authoring front-end (ADR-0006)Loader/—IMetaDataSource,InMemoryStringSource,FileSource,DirectorySource,UriSource,MetaDataLoader(withFromDirectory/FromUris/FromStringstatic factories),ValidationPasses
MetaObjects.Conformance.Tests/— xUnit test project + conformance harnessConformanceAdapter.cs,FixtureDiscovery.cs,OperationScript.cs,FixtureLint.cs,Navigator.cs,CapabilityBinding.cs,Result.cs,ExpectedFailures.cs,conformance-expected-failures.json,ConformanceTests.csYamlConformanceTests.cs,YamlDesugarTests.cs,yaml-conformance-expected-failures.json— YAML conformance + unit tests- Per-pipeline-stage unit tests (
ErrorsTests,RegistryTests,TreeTests,ParserTests,SerializerTests,LoaderTests,SuperResolveTests,ValidationTests, …)
MetaObjects.Codegen/— the .NET emit pipeline (Generators/holds entity, db-context, routes, payload, filter-allowlist, output-parser/prompt, extractor, template) +CodegenRunner,GeneratorRegistry,CodegenDriftMetaObjects.Render/— Mustache render, payload value objects,verifyMetaObjects.Cli/— thedotnet metatool (gen,verify)MetaObjects.Codegen.Tests/,MetaObjects.Render.Tests/,MetaObjects.Cli.Tests/— per-project unit + golden testsMetaObjects.IntegrationTests/— the generated ASP.NET stack booted over HTTP against Testcontainers Postgres (api-contract + persistence corpora)