Skip to content

Update format_id to structured object in docs#132

Merged
bokelley merged 3 commits intomainfrom
bokelley/format-id-struct-doc
Oct 17, 2025
Merged

Update format_id to structured object in docs#132
bokelley merged 3 commits intomainfrom
bokelley/format-id-struct-doc

Conversation

@bokelley
Copy link
Contributor

Background

The AdCP specification defines format_id as a structured object containing agent_url and id. However, many examples in the documentation incorrectly used simple string IDs. This inconsistency could lead to parsing errors and namespace confusion.

Changes

This PR updates all occurrences of string-based format_id in the documentation to the correct structured object format.

  • docs/creative/asset-types.md: Updated format_id to an object.
  • docs/creative/brand-manifest.md: Updated format_id to an object.
  • docs/creative/channels/audio.md: Updated format_id to an object across multiple examples.
  • docs/creative/channels/carousels.md: Updated format_id to an object across multiple examples.
  • docs/creative/channels/display.md: Updated format_id to an object across multiple examples.
  • docs/creative/channels/dooh.md: Updated format_id to an object across multiple examples.
  • docs/creative/channels/video.md: Updated format_id to an object across multiple examples.
  • docs/creative/creative-manifests.md: Updated format_id to an object across multiple examples.
  • docs/creative/formats.md: Updated format_id to an object across multiple examples.
  • docs/creative/generative-creative.md: Updated format_id to an object across multiple examples.
  • docs/creative/implementing-creative-agents.md: Updated format_id to an object across multiple examples.
  • docs/creative/task-reference/list_creative_formats.md: Updated format_id to an object across multiple examples.
  • docs/creative/task-reference/preview_creative.md: Updated format_id to an object across multiple examples.
  • docs/creative/universal-macros.md: Updated format_id to an object across multiple examples.
  • docs/media-buy/capability-discovery/implementing-standard-formats.md: Updated format_id to an object across multiple examples.
  • docs/media-buy/task-reference/get_products.md: Updated the description for format_ids to reflect the structured object.
  • docs/media-buy/task-reference/list_creative_formats.md: Updated format_id to an object across multiple examples.

Testing

  • All documentation examples now use the structured format_id object.
  • No regressions found in existing tests.

bokelley and others added 2 commits October 16, 2025 21:49
Updated all documentation to match schema definition where format_id
is always a structured object with agent_url and id fields, not a
plain string.

Changes:
- Converted 114 occurrences across 17 documentation files
- format_id now consistently uses {"agent_url": "...", "id": "..."}
- Removes parsing ambiguity and namespace collision issues
- Aligns with /schemas/v1/core/format-id.json specification

Files updated:
- docs/creative/* (14 files)
- docs/media-buy/* (3 files)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Updated all 15 standard format schema files to reference the
structured format-id.json schema instead of using plain string
constants.

Before: "format_id": {"type": "string", "const": "display_300x250"}
After: "format_id": {"$ref": "/schemas/v1/core/format-id.json"}

This ensures standard formats properly validate against the
structured format ID object with agent_url and id fields.

Files updated:
- Display formats (7 files)
- Video formats (5 files)
- Native, foundational, and retail formats (3 files)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
The agent_url was appearing both inside format_id (correct) and as a
top-level field in format objects (redundant). Since format_id is now
a structured object containing agent_url, the separate field is
unnecessary.

Changes:
- Removed agent_url from format.json schema
- Removed 24 redundant agent_url occurrences from documentation examples
- format objects now only have agent_url inside format_id

Files updated:
- static/schemas/v1/core/format.json
- docs/media-buy/capability-discovery/implementing-standard-formats.md (11)
- docs/media-buy/task-reference/list_creative_formats.md (9)
- docs/creative/task-reference/list_creative_formats.md (4)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@bokelley bokelley merged commit d7caa92 into main Oct 17, 2025
4 checks passed
bokelley added a commit that referenced this pull request Mar 21, 2026
Two bugs prevented individual members (personal orgs with active
subscriptions) from accessing Track B+ certification:

1. enrichUserWithMembership relied on primary_organization_id which was
   never set for users who joined after the initial migration backfill.
   Now falls back to organization_memberships with best-effort backfill.

2. getMemberContext/getWebMemberContext skipped resolveEffectiveMembership
   for personal orgs (is_personal=true), so Addie always saw individual
   members as non-members.

Also extracts shared resolvePreferredOrganization/backfillPrimaryOrganization
helpers to eliminate duplicated org-selection logic.

Resolves escalations #132, #133, #134.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
bokelley added a commit that referenced this pull request Mar 21, 2026
Two bugs prevented individual members (personal orgs with active
subscriptions) from accessing Track B+ certification:

1. enrichUserWithMembership relied on primary_organization_id which was
   never set for users who joined after the initial migration backfill.
   Now falls back to organization_memberships with best-effort backfill.

2. getMemberContext/getWebMemberContext skipped resolveEffectiveMembership
   for personal orgs (is_personal=true), so Addie always saw individual
   members as non-members.

Also extracts shared resolvePreferredOrganization/backfillPrimaryOrganization
helpers to eliminate duplicated org-selection logic.

Resolves escalations #132, #133, #134.

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.

2 participants