Skip to content

Commit a4e6f8c

Browse files
dmealingclaude
andcommitted
docs(authoring): the jsonb ladder's vectorScores example had the wrong rung
The worked example taught { "field.map": { "name": "vectorScores", "@valueType": "double" } } // writer: dict[str, float] against a real, named field whose writer is a LIST, not a map: `vector_scores: list[float] | None` on both the recorder and the mapper signature, constructed as `[r.score for r in final[:10]] or None`. Nothing anywhere declares it dict-shaped — the only `dict` in reach is a defensive `isinstance(x, (dict, list))` in a debug dumper. That is the worst kind of error in this particular block. The ladder's whole claim is "the test is mechanical: read the signature of the function that WRITES the column" — and then it demonstrated the method on a field whose signature says something else. Following it declares `Record<string, number>` where the writer sends `number[]`: a contract the writers do not honor, which is the exact failure the section warns about two paragraphs earlier. Moves `vectorScores` to the isArray rung where it belongs, and gives the scalar-valued-map rung an example that is genuinely a dict of scalars (path -> file content). The `@objectRef` map example was checked and is correct — `preferences` really is `dict[str, Preference]` over a generated value object, so it stays. Found by using the ladder to classify an estate rather than by reading it. Corpus regenerated in the same commit, as before. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NTcEKXTQMYt84fAjuw5A2M
1 parent d27c73a commit a4e6f8c

6 files changed

Lines changed: 12 additions & 6 deletions

File tree

  • agent-context/skills/metaobjects-authoring
  • fixtures/agent-context-conformance
    • java-kotlin-react-tanstack/expected/.claude/skills/metaobjects-authoring
    • java-react/expected/.claude/skills/metaobjects-authoring
    • python/expected/.claude/skills/metaobjects-authoring
    • ts-react-tanstack/expected/.claude/skills/metaobjects-authoring
    • ts-requirements/expected/.claude/skills/metaobjects-authoring

‎agent-context/skills/metaobjects-authoring/SKILL.md‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -558,9 +558,10 @@ third-party or LLM response stored verbatim, a column whose shape genuinely diff
558558

559559
```json
560560
{ "field.string": { "name": "relatedMemoryIds", "isArray": true } } // writer: list[str]
561+
{ "field.double": { "name": "vectorScores", "isArray": true } } // writer: list[float]
561562
{ "field.object": { "name": "profile", "@objectRef": "InstructorProfile", "@storage": "jsonb" } } // writer: a dataclass
562563
{ "field.map": { "name": "preferences", "@objectRef": "Preference" } } // writer: dict[str, Preference]
563-
{ "field.map": { "name": "vectorScores", "@valueType": "double" } } // writer: dict[str, float]
564+
{ "field.map": { "name": "sitePages", "@valueType": "string" } } // writer: Record<string, string>
564565
{ "field.string": { "name": "rawResponse", "@dbColumnType": "jsonb" } } // writer: dict[str, Any], nothing pinned
565566
```
566567

‎fixtures/agent-context-conformance/java-kotlin-react-tanstack/expected/.claude/skills/metaobjects-authoring/SKILL.md‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -558,9 +558,10 @@ third-party or LLM response stored verbatim, a column whose shape genuinely diff
558558

559559
```json
560560
{ "field.string": { "name": "relatedMemoryIds", "isArray": true } } // writer: list[str]
561+
{ "field.double": { "name": "vectorScores", "isArray": true } } // writer: list[float]
561562
{ "field.object": { "name": "profile", "@objectRef": "InstructorProfile", "@storage": "jsonb" } } // writer: a dataclass
562563
{ "field.map": { "name": "preferences", "@objectRef": "Preference" } } // writer: dict[str, Preference]
563-
{ "field.map": { "name": "vectorScores", "@valueType": "double" } } // writer: dict[str, float]
564+
{ "field.map": { "name": "sitePages", "@valueType": "string" } } // writer: Record<string, string>
564565
{ "field.string": { "name": "rawResponse", "@dbColumnType": "jsonb" } } // writer: dict[str, Any], nothing pinned
565566
```
566567

‎fixtures/agent-context-conformance/java-react/expected/.claude/skills/metaobjects-authoring/SKILL.md‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -558,9 +558,10 @@ third-party or LLM response stored verbatim, a column whose shape genuinely diff
558558

559559
```json
560560
{ "field.string": { "name": "relatedMemoryIds", "isArray": true } } // writer: list[str]
561+
{ "field.double": { "name": "vectorScores", "isArray": true } } // writer: list[float]
561562
{ "field.object": { "name": "profile", "@objectRef": "InstructorProfile", "@storage": "jsonb" } } // writer: a dataclass
562563
{ "field.map": { "name": "preferences", "@objectRef": "Preference" } } // writer: dict[str, Preference]
563-
{ "field.map": { "name": "vectorScores", "@valueType": "double" } } // writer: dict[str, float]
564+
{ "field.map": { "name": "sitePages", "@valueType": "string" } } // writer: Record<string, string>
564565
{ "field.string": { "name": "rawResponse", "@dbColumnType": "jsonb" } } // writer: dict[str, Any], nothing pinned
565566
```
566567

‎fixtures/agent-context-conformance/python/expected/.claude/skills/metaobjects-authoring/SKILL.md‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -558,9 +558,10 @@ third-party or LLM response stored verbatim, a column whose shape genuinely diff
558558

559559
```json
560560
{ "field.string": { "name": "relatedMemoryIds", "isArray": true } } // writer: list[str]
561+
{ "field.double": { "name": "vectorScores", "isArray": true } } // writer: list[float]
561562
{ "field.object": { "name": "profile", "@objectRef": "InstructorProfile", "@storage": "jsonb" } } // writer: a dataclass
562563
{ "field.map": { "name": "preferences", "@objectRef": "Preference" } } // writer: dict[str, Preference]
563-
{ "field.map": { "name": "vectorScores", "@valueType": "double" } } // writer: dict[str, float]
564+
{ "field.map": { "name": "sitePages", "@valueType": "string" } } // writer: Record<string, string>
564565
{ "field.string": { "name": "rawResponse", "@dbColumnType": "jsonb" } } // writer: dict[str, Any], nothing pinned
565566
```
566567

‎fixtures/agent-context-conformance/ts-react-tanstack/expected/.claude/skills/metaobjects-authoring/SKILL.md‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -558,9 +558,10 @@ third-party or LLM response stored verbatim, a column whose shape genuinely diff
558558

559559
```json
560560
{ "field.string": { "name": "relatedMemoryIds", "isArray": true } } // writer: list[str]
561+
{ "field.double": { "name": "vectorScores", "isArray": true } } // writer: list[float]
561562
{ "field.object": { "name": "profile", "@objectRef": "InstructorProfile", "@storage": "jsonb" } } // writer: a dataclass
562563
{ "field.map": { "name": "preferences", "@objectRef": "Preference" } } // writer: dict[str, Preference]
563-
{ "field.map": { "name": "vectorScores", "@valueType": "double" } } // writer: dict[str, float]
564+
{ "field.map": { "name": "sitePages", "@valueType": "string" } } // writer: Record<string, string>
564565
{ "field.string": { "name": "rawResponse", "@dbColumnType": "jsonb" } } // writer: dict[str, Any], nothing pinned
565566
```
566567

‎fixtures/agent-context-conformance/ts-requirements/expected/.claude/skills/metaobjects-authoring/SKILL.md‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -558,9 +558,10 @@ third-party or LLM response stored verbatim, a column whose shape genuinely diff
558558

559559
```json
560560
{ "field.string": { "name": "relatedMemoryIds", "isArray": true } } // writer: list[str]
561+
{ "field.double": { "name": "vectorScores", "isArray": true } } // writer: list[float]
561562
{ "field.object": { "name": "profile", "@objectRef": "InstructorProfile", "@storage": "jsonb" } } // writer: a dataclass
562563
{ "field.map": { "name": "preferences", "@objectRef": "Preference" } } // writer: dict[str, Preference]
563-
{ "field.map": { "name": "vectorScores", "@valueType": "double" } } // writer: dict[str, float]
564+
{ "field.map": { "name": "sitePages", "@valueType": "string" } } // writer: Record<string, string>
564565
{ "field.string": { "name": "rawResponse", "@dbColumnType": "jsonb" } } // writer: dict[str, Any], nothing pinned
565566
```
566567

0 commit comments

Comments
 (0)