Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
449 changes: 256 additions & 193 deletions .claude/skills/metaobjects-audit/SKILL.md

Large diffs are not rendered by default.

18 changes: 13 additions & 5 deletions .claude/skills/metaobjects-audit/references/calibration.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,21 @@
- Planned, not shipped
- Cross-port version-number skew
- Stale upstream prose
- Include-only templates
- Owned generator copies with lines of their own
- Enum-member literals at a checked position

- **Filter-operator route codegen — the baseline grammar ships in all five ports.** The
`?filter[field][op]=value` grammar (all 9 operators `eq/ne/gt/gte/lt/lte/in/like/isNull`,
implicit-AND across params, the generated `<Entity>FilterAllowlist` + `invalid-field` /
`invalid-op` / `in`-over-cap 400s) is **generated in every port** (Java `SpringControllerGenerator`,
C# `RoutesGenerator`, Python `router_generator`, Kotlin `KotlinSpringControllerGenerator`, TS) —
gated by the api-contract corpus in BOTH lanes. **Flag hand-rolled filter parsing anywhere.**
Only the *richer* surface is genuinely **TS-only**: free-text `?search=`, the explicit
`filter[or][N]` / `filter[and][N]` nested boolean combinators (+ their nesting-depth cap), and
leading-wildcard gating — do NOT flag the absence of those in a non-TS port.
The *richer* list surface — free-text `?search=`, the explicit `filter[or][N]` /
`filter[and][N]` nested boolean combinators (+ their nesting-depth cap), and leading-wildcard
gating (ADR-0068) — passes in TypeScript and C#, and is **pending** in each other port until that port's
1.3.0 REST-standard work lands. Do NOT flag the absence of those in a port that has not landed
them yet.
- **Output-parser codegen** ships in **all five ports** — Java's `SpringOutputParserGenerator`
*generates* the `<Name>Parser` (the Jackson `readValue` lives inside that generated file). A
hand-rolled parser in a **non-generated** file where a **responding `template.prompt`**
Expand All @@ -29,6 +34,9 @@
- **C#** has no ObjectManager runtime tier (EF Core is the runtime) — hand services over the generated `DbContext` are expected.
- **Cut subtypes** — `field.byte` / `field.short` / `field.class` are removed; never recommend them.
- **TS/web-only** — `view.*` widget subtypes load in every port but are consumed only by TS/web; only `view.base` / `view.currency` are cross-port-gated.
- **Planned, not shipped** — `api.*` / `operation.*` / `binding.*` (FR-024) and MCP exposure of declared prompts/tools are not yet in the registry; their absence is not an adopter defect.
- **Cross-port version-NUMBER skew is by design** — TS/C#/Python `0.x` vs Java/Kotlin `7.x` Maven is correct; never flag the *number lines* differing. But that is exactly why you can't eyeball cross-language drift: compare **`metamodelVersion`** (Phase 0 cross-language consistency item), not the package numbers. A `metamodelVersion` MISMATCH across ports *is* a finding; so is a port lagging its ecosystem's latest release. Also flag *intra-port* drift (mixed versions within one port, or a runtime package in `devDependencies`).
- **CALIBRATION — registered; generated by TypeScript only** — the declared-API surface (`api.operational`, `operation.query`, `operation.command`, `binding.rest`) and lifecycles (`transition.action` under a `field.enum`) are registered since 1.3.0 (ADR-0066), checked at load and by `verify`. TypeScript's service generator emits from them (transition commands, declared command and query shells, permission points); the other ports do not yet. Their absence in a non-TypeScript port is not an adopter defect; do NOT audit for them. MCP exposure of declared prompts/tools is planned and not in the registry.
- **Cross-port version-NUMBER skew is by design** — TS/C#/Python `0.x` vs Java/Kotlin `7.x` Maven is correct; never flag the *number lines* differing. But that is exactly why you can't eyeball cross-language drift: compare **`metamodelVersion`** (Phase 0 cross-language consistency item), not the package numbers. A `metamodelVersion` MISMATCH across ports *is* a finding; so is a port lagging its ecosystem's latest release. A MATCH does not prove parity: added vocabulary does not move `metamodelVersion`, so ports on one metamodel version can still disagree on which attributes they know. Also flag *intra-port* drift (mixed versions within one port, or a runtime package in `devDependencies`).
- **Stale upstream prose** — "hand-write the Spring controller" (Java/Kotlin) is out of date; trust `meta gen --list`, not stale prose.
- **Include-only templates are not duplicates.** A prompt template whose body is only `{{> partial }}` includes is already the shared-partial fix the template-duplication check recommends. Identical stubs are the shape to want, never a byte-identical cluster to report (`references/prompt-anti-patterns.md`, template-text duplication).
- **An owned generator copy with lines of its own is not thereby customized.** The listing prints `DIFFERS` for a deliberate customization and for a copy stale by version, and counts lines the reference later removed as "of your own". Check the copy's history before calling either (Phase 0, owned-generators check).
- **An enum-member literal at a position the type checker verifies is not drift.** A value narrowed by the generated union or enum type breaks the build when the member is renamed. Signature 13 scores only a literal in a position nothing checks: a string-typed parameter, raw SQL, a JSON payload, an event name (`references/drift-signatures.md`).
33 changes: 22 additions & 11 deletions .claude/skills/metaobjects-audit/references/capability-checklist.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,11 @@ classify it (using the classification scheme in `SKILL.md`) and route the cutove
- **`field.date` / `field.time` / `field.timestamp`** (`@autoSet`) — hunt hand-stamped
`createdAt` / `updatedAt` assignments and ad-hoc temporal parsing; `@autoSet` stamps them.
- **`field.enum`** (`@values`) — hunt hand-written TS unions, language `enum`s, or DB
`CHECK ... IN (...)` lists that restate a modeled enum's members.
`CHECK ... IN (...)` lists that restate a modeled enum's members. Two more hunts on the same
capability: a member or event name typed as a hand string beside the generated constant
(`drift-signatures.md`, signature 13), and a status-like enum column written without a
condition on its current value (`surface-review-axes.md`, G3: every write conditional, through
the port's ORM with generated constants, never raw SQL).
- **`field.uuid`** — hunt UUIDs typed as bare strings / hand-validated.
- **`field.object`** (`@objectRef`, `@storage`) — hunt hand-flattened owned columns or
hand-rolled jsonb (de)serialization the `@storage` mode (`flattened`/`jsonb`/`subdocument`)
Expand Down Expand Up @@ -182,10 +186,11 @@ soft-delete / status / type view it models.
`validator.regex`** — hunt hand field-level validation (presence, length, numeric range,
array bounds, `@pattern` regex) the validator subtypes model.
- **Cross-field validators** — `validator.comparison` (`@left`/`@op`/`@right`, e.g.
"end ≥ start"), `validator.atLeastOne` (one-of-N present), `validator.requiredWhen`
"end ≥ start"), `validator.atLeastOne` (one-of-N present), `validator.exactlyOne` (exactly one of N
present), `validator.requiredWhen`
(conditional-required), `validator.presentIff` (mutual presence). Hunt these as hand-coded
multi-field rules — they ARE modelable (see the Semantic-constraint ratification section in
`SKILL.md` to decide what belongs in shared metadata vs port-local).
multi-field rules — they ARE modelable (see "Ratifying constraints before they enter the
model" in `SKILL.md` to decide what belongs in shared metadata vs port-local).
- **`validator.base`** — abstract base.

## View / Layout — `view.*`, `layout.*`
Expand Down Expand Up @@ -343,8 +348,10 @@ to nothing, and does not check that each claimed node complies).
- **CALIBRATION — per-port codegen gaps:** the core `?filter[field][op]` filter grammar (all
9 operators + the generated allowlist + `invalid-field` / `invalid-op` / `in`-over-cap 400s)
is **generated in all five ports** (api-contract corpus, both lanes) — **flag hand-rolled
filter parsing anywhere.** Only the richer surface (`?search=`, explicit
`filter[or][N]` / `filter[and][N]` combinators, leading-wildcard gating) is TS-only.
filter parsing anywhere.** The richer list surface (`?search=`, explicit
`filter[or][N]` / `filter[and][N]` combinators, leading-wildcard gating; ADR-0068) passes in
TypeScript and C#, and is pending in each other port until its 1.3.0 REST-standard work lands — do not
flag its absence in a port before then.
Output-parser codegen also ships in **all five ports**, keyed on a **responding
`template.prompt`** (`@responseRef`), never on a `template.output` (ADR-0052) — Java's
`SpringOutputParserGenerator` *generates* the parser (the Jackson `readValue` lives inside
Expand All @@ -353,14 +360,18 @@ to nothing, and does not check that each claimed node complies).
non-`table` source-kind / flattened-object codegen is partial). **C#** has no
ObjectManager runtime tier (EF Core *is* the runtime) — hand services over the generated
`DbContext` are expected.
- **Single-source config** — `apiPrefix` (URL prefix wired into routes + hooks), the
- **Single-source config** — `apiPrefix` (where the generated routes mount; the web client
takes its prefix from `baseUrl` on the fetcher provider, so check the two agree), the
`naming` block of `.metaobjects/config.json` (column and table rules, read by every port)
and per-target output dirs: hunt these values hard-coded in multiple places instead of
resolved from config.
- **CALIBRATION — planned, not yet shipped:** the declared-API surface (`api.base`,
`api.operational`, `operation.query`, `operation.command`, `binding.rest`) and MCP exposure
of declared prompts/tools are **not yet in the registry** — their absence is not an adopter
defect; do NOT audit for them.
- **CALIBRATION — registered; generated by TypeScript only:** the declared-API surface
(`api.operational`, `operation.query`, `operation.command`, `binding.rest`) and lifecycles
(`transition.action` under a `field.enum`) are registered since 1.3.0 (ADR-0066), checked at
load and by `verify`. TypeScript's service generator emits from them (transition commands,
declared command and query shells, permission points); the other ports do not yet. Their
absence in a non-TypeScript port is not an adopter defect; do NOT audit for them. MCP exposure of declared prompts/tools is planned and not in
the registry.
- **CALIBRATION — cross-port version skew is by design:** TS/C#/Python on the `0.x` line vs
Java/Kotlin on the `7.x` Maven line is correct — **never flag it.** Flag only *intra-port*
version drift (mixed package versions within one port, or a runtime package in
Expand Down
Loading