This repository was archived by the owner on Mar 15, 2026. It is now read-only.
Update to AdCP v2.4 schemas with automated compliance validation - #7
Merged
Conversation
Key changes: - Product.format_ids now uses structured format-id objects (agent_url + id) - Property identifiers now use enum for valid identifier types - Added new schemas: performance-feedback, build-creative, creative agent tools - Removed deprecated adcp_version field from media buy requests/responses - Updated 30 existing schemas with latest spec clarifications Added update_schemas.py script to automate schema updates from adcontextprotocol.org All tests passing. Schemas now align with AdCP v2.4 structured format references. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This creative agent only needs schemas related to formats, assets, and creative agent tools - not media buy, signals, property, or other protocol areas. Changes: - Updated update_schemas.py to filter creative-agent-relevant schemas only - Added --all-schemas flag to optionally include all AdCP schemas - Removed 52 non-creative JSON schemas (media buy, signals, targeting, etc.) - Removed 49 generated Python files for non-creative schemas - Fixed import to use creative/list-creative-formats-response instead of media-buy version - Regenerated schemas from creative-only cache Results: - Reduced from 93 schemas to 41 schemas (56% reduction) - All tests passing ✅ - Cleaner scope aligned with creative agent responsibilities 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
These tests ensure our format definitions and responses stay aligned with AdCP schemas, catching issues when schemas change upstream. Tests validate: - All standard formats match Format schema structure - list_creative_formats response matches response schema - Required fields are present - Format ID references are structured (agent_url + id) - Asset requirements match schema structure - Enum values match schema enums Current status: - ✅ 3/6 tests passing - ❌ output_format_ids uses strings instead of structured format IDs (caught by test!) This test suite answers "when schemas change, how do we catch mismatches?" 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Schema compliance tests now run automatically to catch schema drift: CI Changes: - Added dedicated schema compliance test step - Runs after smoke tests, before full test suite - Fails build if format definitions don't match schemas Pre-commit Changes: - Added schema-compliance hook - Triggers on changes to format definitions or schemas - Prevents commits that violate schema structure This ensures: - Format definitions stay aligned with AdCP schemas - Schema changes are caught immediately - No manual validation needed Current compliance: 5/6 tests passing Known issue: output_format_ids needs structured format IDs (next commit will fix) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
The test was incorrectly expecting output_format_ids to be structured objects,
but the Format schema specifies they should be strings.
Key distinction:
- Product.format_ids: structured {agent_url, id} objects (cross-agent references)
- Format.output_format_ids: strings (same-agent references)
This makes sense because output_format_ids are formats produced by the same
generative agent, so they don't need the agent_url qualifier.
Renamed test to test_output_format_ids_are_strings() to clarify intent.
Result: 6/6 schema compliance tests now passing ✅
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
…ema generation CI was failing due to two issues: 1. **Pre-commit hook failure**: schema-compliance hook required uv which isn't installed in pre-commit environment. Moved to CI-only validation. 2. **Non-deterministic schema generation**: datamodel-codegen was generating different numbered class names each run. Fixed with: - Sorted schema file processing for consistent input order - Added --reuse-model flag to create type aliases instead of duplicates Changes: - Removed schema-compliance from pre-commit (runs in CI only) - Added --reuse-model flag to generate_schemas.py - Sort schema files before processing for determinism - Regenerated schemas with improved deduplication Result: Schemas now use type aliases (Asset3 = Asset) instead of duplicate classes, reducing file size and improving maintainability. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Updates creative agent to AdCP v2.4 schemas with structured format ID references and establishes automated schema compliance validation to prevent drift.
Key Changes
1. Schema Updates (AdCP v2.4)
{agent_url, id}format referencesadcp_versionfield from media buy schemas2. Creative-Only Schema Filtering
scripts/update_schemas.pywith creative-agent filtering--all-schemasflag for optional full schema set3. Automated Schema Compliance
4. Schema Management Tools
scripts/update_schemas.py- Download latest schemas from adcontextprotocol.orgscripts/generate_schemas.py- Regenerate Pydantic models from schemasFiles Changed
109 files changed: +9,346 insertions, -758 deletions
Added
tests/schema_compliance/)scripts/update_schemas.py)tests/schemas/v1/)src/creative_agent/schemas_generated/)Modified
Removed
Testing
Validation Workflow
When schemas change:
python scripts/update_schemas.pyto download latestpython scripts/generate_schemas.pyto regenerate modelsBreaking Changes
None - all changes are internal schema representations. External API remains unchanged.
Migration Notes
Schemas are now auto-generated from official AdCP schemas. Do not manually edit files in
src/creative_agent/schemas_generated/- use the generation scripts instead.🤖 Generated with Claude Code
Co-Authored-By: Claude noreply@anthropic.com