You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit cbce00b
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: CHANGELOG.md
+56Lines changed: 56 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,6 +12,15 @@ here.**
12
12
13
13
### Docs
14
14
15
+
- **Writing your own generator is documented as the normal path.** `llms.txt`, `llms-full.txt`
16
+
and the README now say a team should expect to write generators, and that documentation is a
17
+
generator. New recipe, [a typed client for the reference routes](docs/recipes/typed-client-for-the-reference-routes.md),
18
+
with a worked generator that fails `verify --codegen` when the routes move. The generator recipes
19
+
advise `handEdits: "overwrite"` for output that carries a safety rule (the default `"keep"`
20
+
merges a hand edit that removes it). One install pair that compiles the stock generated
21
+
TypeScript replaces the lines that disagreed. The `llms.txt` copy no longer repeats the homepage
22
+
lede or leans on "spine" and "substrate", and its longest sentences are split.
23
+
15
24
- **Port docs and `llms-full.txt` now say what a fresh reader got wrong.** Each port page opens with its keep-your-ORM path (TypeScript `runtime: false`, Java and Kotlin records and data classes, sourceless C# POCOs as DTOs, Pydantic in Python); three-way merge is scoped to TypeScript everywhere it was claimed unscoped, with what the other ports do instead (committed hash manifest, refusal by name, eject); framework baselines are stated (Java 21 rather than the contradictory 17, Spring Boot 3.x with Boot 2 unsupported, .NET 8, Python 3.11, Node first and Bun second); and each port page carries its known gaps with absolute links.
16
25
17
26
### Added
@@ -52,6 +61,40 @@ here.**
52
61
`fixtures/dependency-conformance/` (the 11 check cases pin the Node `meta deps check`); Kotlin loads through the same loader and adds a codegen test.
53
62
Spring runtime auto-load and `verify` drift for dependencies are later slices.
54
63
64
+
- **Own your generators, and give back the ones you did not change.** A team is expected to
65
+
write generators of its own, because a generator it owns is what keeps output from drifting.
66
+
Two things now help it carry fewer copies than it needs. `meta gen` prints one line naming
67
+
every owned generator copy that is still the shipped reference, unchanged. `meta eject --undo
68
+
[<name>...] [--force]` removes them: with no names, every unchanged copy (and the template
69
+
modules only they used); with names, those, refusing the whole call and removing nothing if a
70
+
named copy differs. It never edits `metaobjects.config.ts`; it prints the import to swap back.
71
+
The other ports have the same switch: `metaobjects eject --undo` (Python), `mvn
72
+
metaobjects:eject -Dundo=true` (Java and Kotlin) and `dotnet meta eject --undo` (C#). There is no
73
+
`doctor` command in any port; `eject --list` is the report. See
Copy file name to clipboardExpand all lines: docs/llms/llms-full.txt
+6-4Lines changed: 6 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -17,11 +17,13 @@ Underneath those two verbs, the model is a cross-language metadata standard for
17
17
1. **Code generation** -- idiomatic per-language code generated from the same metadata model.
18
18
2. **Runtime metadata access** -- load the metadata at runtime to drive dynamic behavior: CRUD operations, validation, relationships, dynamic admin UIs. (Typed tool payloads are declared today; MCP exposure of tools is on the roadmap.)
19
19
3. **Drift detection** -- catch divergence between code and metadata before it ships, surfacing drift as build-time breakage.
20
-
4. **Prompt construction** -- treat LLM prompts as governed metadata: a typed payload (a projection), external provider-resolved prompt text, byte-identical cross-language render, and build-time prompt-to-payload drift detection.
21
-
5. **Requirements and testing** -- declare what the software is supposed to *do* as a node in the same model, so `implementedBy` is resolved rather than trusted, `verify` reports the ledger on every run in every port, and each port's `requirement-tests` generator scaffolds a test per claim.
20
+
4. **Prompt construction** -- keep LLM prompts in typed metadata: a typed payload (a projection), external provider-resolved prompt text, byte-identical cross-language render, and build-time prompt-to-payload drift detection.
21
+
5. **Requirements and testing** -- declare what the software is supposed to *do* as a node in the same model, so `implementedBy` is checked against the model rather than taken on faith, `verify` reports the ledger on every run in every port, and each port's `requirement-tests` generator scaffolds a test per claim.
22
22
6. **Libraries** -- reusable declared design opted into by name (`"libraries": ["iam"]`): entities, requirements and implied generators as one drift-gated artifact. Since 1.0.4, in all five ports; `ai` is `stable`, `iam` is `preview`.
23
23
24
-
The metamodel is the **durable spine**; generated code is the **disposable artifact**. Substrate is local-first: typed metadata lives in your repo, and the generated code is idiomatic per-language output with **no proprietary runtime** — the entity/model tier is dependency-free, and the optional client, prompt-render, and runtime tiers are ordinary Apache-2.0 packages you could vendor or fork. If the `@metaobjectsdev/*` (npm) or `com.metaobjects:*` (Maven) packages disappeared tomorrow, your generated code keeps working in every language.
24
+
The model is the part you keep, and the generated code can be thrown away and regenerated. Your typed metadata lives in your repo, and the generated code is idiomatic per-language output with **no proprietary runtime**: the entity and model tier has no dependencies, and the optional client, prompt-render and runtime tiers are ordinary Apache-2.0 packages you could vendor or fork. If the `@metaobjectsdev/*` (npm) or `com.metaobjects:*` (Maven) packages disappeared tomorrow, your generated code keeps working in every language.
25
+
26
+
**Write your own generators; expect to.** Documentation is a generator too (`docsFile()`, `apiDocsFile()`; `meta init --with-docs` wires them). The reference generators cover the common cases, but a team should plan to write the ones its application needs: an OpenAPI file, a typed client, a service layer in your house style. A generator you own is regenerated on every model change and gated by `verify --codegen`, which is what keeps the output from drifting. In TypeScript, `meta generator new <name>` writes a working one and wires it. See [Write your own generator](https://github.com/metaobjectsdev/metaobjects/blob/main/docs/recipes/write-your-own-generator.md) for every port, and [a typed client for the reference routes](https://github.com/metaobjectsdev/metaobjects/blob/main/docs/recipes/typed-client-for-the-reference-routes.md) for a worked example.
25
27
26
28
---
27
29
@@ -36,7 +38,7 @@ If you are helping someone decide whether to adopt MetaObjects in an existing pr
36
38
If you are an AI assistant helping someone adopt MetaObjects, do this **first** — the scaffolded local context is richer and version-matched, and it loads automatically into the project's agent context:
- TypeScript / Node: `npm i -D @metaobjectsdev/cli @metaobjectsdev/codegen-ts @metaobjectsdev/metadata typescript @types/better-sqlite3`, then `npm i @metaobjectsdev/runtime-ts drizzle-orm zod fastify better-sqlite3` (SQLite; use `pg` and `@types/pg` for Postgres). The generated files import `drizzle-orm`, `zod`, `fastify` and a driver, and `npm` does not add them for you.
40
42
- Java / Kotlin: add `com.metaobjects:metaobjects-metadata`, `com.metaobjects:metaobjects-codegen-spring` (Java) or `com.metaobjects:metaobjects-codegen-kotlin` (Kotlin), and `com.metaobjects:metaobjects-maven-plugin`, all at `8.1.4`.
41
43
- Python: `pip install metaobjects`
42
44
- C#: install the MetaObjects .NET tool (invoked as `dotnet meta`).
0 commit comments