Skip to content

Commit 485cc8a

Browse files
dmealingclaude
andcommitted
fix(agent-context): regenerate the conformance golden after the Python prompts edit
The `ai`-library commit documented the `libraries` opt-in in the Python prompts reference. That file is assembled into the agent-context conformance corpus, so the golden went stale and `ts-unit` failed on `agent-context-conformance corpus > python`. Regenerated with the script that exists for exactly this (`bun scripts/regen-agent-context-conformance.ts`); one golden file changed, matching the one source file edited. Worth noting for anyone editing `agent-context/`: a docs-only change to that tree is gated by a TYPESCRIPT test, so a Python-side test run says nothing about it. The content is shared; the gate is not where the content lives. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018k3CqBZLFkbP4Qs4FZhh96
1 parent f74e3d0 commit 485cc8a

1 file changed

Lines changed: 35 additions & 1 deletion

File tree

  • fixtures/agent-context-conformance/python/expected/.claude/skills/metaobjects-prompts/references

fixtures/agent-context-conformance/python/expected/.claude/skills/metaobjects-prompts/references/python.md

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,41 @@ one boundary, not both.
119119
> generator emits a `record_<entity>(recorder, input, redact=None)` helper (per
120120
> concrete entity extending `LlmCallBase` with a `@responseRef`/`@payloadRef`-carrying
121121
> `template.prompt`) that tolerantly extracts the typed response, builds the base
122-
> trace row, and persists it once. What's still TS-only is the **`call<Entity>`
122+
> trace row, and persists it once.
123+
>
124+
> `LlmCallBase` is shipped metadata, not something you author: opt in when you load,
125+
> then inherit from it. Without the opt-in the `extends` fails with
126+
> `ERR_UNRESOLVED_SUPER`.
127+
>
128+
> ```python
129+
> load_directory("metadata/", libraries=["ai"]) # metaobjects::ai::LlmCallBase
130+
> ```
131+
> For `metaobjects gen` / `verify`, declare it in `metaobjects.config.yaml` instead —
132+
> the CLI reads the same opt-in from there:
133+
> ```yaml
134+
> metadata: metadata/
135+
> libraries: ["ai"]
136+
> ```
137+
> ```yaml
138+
> - object.entity:
139+
> name: AssistantCall
140+
> extends: metaobjects::ai::LlmCallBase
141+
> children:
142+
> - source.rdb: { table: assistant_call, role: primary }
143+
> - identity.primary: { name: id, fields: ["spanId"] }
144+
> # Typed columns are AUTHORED, never derived (ADR-0024 amendment).
145+
> # Declare BOTH: the generated record_<entity> writes voRequest and
146+
> # voResponse unconditionally, and any key the entity does not declare
147+
> # raises "no field '<name>' in metadata" on the first persist.
148+
> - field.object: { name: voRequest, objectRef: MyRequestVO, storage: jsonb }
149+
> - field.object: { name: voResponse, objectRef: MyResponseVO, storage: jsonb }
150+
> ```
151+
>
152+
> Note the opt-in also brings in the library's own concrete `LlmCall` entity
153+
> (table `llm_call`) alongside the abstract base — it will appear in codegen output
154+
> and in a schema diff unless you filter it.
155+
>
156+
> What's still TS-only is the **`call<Entity>`
123157
> render→call→record convenience loop** — Python intentionally does not emit it,
124158
> because the `LlmClient` seam it wraps is BYO / vendor-neutral here (ADR-0024). So
125159
> you compose render → your LLM call → the generated `record_<entity>(...)` yourself;

0 commit comments

Comments
 (0)