From 11f8ca116e27ea6384e5df83bf8d6d67f04027c6 Mon Sep 17 00:00:00 2001 From: Doug Mealing Date: Thu, 26 Nov 2026 23:30:22 -0500 Subject: [PATCH 1/3] refactor(codegen-kotlin): move the entity, enum and Spring config generators onto KotlinWriter and drop KotlinPoet The last Kotlin generators that built KotlinPoet specs now write through KotlinWriter (ADR-0063): KotlinEntityGenerator (data class, Java builder, cross-field properties, TPH Validation, abstract interface shape and MetaNetJson.kt), KotlinEnumEmitter and KotlinSpringConfigGenerator. KotlinTypeMapper answers with the writer's own KotlinTypeName / KotlinClassName, KotlinCrossFieldRules answers expression strings, and KotlinPoetFileWriter is removed. The kotlinpoet dependency leaves codegen-kotlin; kotlin-reflect, which it supplied at runtime, is declared directly so consumers' runtime classpath is unchanged. The layout ratchet's unconverted allowlist is now empty (KotlinNaming's packageHeader delegates to the writer); the ratchet itself stays. Generated output changes in layout only: the 32 regenerated goldens are identical to the old ones once imports, `public`, package qualifiers, whitespace and trailing commas are normalised, and their comment text is unchanged. MetaNetJson.kt is byte-identical. Owned entity / exposed-table / routes / relations / repository / spring-config / api-docs copies ejected before 1.3.0 named KotlinPoet types and must be re-ejected; the CHANGELOG upgrade note says so, and the four KotlinPoet frozen copies in ejected-at-base (with their ejectWith classes) are refreshed to the 1.3.0 eject output. Docs and agent-context skill references that said Kotlin codegen runs on KotlinPoet are corrected, and the shipped agent-context tree, its Python copy, the agent-context conformance fixtures and the llms mirrors are rebuilt. --- AGENTS.md | 4 +- CHANGELOG.md | 27 + ...e8ecdef3b83fec0.md => 284ca45846939d46.md} | 2 +- .../files/2e0dcc923c72abfa.md | 4 +- .../files/60ab1d9a63aff1f8.md | 2 +- ...03d471c39227bb7.md => d6c5d2863183241f.md} | 4 +- agent-context-shipped/manifest.json | 208 +- .../metaobjects-audit/references/kotlin.md | 4 +- .../metaobjects-codegen/references/kotlin.md | 4 +- .../references/template-or-code.md | 2 +- .../metaobjects-prompts/references/kotlin.md | 2 +- docs/llms/llms-full.txt | 4 +- docs/llms/llms.txt | 4 +- docs/ports/kotlin.md | 12 +- .../references/template-or-code.md | 2 +- .../metaobjects-audit/references/kotlin.md | 4 +- .../metaobjects-codegen/references/kotlin.md | 4 +- .../references/template-or-code.md | 2 +- .../metaobjects-prompts/references/kotlin.md | 2 +- .../references/template-or-code.md | 2 +- .../references/template-or-code.md | 2 +- .../references/template-or-code.md | 2 +- .../references/template-or-code.md | 2 +- .../registry.json | 9 +- server/java/MIGRATION.md | 2 +- server/java/README.md | 6 +- server/java/codegen-kotlin/README.md | 2 +- server/java/codegen-kotlin/pom.xml | 13 +- .../generator/kotlin/Fr019SharedEnum.kt | 12 +- .../generator/kotlin/KotlinCrossFieldRules.kt | 85 +- .../generator/kotlin/KotlinEntityGenerator.kt | 709 ++-- .../generator/kotlin/KotlinEnumEmitter.kt | 43 +- .../kotlin/KotlinExposedTableGenerator.kt | 19 +- .../kotlin/KotlinExtractSchemaEmitter.kt | 2 +- .../generator/kotlin/KotlinGenUtil.kt | 10 +- .../generator/kotlin/KotlinNaming.kt | 3 +- .../generator/kotlin/KotlinPoetFileWriter.kt | 46 - .../kotlin/KotlinRelationsGenerator.kt | 20 +- .../kotlin/KotlinRepositoryGenerator.kt | 6 +- .../kotlin/KotlinSpringConfigGenerator.kt | 119 +- .../kotlin/KotlinSpringControllerGenerator.kt | 4 +- .../generator/kotlin/KotlinTypeMapper.kt | 80 +- .../kotlin/apidocs/KotlinApiModelBuilder.kt | 2 +- .../generator/kotlin/writer/KotlinTypeName.kt | 127 + .../generator/kotlin/writer/KotlinWriter.kt | 8 + .../EjectedAtBaseGeneratorsCompatTest.kt | 38 +- .../kotlin/KotlinEntityGeneratorTest.kt | 16 +- .../KotlinGeneratorOpenForExtensionTest.kt | 8 +- .../kotlin/KotlinReportRestSurfaceTest.kt | 16 +- .../kotlin/KotlinReportTableGeneratorTest.kt | 14 +- .../generator/kotlin/KotlinTypeMapperTest.kt | 45 +- ...teGuardTest.kt => KotlinWriteGuardTest.kt} | 58 +- .../KotlinCrossFieldRules.kt.txt | 276 ++ .../KotlinDecimalWireEmitter.kt.txt | 259 ++ .../KotlinDurationWireEmitter.kt.txt | 215 ++ .../KotlinEntityGenerator.kt.txt | 792 +++-- .../ejected-at-base/KotlinEnumEmitter.kt.txt | 126 + .../KotlinExposedTableGenerator.kt.txt | 1345 +++++--- .../KotlinRelationsGenerator.kt.txt | 303 +- .../KotlinSpringControllerGenerator.kt.txt | 2950 ++++++++++------- .../KotlinUnknownBodyKeysEmitter.kt.txt | 84 + .../KotlinValidationIssuesEmitter.kt.txt | 151 + .../resources/layout-ratchet/allowlist.json | 11 +- .../acme/blog/Author.kt | 57 +- .../acme/blog/Post.kt | 57 +- .../acme/blog/Author.kt | 59 +- .../acme/catalog/Product.kt | 109 +- .../acme/catalog/Product.kt | 105 +- .../entity-with-enum/acme/game/Player.kt | 77 +- .../acme/game/PlayerStatus.kt | 12 +- .../entity-with-fk/acme/blog/Author.kt | 57 +- .../entity-with-fk/acme/blog/Post.kt | 57 +- .../acme/commerce/Address.kt | 82 +- .../acme/commerce/User.kt | 97 +- .../acme/commerce/UserMetadata.kt | 56 +- .../acme/commerce/Address.kt | 80 +- .../entity-with-storage/acme/commerce/User.kt | 97 +- .../acme/commerce/UserMetadata.kt | 54 +- .../acme/ops/OrderReport.kt | 14 +- .../acme/ops/OrderReportArgs.kt | 41 +- .../entity-with-tph/acme/auth/Auth.kt | 121 +- .../entity-with-tph/acme/auth/AuthLine.kt | 57 +- .../entity-with-tph/acme/auth/AuthType.kt | 12 +- .../acme/auth/BridgeAuthValidation.kt | 14 +- .../acme/auth/CouponAuthValidation.kt | 11 +- .../acme/auth/PermitAuthValidation.kt | 13 +- .../acme/report/SalesReport.kt | 16 +- .../payload-with-origins/acme/ai/Author.kt | 74 +- .../acme/ai/AuthorReport.kt | 13 +- .../payload-with-origins/acme/ai/Post.kt | 54 +- .../acme/demo/Author.kt | 171 +- .../acme/ai/OpinionOutputPayload.kt | 82 +- .../acme/ai/OpinionOutputPayloadConfidence.kt | 12 +- .../acme/ai/Greeting.kt | 41 +- .../template-prompt-simple/acme/ai/Author.kt | 54 +- ...e8ecdef3b83fec0.md => 284ca45846939d46.md} | 2 +- .../shipped/files/2e0dcc923c72abfa.md | 4 +- .../shipped/files/60ab1d9a63aff1f8.md | 2 +- ...03d471c39227bb7.md => d6c5d2863183241f.md} | 4 +- .../agent_context/shipped/manifest.json | 208 +- spec/README.md | 2 +- spec/roadmap.md | 4 +- 102 files changed, 6311 insertions(+), 4110 deletions(-) rename agent-context-shipped/files/{ce8ecdef3b83fec0.md => 284ca45846939d46.md} (98%) rename server/python/src/metaobjects/agent_context/shipped/files/d3eaa47c0bbd9332.md => agent-context-shipped/files/2e0dcc923c72abfa.md (99%) rename server/python/src/metaobjects/agent_context/shipped/files/e0879c95ed161b9e.md => agent-context-shipped/files/60ab1d9a63aff1f8.md (97%) rename agent-context-shipped/files/{003d471c39227bb7.md => d6c5d2863183241f.md} (98%) delete mode 100644 server/java/codegen-kotlin/src/main/kotlin/com/metaobjects/generator/kotlin/KotlinPoetFileWriter.kt create mode 100644 server/java/codegen-kotlin/src/main/kotlin/com/metaobjects/generator/kotlin/writer/KotlinTypeName.kt rename server/java/codegen-kotlin/src/test/kotlin/com/metaobjects/generator/kotlin/{KotlinPoetWriteGuardTest.kt => KotlinWriteGuardTest.kt} (79%) create mode 100644 server/java/codegen-kotlin/src/test/resources/ejected-at-base/KotlinCrossFieldRules.kt.txt create mode 100644 server/java/codegen-kotlin/src/test/resources/ejected-at-base/KotlinDecimalWireEmitter.kt.txt create mode 100644 server/java/codegen-kotlin/src/test/resources/ejected-at-base/KotlinDurationWireEmitter.kt.txt create mode 100644 server/java/codegen-kotlin/src/test/resources/ejected-at-base/KotlinEnumEmitter.kt.txt create mode 100644 server/java/codegen-kotlin/src/test/resources/ejected-at-base/KotlinUnknownBodyKeysEmitter.kt.txt create mode 100644 server/java/codegen-kotlin/src/test/resources/ejected-at-base/KotlinValidationIssuesEmitter.kt.txt rename server/python/src/metaobjects/agent_context/shipped/files/{ce8ecdef3b83fec0.md => 284ca45846939d46.md} (98%) rename agent-context-shipped/files/d3eaa47c0bbd9332.md => server/python/src/metaobjects/agent_context/shipped/files/2e0dcc923c72abfa.md (99%) rename agent-context-shipped/files/e0879c95ed161b9e.md => server/python/src/metaobjects/agent_context/shipped/files/60ab1d9a63aff1f8.md (97%) rename server/python/src/metaobjects/agent_context/shipped/files/{003d471c39227bb7.md => d6c5d2863183241f.md} (98%) diff --git a/AGENTS.md b/AGENTS.md index 53f811e9b7..4c07da5621 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -12,7 +12,7 @@ The metamodel is the **durable spine**; generated code is **regenerated output** The first four ship per-language today across the five ports (TS / C# / Java / Python / Kotlin), with cross-port conformance corpora verifying byte-identical behavior. The fifth ships its vocabulary, its `verify` checks and a `requirement-tests` generator in every port, and its authoring lint in TypeScript only. The sixth is content the other five compose, shipped as named opt-in artifacts: -1. **Codegen** *(reference helpers, not core — see "Core vs helpers" above; ejectable in every port)* — emit per-language code (Drizzle/Zod + Fastify for TS, EF Core + ASP.NET for C#, Spring REST + DTO + Repository for Java via `codegen-spring`, Pydantic + FastAPI for Python, KotlinPoet + Exposed + Spring for Kotlin via `codegen-kotlin`). Hand-edit-preserving regen via three-way merge (TypeScript only). +1. **Codegen** *(reference helpers, not core — see "Core vs helpers" above; ejectable in every port)* — emit per-language code (Drizzle/Zod + Fastify for TS, EF Core + ASP.NET for C#, Spring REST + DTO + Repository for Java via `codegen-spring`, Pydantic + FastAPI for Python, KotlinWriter + Exposed + Spring for Kotlin via `codegen-kotlin`). Hand-edit-preserving regen via three-way merge (TypeScript only). 2. **Runtime metadata** — load metadata at runtime, drive behavior dynamically (CRUD, validation, relationships, dynamic admin UIs, LLM tool registration). On Kysely (TS), a DB-API 2 driver via ObjectManager (Python), modernized JDBC + Spring-tx via OMDB (Java), Exposed (Kotlin). **C# runtime metadata is on the roadmap** — its EF Core output is generated code, not a metadata-driven runtime; the runtime `MetaObjects` package depends only on YamlDotNet and ships no data access. 3. **Drift detection** — `meta verify` catches divergence between code and metadata (covers entity codegen, prompt templates, output parsers, schema). Quality-of-life on top of codegen + runtime. 4. **Prompt construction** — a prompt is code, not a string scattered across services. Declare a prompt's payload as a typed projection (payload bloat becomes a diff), keep its text external and provider-resolved, and render it deterministically: snapshot-testable, cache-stable (no whitespace change silently breaking exact-prefix prompt-cache hits), and drift-checked at build time so a renamed field can't degrade a prompt. Conformance-gated, so the guarantee holds in every language port. **Render + payload-VO codegen + `verify` + parser-on-receipt for a *responding* `template.prompt` — one carrying `@responseRef` (FR-006) — + the output-format prompt fragment & tolerant `extract` parser (FR-010) ship in all five ports today** (since 0.24.0 the whole inbound tier keys off `@responseRef`; a `template.output` is outbound-only and emits no parser — ADR-0052) — the library-side building blocks of the pillar are complete. The one remaining library-side piece is MCP exposure of declared prompts/tools (see `spec/roadmap.md`); the application-level consolidation (eval harness, end-to-end declared-prompt orchestration) and consumer adoption are exercised in adopter projects, not in this library repo. Designed in `docs/superpowers/specs/2026-05-22-fr-004-cross-language-prompt-construction-design.md`. @@ -71,7 +71,7 @@ PyPI has had no product change since `0.25.0` — nothing is broken. - **C#** — `MetaObjects` (loader + canonical serializer + conformance) + `MetaObjects.Render` (Mustache + payload-VO + `verify`) + `MetaObjects.Codegen` (EF Core entities + `AppDbContext` + CRUD minimal-API routes). Schema migrations run in EF Core Migrations or the Node `meta migrate` reference helper (ADR-0015): the C# migrate engine and the `migrate`/`--from-db` CLI surface were removed; the C# CLI is codegen (`init`/`gen`/`eject`), `verify` and `fmt` only, packaged as a .NET tool invoked **`dotnet meta`** (not a bare `meta` — that name belongs to the Node schema CLI). EF Core runtime data-access stays per-port. - **Java** — `metadata` + `omdb` + `om` + `core-spring` + `metadata-ktx` (Kotlin facade) + `codegen-spring` (Spring controllers + DTOs + repositories + filter allowlists + payload records + output parsers) + `codegen-mustache` + `codegen-plantuml` + `render` + `maven-plugin` (`metaobjects:generate`/`metaobjects:editor` + a `metaobjects:verify` **codegen-drift** goal — distinct from the removed live-DB `metaobjects:verify`; Kotlin generators run through `metaobjects:generate` via the shared SPI). FR-003 (OMDB runtime persistence + binding registry + typed jsonb + Spring-tx + source/origin metamodel) fully shipped, including Plan 4 (engine-debt remediation: atomic mapping cache, JDBC codec registry, `inTransaction` template). **Schema migrations run in the project's own tool or the reference migration helper** (`@metaobjectsdev/cli migrate`); the Java port's diff-and-converge migration engine and its `metaobjects:migrate` / live-DB-drift `metaobjects:verify` Maven goals were removed, and per ADR-0015 Decision 2 the dev/test runtime auto-create path (`MetaClassDBValidatorService` + the drivers' `createTable`/`createIndex`/`createForeignKey`/`createSequence` DDL) is **also** removed — **OMDB is pure data-access** (CRUD/query/codec/transactions only). - **Python** — `metaobjects` (loader + canonical serializer + conformance + render + verify + codegen) + an `ObjectManager` runtime layer. The `migrate` module was removed (migrations run in the project's own tool or the Node `meta migrate` reference helper, ADR-0015); Python is pure data-access (codegen + ObjectManager runtime), with a **`metaobjects` console-script** (`gen`/`verify` codegen — no `migrate`). All five conformance corpora green. -- **Kotlin** — `codegen-kotlin` (KotlinPoet on 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. +- **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. diff --git a/CHANGELOG.md b/CHANGELOG.md index 9d5a265457..f845a1ae61 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -290,6 +290,19 @@ there is described in full here. This list is where to start. instead of answering 400, and an omitted nullable one starts at the default instead of NULL. Every call that passed the argument compiles and behaves as before; a call that leaves it out now compiles and gets the default. +- **Kotlin: KotlinPoet is no longer a dependency of `codegen-kotlin`, so an owned `entity`, + `exposed-table`, `routes`, `relations`, `repository`, `spring-config` or `api-docs` generator + ejected before 1.3.0 no longer compiles.** Those seven named KotlinPoet types, directly or + through the helpers they call: `KotlinTypeMapper.kotlinTypeName`, + `payloadTypeName`, `mapValueScalarTypeName` and `enumTypeName` return + `com.metaobjects.generator.kotlin.writer.KotlinTypeName` / `KotlinClassName` where they + returned KotlinPoet's `TypeName` / `ClassName`, and `KotlinPoetFileWriter` is removed. Re-eject + the generator (`mvn metaobjects:eject`) and re-apply your changes. `KotlinClassName` keeps the + members those copies used (`packageName`, `simpleName`, `canonicalName`, `parameterizedBy`, + `copy(nullable = …)`), and `toString()` spells a type fully qualified as KotlinPoet did, so code + that reads a type as text behaves as before. A copy of any other Kotlin generator still + compiles unchanged. A build that relied on getting KotlinPoet transitively through `codegen-kotlin` + declares it itself; `kotlin-reflect` is still on the runtime classpath, now declared directly. - **Kotlin: a request body that cannot be read answers with an `issues` list.** The generated `MetaDecimalWire.kt` (one per generated package) maps the failure into the validation envelope every other 400 uses: `{"error": "validation", "issues": [{"code", "path", @@ -1749,6 +1762,20 @@ four `rules.*` and `verify.lifecycle.unreachable` settings, held to `fixtures/ru `StringBuilder`; an owned copy ejected at an earlier version carries its own and still compiles (`EjectedAtBaseGeneratorsCompatTest`). +- **The last Kotlin generators write through `KotlinWriter`, and KotlinPoet leaves the build** + (ADR-0063): the entity generator (the data class with its Java builder and cross-field + properties, the TPH `Validation` shape, the abstract interface shape and `MetaNetJson.kt`), + the enum emitter and the Spring config generator. `KotlinTypeMapper` answers with the writer's + own `KotlinTypeName` / `KotlinClassName` (`writer/KotlinTypeName.kt`) instead of KotlinPoet's, + `KotlinCrossFieldRules.rules` answers each rule as a Kotlin expression string, and + `KotlinPoetFileWriter` is gone: every file goes through `GeneratedFileWriter`'s marker guard, as + before. The layout ratchet's allowlist of unconverted files is empty; the ratchet still fails a + generator that types its own layout or imports KotlinPoet. **The output changes in layout + only:** no explicit `public`, no `kotlin.*` imports, a four-space indent, imports in one sorted + group, a one-line KDoc on one line, and a call or constructor that fits written on one line + (`fun build(): Author = Author(id = id, name = name)`). Regenerating shows those diffs and + nothing else; `MetaNetJson.kt` is byte-identical. See Upgrading for owned copies. + - **Python publishes a shared model (FR-023).** A `shared-model` generator, wired in `metaobjects.config.yaml` like any other (`metaobjects gen --list` names its options), writes `.metaobjects.json` and `metaobjects.pkg.json` for a consumer's `deps sync`: `name` and diff --git a/agent-context-shipped/files/ce8ecdef3b83fec0.md b/agent-context-shipped/files/284ca45846939d46.md similarity index 98% rename from agent-context-shipped/files/ce8ecdef3b83fec0.md rename to agent-context-shipped/files/284ca45846939d46.md index 4b166e7339..bc2e4b1133 100644 --- a/agent-context-shipped/files/ce8ecdef3b83fec0.md +++ b/agent-context-shipped/files/284ca45846939d46.md @@ -150,7 +150,7 @@ both a one-call seam Kotlin uses idiomatically. > `LlmTraceHelperGenerator` emits a Java `record(...)` helper (per concrete > entity extending `LlmCallBase` with a `@responseRef`-carrying `template.prompt`); > Kotlin code calls it directly (same JVM, same classpath) — there is no separate -> Kotlin-native (`codegen-kotlin`/KotlinPoet) trace-helper emitter yet. What's TS-only +> Kotlin-native (`codegen-kotlin`) trace-helper emitter yet. What's TS-only > is the **`call` render→call→record convenience loop** — neither JVM > generator emits it, because the `LlmClient` seam it wraps is BYO / vendor-neutral on > the JVM (ADR-0024). So you compose render → your LLM call → the generated Java diff --git a/server/python/src/metaobjects/agent_context/shipped/files/d3eaa47c0bbd9332.md b/agent-context-shipped/files/2e0dcc923c72abfa.md similarity index 99% rename from server/python/src/metaobjects/agent_context/shipped/files/d3eaa47c0bbd9332.md rename to agent-context-shipped/files/2e0dcc923c72abfa.md index f9cfdaa8e7..f16486609f 100644 --- a/server/python/src/metaobjects/agent_context/shipped/files/d3eaa47c0bbd9332.md +++ b/agent-context-shipped/files/2e0dcc923c72abfa.md @@ -4,7 +4,7 @@ The Kotlin port is a **codegen tier built on top of the Java port**. The loader, render engine, and Maven plugin are all Java; `codegen-kotlin` emits idiomatic Kotlin (`data class` (no `@Serializable` — entities are Jackson-compatible, not kotlinx-serialized), Exposed `Table` objects, Spring -`@RestController`/`@Configuration`) via KotlinPoet. Codegen runs as the same +`@RestController`/`@Configuration`), laid out by `KotlinWriter`. Codegen runs as the same build-time Maven plugin goal the Java port uses — there is no standalone `meta` binary on the JVM side (the Node `meta` is for schema migrations only; see the migration reference). @@ -27,7 +27,7 @@ All artifacts share `groupId` `com.metaobjects` and one version property: | `metaobjects-metadata` | metamodel + loader | | `metaobjects-metadata-ktx` | thin Kotlin facade over the Java loader + render engine | | `metaobjects-render` | render + `Verify` + tolerant `extract` (prompt/template) | -| `metaobjects-codegen-kotlin` | the Kotlin (KotlinPoet) generators | +| `metaobjects-codegen-kotlin` | the Kotlin generators (laid out by `KotlinWriter`) | | `metaobjects-maven-plugin` | the build-time codegen plugin | The generated code compiles against the consumer's own runtime dependencies, which the diff --git a/server/python/src/metaobjects/agent_context/shipped/files/e0879c95ed161b9e.md b/agent-context-shipped/files/60ab1d9a63aff1f8.md similarity index 97% rename from server/python/src/metaobjects/agent_context/shipped/files/e0879c95ed161b9e.md rename to agent-context-shipped/files/60ab1d9a63aff1f8.md index b020be919c..96097ce554 100644 --- a/server/python/src/metaobjects/agent_context/shipped/files/e0879c95ed161b9e.md +++ b/agent-context-shipped/files/60ab1d9a63aff1f8.md @@ -8,7 +8,7 @@ are good at different things. | | Programmatic | Declarative template | |---|---|---| -| What you write | a `Generator` in the port's language, using its AST builder (ts-poet, KotlinPoet, …) | a `.mustache` file + `{ template, scope, outputPattern, format? }` | +| What you write | a `Generator` in the port's language, using its code writer (`JavaWriter`, `KotlinWriter`, …) | a `.mustache` file + `{ template, scope, outputPattern, format? }` | | Output shape | expressed in code | **is the file you are editing** | | Cross-language | per-port by construction | one template emits for any language — it renders against the neutral, byte-gated data dict | | Logic | any | what a template can express: sections, iteration, presence flags | diff --git a/agent-context-shipped/files/003d471c39227bb7.md b/agent-context-shipped/files/d6c5d2863183241f.md similarity index 98% rename from agent-context-shipped/files/003d471c39227bb7.md rename to agent-context-shipped/files/d6c5d2863183241f.md index 864378d161..af4334cf67 100644 --- a/agent-context-shipped/files/003d471c39227bb7.md +++ b/agent-context-shipped/files/d6c5d2863183241f.md @@ -2,7 +2,7 @@ The Kotlin port is a **codegen tier built on top of the Java port** — the loader, render engine, and Maven plugin are all Java; `metaobjects-codegen-kotlin` emits -idiomatic Kotlin (KotlinPoet: `data class` (no `@Serializable` — entities are +idiomatic Kotlin (laid out by `KotlinWriter`: `data class` (no `@Serializable` — entities are Jackson-compatible, not kotlinx-serialized), Exposed `Table` objects, Spring `@RestController`). Codegen runs as the same Maven plugin goal the Java port uses (`mvn metaobjects:generate`). Schema migration is the project's own tool or the @@ -119,7 +119,7 @@ project needing a shape the built-ins do not emit has two legitimate answers and is a finding on its own: a **programmatic** generator (implement `com.metaobjects.generator.Generator`, name the class in a `` element), or a **declarative template** (`TemplateScopeGenerator`, wired with `