Repository navigation
docs(protocol): clarify format_id object shape vs format definition object - #3093
Conversation
…bject Closes #3089 Adds normative docs, schema description updates, and llms.txt entries to prevent two recurring implementation errors: setting format_id to a plain string, and putting a format_id object into a format definition slot. Non-breaking justification: all changes are additive — new doc page, description text prepended to existing schema fields, llms.txt bullets, nav entry. No wire schema fields added, removed, or renamed. Session: https://claude.ai/code/session_01769oXbPvUmWai97XxSeHrz
…ds back-link Fix pre-PR review findings: - Move inline // comments in format-references.mdx to prose labels above each code block (JSON does not support // comments) - Add Format References link to template-format-ids.mdx See Also section Session: https://claude.ai/code/session_01769oXbPvUmWai97XxSeHrz
…xamples Address code-reviewer findings: - Revert agent_url to https://creative.adcontextprotocol.org (singular, matches all existing docs; plural form in format-id.json agent_url desc is pre-existing) - Fix format-id.json description: "alphanumeric slug" → "slug matching [a-zA-Z0-9_-]+" (underscores and hyphens are valid per the actual schema pattern) - Remove erroneous unit field from creative-manifest.json format_id example (format_id has no unit property; unit belongs on renders[].dimensions) - Replace bare-string placeholder "..." in format-references.mdx assets example with a valid asset object Session: https://claude.ai/code/session_01769oXbPvUmWai97XxSeHrz
ba62691 to
33e4f13
Compare
|
check-seo is failing on the new docs page: Add Don't worry about the other files in the log (overview.mdx, get_account_financials.mdx, etc.) — those are pre-existing tech debt with description fields over the 160-char SEO cap, tracked separately. Only the new |
Fixes check-seo failure: missing og:title on the new page. https://claude.ai/code/session_01ELQDtXdFD193LbtVTFHjnd
|
Fixed — added Generated by Claude Code |
|
Got it — Generated by Claude Code |
Closes #3089
Summary
Implementors (and LLMs) repeatedly make two errors when working with creative formats: setting
format_idto a plain string ("display_300x250"), or putting a bareformat_idobject where a fullformatdefinition is expected. Both are caught by AJV but recur because the naming doesn't telegraph the shape difference.This PR implements Option B from the issue (non-breaking 3.x doc clarification) and defers Option A (rename
format_id→format_ref) to 4.0 as a breaking change requiring an RFC.Changes:
docs/protocol/format-references.mdx— new normative page: contrast table (format_idpointer vsformatdefinition), two named anti-patterns with AJV error messages and correct/wrong JSON examplesdocs/creative/formats.mdx—<Note>callout linking to the new page under "## Referencing Formats"docs/creative/template-format-ids.mdx— back-link in See Alsoserver/public/llms.txt— two## Key termsbullets forformat_idandformat(machine-readable path)static/schemas/source/core/format-id.json— title updated to "Format Reference (Structured Object)"; description rewritten to lead with "A JSON object — never a plain string"static/schemas/source/core/format.json,creative-manifest.json,creative-asset.json,preview-creative-request.json,content-standards/artifact.json— localformat_iddescription overrides prepended with "Always a structured object {agent_url, id} — never a plain string"docs.json— nav entry added in both version groupsNon-breaking justification: all changes are additive — a new doc page, description text prepended to existing schema fields (no type or structural changes), llms.txt bullets, and nav entries. No wire schema fields added, removed, or renamed. Existing consumers unaffected.
Pre-PR review:
//comments in JSON blocks, "alphanumeric" description not matching[a-zA-Z0-9_-]+pattern,unitfield in format_id example that doesn't exist on the schema)//comments in JSON blocks) + 1 nit addressed (template-format-ids.mdx back-link added)Note: The pre-existing
agent_urlfield description informat-id.json(line 12) usescreatives.adcontextprotocol.org(plural), inconsistent with all doc examples. Left as a pre-existing issue — tracked in run summary.Session: https://claude.ai/code/session_01769oXbPvUmWai97XxSeHrz
Generated by Claude Code