Skip to content

Commit 934489d

Browse files
dmealingclaude
andauthored
feat(cli): agent-friendly meta CLI with --format/TOON output and deploy-all agent-context references (#71)
* feat(agent-context): deploy all language references; agent picks (robust to stack-detection miss) The reference filter (assemble.ts) only installed references whose token was in the detected stack; when detection came up empty (as in this monorepo's own init), agents got zero language guidance. Deploy all references instead and let the agent read the one matching its stack (SKILL.md already points to them). Update the assemble tests + regenerate the conformance goldens (each stack now assembles the full 22-file set); add a regen script for the corpus. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018mjBXyYKk6tbQymzhgMmdB * docs(agent-context): add Python codegen reference (closes the python.md gap) metaobjects-codegen shipped references for ts/java/kotlin/csharp but not python, so Python adopters got no codegen guidance. Add python.md (accurate to the actual Python port: entity->Pydantic, routes->FastAPI, no ORM, int-PK/dict[str,Any] gaps, Node-owned migrate). Regenerate conformance goldens (now 23 files/stack). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018mjBXyYKk6tbQymzhgMmdB * docs(spec): record deploy-all references override (supersedes stack-selective) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018mjBXyYKk6tbQymzhgMmdB * docs(plan): Node meta CLI -> axi + TOON implementation plan (Plan 2 of 5) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018mjBXyYKk6tbQymzhgMmdB * feat(cli): add output-format selector (TTY-aware) + TOON encode wrapper * feat(cli): TOON+JSON gen formatters with axi aggregates + next-step help * feat(cli): TOON+JSON migrate formatters with axi aggregates + next-step help * feat(cli): --format flag (TTY-aware) routes gen/migrate through TOON/JSON/text Extract --format globally in run() alongside --cwd; resolve once with resolveFormat(flag, isTTY) and thread the OutputFormat into genCommand and migrateCommand. Each command emits formatGenResultToon/Json or the existing text formatter at the single log.info call site. Adds --format <toon|json|text> to HELP_TEXT GLOBAL OPTIONS. Tests: dispatch-level unit tests for resolveFormat selection + five integration tests against the trainer-website-meta fixture asserting TOON tabular shape, JSON parse, and text header; full suite 296 pass. * test(cli): update init-scaffold tests for deploy-all references (Plan 1 fallout) Replace stack-selective assertions (typescript.md absent) with deploy-all assertions (all language references present) in init-agent-context and init-docs-only unit tests. Test names updated to reflect the new behavior. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018mjBXyYKk6tbQymzhgMmdB * fix(cli): axi-conformant meta migrate (--help, idempotent, declared libsql, PM-aware errors) - Declare @libsql/kysely-libsql ^0.4.0 as a direct dep (was optional peer) - Intercept --help/-h before strict parseMigrateArgs; print per-subcommand usage block - Emit structured {error, hint} JSON/TOON on stdout for arg-parse failures - Baseline discoverability: no-snapshot path emits JSON next-step hint on stdout - PM-aware missing-dep error: detect lockfile (npm/pnpm/yarn/bun) and print matching install command - 11 new tests in test/migrate-ux.test.ts; suite: 309 pass, 0 fail * fix(cli): format-aware structured migrate errors on stdout (+ yarn pm-detect, drop stale devDep) Thread fmt into runOfflineGenerate so no-snapshot hint uses emitStructuredError(fmt) instead of hardcoded log.info(JSON.stringify(...)). Add top-level try/catch in migrateCommand with AlreadyEmittedError sentinel so any unhandled sub-function throw emits structured error on stdout in the active format (exit 1) without double-emitting. Add yarn pm-detect test case. Remove stale @libsql/kysely-libsql from devDependencies (already in dependencies). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018mjBXyYKk6tbQymzhgMmdB * feat(cli): per-subcommand --help, content-first no-args, 0/1/2 exit codes (axi) * docs(agent-context): document --format + discoverable migrate baseline * fix(cli): restore text-mode baseline hint + drop help[] refs to non-existent migrate subcommands - Append "; run \`meta migrate baseline --dialect <dialect>\` first" to the log.error() in the no-snapshot path so text/TTY users see the next step (emitStructuredError is a no-op for text format; the structured hint was already correct for json/toon). - Replace the two fabricated help[] hints ("meta migrate status", "meta migrate down --slug <name>") with the real rollback surface: "roll back with \`meta migrate --rollback <target>\`". - Extend captureCommand() in migrate-ux.test.ts to also capture stderr; add a text-mode no-snapshot test asserting stderr contains "baseline". - Update output-toon.test.ts help[] assertion from "status" to "--rollback". Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018mjBXyYKk6tbQymzhgMmdB * no-mistakes(review): emit migrate branch errors on stdout; reject invalid --format * no-mistakes(review): make migrate structured summary reflect written-vs-applied-vs-dry-run state * no-mistakes(review): surface applied ledger files in migrate summary even with no fresh diff * no-mistakes(review): make postgres missing-dep hint package-manager-aware in CLI kysely builder * no-mistakes(document): sync CLI README with --format flag, per-command help, and bundled libsql driver * fix(agent-context): deploy-all references in the C# + Python assemblers (cross-port parity) The TS assembler was updated to deploy-all (emit every references/*.md regardless of stack); the C# and Python ports still had the per-stack token filter, so the byte-identity conformance gate failed for those ports. Changes: - server/python: drop `p.stem in stack.tokens` guard in assemble(); emit every .md in references/ sorted, matching TS deploy-all semantics. - server/csharp: drop `.Where(stack.Tokens.Contains)` from the LINQ chain in AgentContextAssembler.Assemble(); same effect. - fixtures/: regenerate conformance goldens via regen-agent-context-conformance.ts to pick up the 03bd9b5b doc additions (typescript.md +4 lines, migration.md +37 lines) that were missed when the goldens were last committed. All conformance gates pass: Python 305/305, C# 670/670, CLI 35/35. * docs(spec): single agent-context assembler (collapse per-port re-implementations) Option A: Node meta is the sole assembler; Python/JVM/C# stop assembling + embedding agent-context. Non-Node CLIs keep a non-executing pointer stub redirecting to 'npx meta agent-docs --server <lang>'. Reconciles with ADR-0015 (Node/binary already required for migrate). Folded into this branch as deletions. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018mjBXyYKk6tbQymzhgMmdB * docs(plan): single agent-context assembler implementation plan (delete per-port assemblers) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018mjBXyYKk6tbQymzhgMmdB * feat(cli): add 'meta agent-docs --server <lang>' alias (canonical scaffolder for all ports) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * refactor(python): drop native agent-context assembler + embedding; agent-docs redirects to meta CLI - Delete assemble.py, types.py, content_root.py (the Python-port assembler) - Delete tests/conformance/test_agent_context_conformance.py (byte-identity test) - Delete src/metaobjects/agent_context/_content/ (build-time vendored content tree) - Stub _cmd_agent_docs in cli.py: prints redirect message to stderr, returns 1 - Keep scaffold.py (stripped to staleness-nudge symbols only: agent_context_staleness, Manifest, AGENT_CONTEXT_MANIFEST_PATH, installed_metaobjects_version) — used by gen/verify - Fix agent_context/__init__.py: drop assembler re-exports, keep staleness symbols - Fix cli.py imports: drop assemble/make_stack/plan_scaffold/resolve_agent_context_root - Remove dead _detect_python_server/_wire_root_doc helpers and _ROOT_DOC_* constants - Neutralise hatch_build.py: no-op hook (no more _content vendoring) - Drop _content/ from .gitignore - Remove test_agent_docs_stamps_generated_by from staleness tests (stamp is Node CLI's job now) 1288 passed (was 1294: 5 conformance fixtures + 1 stamp test removed). * refactor(java): drop native agent-context assembler + classpath embedding; agent-docs Mojo redirects to meta CLI AssembledFile and Stack are retained — AgentContextScaffold.plan() takes both as parameters and AgentContextScaffoldTest constructs them directly. Only AgentContextAssembler and ContentRoot were assembly-only; they are deleted. AgentContextConformanceTest (the byte-identity gate) is also deleted; it was never in the CI -Dtest list (confirmed absent from conformance.yml). * fix(java): delete dead agent-context scaffold-write path (plan/AssembledFile/Stack) + correct staleness nudge to npx meta Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * refactor(csharp): drop native agent-context assembler + embedded resources; agent-docs redirects to meta CLI * docs(adr): ADR-0033 single agent-context assembler; redirect non-Node CLIs; supersede ADR-0027 non-goal * fix(agent-context): ADR stub stream stdout→stderr; Python staleness nudge → npx meta agent-docs --server python Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018mjBXyYKk6tbQymzhgMmdB * no-mistakes(document): sync docs to single agent-context assembler (ADR-0033) + CLI changes * no-mistakes(lint): remove orphaned Manifest import in Python CLI --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 05439fb commit 934489d

120 files changed

Lines changed: 7668 additions & 2370 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
# Python codegen specifics
2+
3+
The Python port targets FastAPI consumers. Codegen runs through the **`metaobjects`
4+
console-script** (`pip install metaobjects`). As on every port, schema migrations
5+
are **Node-`meta`-owned** (ADR-0015): `meta migrate` / `meta verify --db` run
6+
through the Node `meta` tool — the Python CLI has **no `migrate` subcommand** and
7+
`metaobjects verify --db` is rejected. Everything below is `metaobjects`.
8+
9+
## Install
10+
11+
```bash
12+
pip install metaobjects # provides the `metaobjects` console-script
13+
# consumer runtime deps (you provide these — codegen does not pin them):
14+
pip install "pydantic>=2" fastapi
15+
```
16+
17+
## Run
18+
19+
```bash
20+
metaobjects gen ./metadata --out ./generated [--package <pkg>]
21+
metaobjects gen ./metadata --out ./generated --generators entity,routes,filter-allowlist
22+
metaobjects verify ./metadata --codegen # codegen-drift gate (regenerate into a
23+
# temp dir + diff vs the committed --out tree)
24+
```
25+
26+
`metaobjects verify` defaults to `--codegen` (the codegen-output drift gate; it shares
27+
the exact `gen` code path so the two can't diverge). `--templates` is the prompt/template
28+
drift gate (see the prompts reference). Schema migration + live-DB drift are **not**
29+
`metaobjects` — they run through the Node `meta` tool (see the migration reference).
30+
31+
## Generators
32+
33+
Wire generators by their stable name (`--generators <names>`), or run the default set.
34+
Output lands under `--out` (with the `@generated` guard header). Metadata is the same
35+
canonical JSON every port reads (fused-key form, `source.rdb` + `@table`, `@column` for
36+
a renamed physical column).
37+
38+
| Stable name | Output |
39+
|---|---|
40+
| `entity` | one **Pydantic model** per `object.entity` / projection (the `entity-model` generator): typed fields from the metadata, nullability from `@required`, `@maxLength`/validators, enum fields → a Python `Enum`. This is the typed data model. |
41+
| `routes` | a **FastAPI `APIRouter`** per writable entity (`source.rdb @kind="table"`) on the cross-port REST contract (`?filter[field][op]=`, `?sort=field:asc`, `?limit`/`?offset`, `?withCount=1` envelope, 400/404 envelopes). The router declares a repository **`Protocol`** you implement and inject. |
42+
| `filter-allowlist` | per-entity filter allowlist (FR-009 — the server-side field+operator allowlist the routes validate against). |
43+
| `payload` / `output-parser` / `output-prompt` / `extractor` / `render-helper` / `trace-helper` | the `template.output` prompt-pillar artifacts — see the **prompts** reference. |
44+
| `template` | the generic Mustache `template` primitive. |
45+
46+
## No ORM — you own persistence (unlike the C# port)
47+
48+
Python codegen emits the **Pydantic models + the FastAPI routers**, but **no ORM /
49+
persistence layer and no runnable server**. Two things you hand-write:
50+
51+
1. **The repository** — each generated router depends on a repository `Protocol`;
52+
implement it against your datastore (SQLAlchemy / asyncpg) and inject it.
53+
2. **The app entrypoint** — there is no generated `main.py`. Create one and mount the
54+
routers:
55+
```python
56+
from fastapi import FastAPI
57+
from generated.author_router import router as author_router
58+
app = FastAPI()
59+
app.include_router(author_router)
60+
```
61+
62+
## Known gaps (current — may require a hand-edit)
63+
64+
- **Single-field, `int` PKs only.** The generated router/repository assume a single
65+
`int` primary key (`id: int`). Non-`int` single-field PKs and composite PKs need a
66+
hand-edit until specified.
67+
- **DTO = `dict[str, Any]`.** Request bodies for `POST`/`PATCH`/`PUT` are typed
68+
`dto: dict[str, Any]` and responses return `Any`; the repository `Protocol` uses
69+
`Any` for the row type. The typed Pydantic model from the `entity` generator exists —
70+
you can tighten the router signatures to it by hand.
71+
72+
## Re-scaffold this context
73+
74+
`metaobjects agent-docs --server python [--out <dir>]` (re)scaffolds the slim always-on
75+
Markdown + these `metaobjects-*` skills into the project — the Python tool bundles the
76+
agent-context tree, so a Python consumer needs no Node `meta`.

agent-context/skills/metaobjects-codegen/references/typescript.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,10 @@ Generated files carry an `@generated by @metaobjectsdev/codegen-ts` header; the
129129
runner overwrites those and refuses to touch files without it. Hand-customizations
130130
that metadata can't express live in sibling `<Entity>.extra.ts` files.
131131

132+
**Output format:** `meta gen` (and the CLI generally) is TTY-aware — human-readable
133+
text on a terminal, TOON on a pipe or agent. Override with `--format toon|json|text`.
134+
TOON is the structured default for agents; `--format json` is also available.
135+
132136
## Multiple output targets
133137

134138
A `targets: { web: { outDir }, api: { outDir } }` registry plus a per-generator

agent-context/skills/metaobjects-verify/references/migration.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,45 @@ npm install --save-dev @metaobjectsdev/cli @metaobjectsdev/migrate-ts
2121
You point the tool at the **same database your server connects to** — its
2222
connection is independent of your runtime tier.
2323

24+
## Output format
25+
26+
`meta migrate` (and the CLI generally) is TTY-aware: when stdout is a terminal it
27+
emits human-readable text; when piped to an agent or CI system it defaults to TOON
28+
(a compact, unambiguous machine-readable format). Override with `--format`:
29+
30+
```bash
31+
meta migrate ... --format toon # TOON (machine-readable, the pipe/agent default)
32+
meta migrate ... --format json # JSON
33+
meta migrate ... --format text # human-readable text (the TTY default)
34+
```
35+
36+
Structured errors and next-step hints are also emitted on stdout (not stderr) in the
37+
active format, so callers can parse them without scraping stderr.
38+
2439
## The workflow
2540

41+
### Fresh database: baseline first
42+
43+
The default `meta migrate` path is **offline** — it diffs metadata against a
44+
committed schema snapshot rather than the live DB. On a fresh database there is no
45+
snapshot yet; run the `baseline` step once before the first migration generate:
46+
47+
```bash
48+
meta migrate baseline --dialect sqlite # seed snapshot from metadata (no DB needed)
49+
meta migrate baseline --dialect postgres # same for Postgres
50+
meta migrate baseline --from-db --db postgresql://... --dialect postgres
51+
# alternative: seed from live DB (for existing schemas)
52+
```
53+
54+
`baseline` writes a reference snapshot to `.metaobjects/migrations/` and exits
55+
without emitting any SQL. After this, `meta migrate --dialect <d> --slug <name>`
56+
operates offline against that snapshot.
57+
58+
If you run `meta migrate` before baselining, the CLI surfaces a structured
59+
next-step hint pointing to the exact `baseline` command.
60+
61+
### Generating a migration
62+
2663
1. **Generate a migration** by diffing metadata vs the prior state (the live DB or a
2764
committed snapshot). The engine emits paired `up.sql` + `down.sql`:
2865

bun.lock

Lines changed: 4 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/RELEASING.md

Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ Four packages, version-locked at the C# port version (currently `0.11.1`):
174174
| `MetaObjects` | Loader + canonical serializer |
175175
| `MetaObjects.Render` | Mustache render + payload-VO + `verify` |
176176
| `MetaObjects.Codegen` | EF Core + ASP.NET codegen + the runtime filter/dispatch helpers generated code references |
177-
| `MetaObjects.Cli` | The `dotnet meta` .NET tool (`gen` / `verify` / `agent-docs`) |
177+
| `MetaObjects.Cli` | The `dotnet meta` .NET tool (`gen` / `verify`; `agent-docs` is a redirect stub to the Node `meta` CLI) |
178178

179179
Shared package metadata lives in [`server/csharp/Directory.Build.props`](../server/csharp/Directory.Build.props);
180180
per-package `PackageId`/`Title`/`Description` live in each `.csproj`. Test/integration projects set
@@ -220,15 +220,11 @@ lock the repo/owner IDs against resurrection attacks.)
220220
*deprecate*. So validate the packed `.nupkg` locally before triggering the workflow.
221221
3. **Bump the version in `Directory.Build.props`** (`<Version>`), not per-project. The
222222
workflow can also override per-run via the `version` dispatch input (`-p:Version=`).
223-
4. **Don't re-add `Pack`/`PackagePath` to the CLI's `agent-context/` Content item.** `PackAsTool`
224-
already bundles build output (the files arrive via `CopyToOutputDirectory`) into
225-
`tools/net8.0/any/`; an explicit `PackagePath` double-adds every file → **NU5118**, which is
226-
fatal under this repo's `TreatWarningsAsErrors`. The item is deliberately `Pack=false`.
227-
5. **The temp key is single-use and ~1 h.** The workflow requests it immediately before push — don't
223+
4. **The temp key is single-use and ~1 h.** The workflow requests it immediately before push — don't
228224
move the `NuGet/login` step earlier.
229-
6. **The policy is bound to the org + repo + workflow *filename*.** Renaming `publish-csharp.yml`, or
225+
5. **The policy is bound to the org + repo + workflow *filename*.** Renaming `publish-csharp.yml`, or
230226
the policy owner leaving/locking the `metaobjects` org, makes the policy inactive until fixed.
231-
7. **Source Link + symbols are on** (`PublishRepositoryUrl`, `EmbedUntrackedSources`, `snupkg`); CI
227+
6. **Source Link + symbols are on** (`PublishRepositoryUrl`, `EmbedUntrackedSources`, `snupkg`); CI
232228
sets `ContinuousIntegrationBuild` for deterministic builds. No action needed — just don't strip them.
233229

234230
## Procedure
@@ -283,16 +279,14 @@ subsequent releases keyless.)
283279

284280
## Gotchas (the non-obvious ones)
285281

286-
1. **The `agent-context/` bundle is vendored by a build hook, not a parent-path include.**
287-
`hatch_build.py` copies the repo-root `agent-context/` into
288-
`src/metaobjects/agent_context/_content` at build time, and `[tool.hatch.build]
289-
artifacts` forces it into **both** sdist and wheel. Do **not** revert to a
290-
`force-include` of `../../agent-context` — that builds a direct wheel but breaks
291-
`uv build` (sdist → wheel), because the parent path is absent when building from the sdist.
292-
2. **PyPI versions are immutable** (like npm/NuGet). You can't re-upload a version — only
282+
1. **PyPI versions are immutable** (like npm/NuGet). You can't re-upload a version — only
293283
yank. Validate locally first (below).
294-
3. **Bump the version in `pyproject.toml`** (`[project].version`).
295-
4. **The wheel is pure-Python/universal** (`py3-none-any`) — one wheel serves every platform.
284+
2. **Bump the version in `pyproject.toml`** (`[project].version`).
285+
3. **The wheel is pure-Python/universal** (`py3-none-any`) — one wheel serves every platform.
286+
287+
(No agent-context content is vendored into the wheel anymore — scaffolding moved to the
288+
Node `meta agent-docs` CLI, so `hatch_build.py` is a no-op. Don't re-add a
289+
`force-include` of `../../agent-context`.)
296290

297291
## Procedure
298292

docs/features/cli.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ command surface splits in two:
2121
| Capability | Tool | Invocation | Notes |
2222
|---|---|---|---|
2323
| Project scaffold (`init`) | Node `meta` | `meta init` | TS projects |
24+
| **Agent-context scaffold** (`agent-docs`) | **Node `meta`** | `npx meta agent-docs --server <lang>` | **any backend** — single assembler (ADR-0033); non-Node CLIs redirect here |
2425
| **Schema migrate** | **Node `meta`** | `meta migrate` | **any backend** — schema is Node-only (ADR-0015) |
2526
| **Schema drift** (`verify --db`) | **Node `meta`** | `meta verify --db` | **any backend** — live-DB drift, Node-only |
2627
| **Codegen drift** (`verify --codegen`) | **Node `meta`** | `meta verify --codegen` | TS reference (ADR-0021 D2) — regen-to-temp + diff committed output |
@@ -90,6 +91,25 @@ Java, Python, and Kotlin command surfaces are **codegen only** (`gen` + codegen
9091
goals and the C#/Python migrate surfaces were removed in the schema-authority
9192
consolidation; the only schema entry point anywhere is the Node `meta`.
9293

94+
## Agent-context scaffold is Node-only — by design
95+
96+
The `.metaobjects/AGENTS.md`/`CLAUDE.md` always-on files and the
97+
`.claude/skills/metaobjects-*/` reference tree are assembled by **one** tool: the
98+
Node `meta agent-docs` command. Per [ADR-0033](../../spec/decisions/ADR-0033-single-agent-context-assembler.md)
99+
the per-port native assemblers (Python/Java/C#) and their byte-identity conformance
100+
gates were removed — that content is effectively one static artifact, and every port
101+
already needs the Node `meta` CLI or its binary for schema ops (ADR-0015).
102+
103+
```bash
104+
npx meta agent-docs --server <lang> # csharp | java | kotlin | python | node
105+
```
106+
107+
The C#, Java/Kotlin, and Python CLIs keep a **non-executing `agent-docs` pointer
108+
stub** that prints `agent-context scaffolding moved to the meta CLI — run: npx meta
109+
agent-docs --server <lang>` to stderr and exits non-zero. The **live staleness check**
110+
in `gen`/`verify` stays per-port (it only *reads* the scaffold to nudge when it drifts);
111+
its message now points at `npx meta agent-docs --server <lang>`.
112+
93113
## Running Kotlin codegen via Maven
94114

95115
`codegen-kotlin`'s generators extend `MultiFileDirectGeneratorBase` — the same

docs/llms/llms-full.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ If you are an AI assistant helping someone adopt MetaObjects, do this **first**
3030
- 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 `7.4.1`.
3131
- Python: `pip install metaobjects`
3232
- C#: install the MetaObjects .NET tool (invoked as `dotnet meta`).
33-
2. **Run `meta init`** (the Node `meta` CLI). It works in any project that has Node — including a JVM or Python project with a TypeScript frontend. It scaffolds a slim always-on `.metaobjects/AGENTS.md` + `.metaobjects/CLAUDE.md` (auto-wired via an `@.metaobjects/AGENTS.md` import line into the project's root `CLAUDE.md`/`AGENTS.md`, so it loads automatically) plus five `metaobjects-*` Claude Code skills under `.claude/skills/`, carrying only the project's language reference fragments. Re-run `meta init --refresh-docs` to update the agent docs after a CLI upgrade. (Native per-port scaffold commands for JVM/Python/C#-only projects are forthcoming; today, run the Node `meta init` regardless of backend.)
33+
2. **Run `meta init`** (the Node `meta` CLI). It works in any project that has Node — including a JVM or Python project with a TypeScript frontend. It scaffolds a slim always-on `.metaobjects/AGENTS.md` + `.metaobjects/CLAUDE.md` (auto-wired via an `@.metaobjects/AGENTS.md` import line into the project's root `CLAUDE.md`/`AGENTS.md`, so it loads automatically) plus five `metaobjects-*` Claude Code skills under `.claude/skills/`, carrying only the project's language reference fragments. Re-run `meta init --refresh-docs` to update the agent docs after a CLI upgrade. (The Node `meta` CLI is the single agent-context scaffolder for every backend, by design — ADR-0033; the JVM/Python/C# CLIs deliberately redirect to it. For a non-Node project, scaffold just the agent context with `npx meta agent-docs --server <lang>`.)
3434
3. **Load `.metaobjects/AGENTS.md` and the `.claude/skills/metaobjects-*` skills.** They teach metadata authoring, codegen, runtime/UI, prompt construction, and `verify` — for this project's exact stack and version.
3535

3636
This file is the short corpus; the deep, version-matched how-to is the scaffolded local context.

docs/llms/llms.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ If you are an AI assistant helping someone adopt MetaObjects in their project, d
1818
- a slim always-on `.metaobjects/AGENTS.md` + `.metaobjects/CLAUDE.md` agent context, **auto-wired into the project's root `CLAUDE.md`/`AGENTS.md`** (an `@.metaobjects/AGENTS.md` import line) so it loads automatically; and
1919
- five `metaobjects-*` Claude Code skills under `.claude/skills/`, carrying only the language reference fragments for the project's stack.
2020

21-
Re-run `meta init --refresh-docs` to update the scaffolded agent docs after a CLI upgrade. (Native per-port scaffold commands for JVM/Python/C#-only projects are forthcoming; today, run the Node `meta init` regardless of backend language.)
21+
Re-run `meta init --refresh-docs` to update the scaffolded agent docs after a CLI upgrade. (The Node `meta` CLI is the single agent-context scaffolder for every backend, by design — ADR-0033; the JVM/Python/C# CLIs deliberately redirect to it. Run `meta init` regardless of backend language, or `npx meta agent-docs --server <lang>` to scaffold just the agent context.)
2222

2323
3. **After scaffolding, load `.metaobjects/AGENTS.md` and the `.claude/skills/metaobjects-*` skills.** They teach metadata authoring, codegen, runtime/UI, prompt construction, and `verify` — for this project's exact stack and version.
2424

0 commit comments

Comments
 (0)