Skip to content

docs(protocol): clarify format_id object shape vs format definition object - #3093

Merged
bokelley merged 4 commits into
mainfrom
claude/issue-3089-format-id-docs-clarification
Apr 27, 2026
Merged

bokelley merged 4 commits into
mainfrom
claude/issue-3089-format-id-docs-clarification

Conversation

@bokelley

Copy link
Copy Markdown
Contributor

Closes #3089

Summary

Implementors (and LLMs) repeatedly make two errors when working with creative formats: setting format_id to a plain string ("display_300x250"), or putting a bare format_id object where a full format definition 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_id pointer vs format definition), two named anti-patterns with AJV error messages and correct/wrong JSON examples
  • docs/creative/formats.mdx — <Note> callout linking to the new page under "## Referencing Formats"
  • docs/creative/template-format-ids.mdx — back-link in See Also
  • server/public/llms.txt — two ## Key terms bullets for format_id and format (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 — local format_id description overrides prepended with "Always a structured object {agent_url, id} — never a plain string"
  • docs.json — nav entry added in both version groups

Non-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:

  • code-reviewer: approved after 3 blockers fixed (agent URL singular/plural inconsistency, // comments in JSON blocks, "alphanumeric" description not matching [a-zA-Z0-9_-]+ pattern, unit field in format_id example that doesn't exist on the schema)
  • docs-expert: approved after 2 blockers fixed (same URL issue, // comments in JSON blocks) + 1 nit addressed (template-format-ids.mdx back-link added)

Note: The pre-existing agent_url field description in format-id.json (line 12) uses creatives.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

claude added 3 commits April 26, 2026 17:24
…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
@bokelley
bokelley marked this pull request as ready for review April 26, 2026 21:25
@bokelley
bokelley force-pushed the claude/issue-3089-format-id-docs-clarification branch from ba62691 to 33e4f13 Compare April 26, 2026 21:25
@bokelley

Copy link
Copy Markdown
Contributor Author

check-seo is failing on the new docs page:

docs/protocol/format-references.mdx: missing og:title

Add og:title to the frontmatter of docs/protocol/format-references.mdx. Reference any sibling page under docs/protocol/ for the standard frontmatter shape (e.g. docs/protocol/architecture.mdx should have the canonical pattern: title, description ≤160 chars, og:title, og:description).

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 format-references.mdx is actionable here.

@bokelley

Copy link
Copy Markdown
Contributor Author

Fixed — added "og:title": "AdCP — Format References" to the frontmatter in 91afac1. check-seo should pass now.


Generated by Claude Code

@bokelley

Copy link
Copy Markdown
Contributor Author

Got it — og:title fix in 91afac1 noted. check-seo should be green now.


Generated by Claude Code

@bokelley
bokelley merged commit 523d297 into main Apr 27, 2026
18 checks passed
@bokelley
bokelley deleted the claude/issue-3089-format-id-docs-clarification branch April 27, 2026 03:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Clarify or consolidate format (string) vs format_id ({agent_url, id}) polymorphism

2 participants