Skip to content

Pre-flight ad product catalog validation for all create/update operations - #39

Open
MiniRodz wants to merge 8 commits into
spotify:mainfrom
MiniRodz:rkordi/ad-product-catalog
Open

Pre-flight ad product catalog validation for all create/update operations#39
MiniRodz wants to merge 8 commits into
spotify:mainfrom
MiniRodz:rkordi/ad-product-catalog

Conversation

@MiniRodz

Copy link
Copy Markdown
Collaborator

Summary

  • Adds a mandatory GET /ad_product_catalog pre-flight step before all entity create and update operations
  • Fetches the parent campaign to determine ad_product; defaults to AUCTION rules when UNSET/UNKNOWN/not specified
  • Catalog response cached for 15 minutes per session
  • Validates fields against the catalog's create/update/both rule sections and displays a ✅/❌ checkpoint summary
  • On validation failures, presents a recommendation and asks the user to accept or provide their own value (no auto-correction)

Skills updated

  • drafts — build flow (create + edit)
  • build-campaign — direct creation flow
  • campaigns — create + update
  • ads — ad-sets create/update, ads create/update
  • clone — cloned entity creation
  • bulk — budget updates + creative swap
  • campaign-strategy — API targetability validation
  • api-reference — endpoint listing + response schema in endpoints.md

Test plan

  • Tell the agent to create a campaign and verify GET /ad_product_catalog is called before the POST
  • Verify the ✅/❌ validation summary is printed before every create/update request
  • Trigger a validation failure and verify the agent presents a recommendation instead of auto-correcting
  • Verify catalog is reused within 15 minutes and re-fetched after expiry
  • Test draft build, standalone campaign create, ad-set update, and clone flows

🤖 Generated with Claude Code

MiniRodz and others added 6 commits July 24, 2026 17:25
Adds a mandatory GET /ad_product_catalog step before entity creation
across all skills to validate field values against ad product rules.
When ad_product is UNSET/UNKNOWN/unspecified, AUCTION rules apply.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The catalog fetch happens in an early step, but agents lose track of it
by the time they reach the individual create curls for campaigns, ad
sets, and ads. This adds a validation reminder directly before each
create curl in drafts (4a/4b/4c), build-campaign (4a/4b/4c), and
clone (6a/6b/6c).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Three changes to the ad product catalog validation:

1. Always fetch the parent campaign to determine its ad_product before
   validating child entities (ad sets, ads). For multi-step flows,
   use the ad_product from the campaign creation response.

2. Cache the catalog response for 15 minutes — reuse within the TTL,
   fetch again after expiry.

3. Add catalog validation before update (PATCH) operations on
   campaigns, ad sets, ads, draft edits, and bulk budget changes.
   Status-only operations (pause/resume/delivery/archive) are excluded.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Adds a visible ⛔ CHECKPOINT pattern requiring agents to print a
✅/❌ validation summary for every field checked against the ad
product catalog rules before executing any create or update request.
This makes it impossible for agents to skip validation silently.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
When catalog validation finds a failing field, the agent now presents
a recommended fix and asks the user to either accept the recommendation
or provide their own value. No auto-correction — the user always
decides.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Adds the response schema for GET /ad_product_catalog to endpoints.md,
showing the create/update/both rule separation per entity type. Updates
all skills to reference the correct rule section based on the operation:
create rules + both for POSTs, update rules + both for PATCHes.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@MiniRodz
MiniRodz marked this pull request as ready for review July 29, 2026 07:16
Comment thread skills/ads/SKILL.md Outdated
MiniRodz and others added 2 commits August 3, 2026 10:23
Migrate all ad product catalog fetch and campaign lookup curl commands
to use the api() request wrapper added in spotify#35. This aligns the catalog
validation steps with the rest of the skills.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@MiniRodz
MiniRodz requested a review from amurph491 August 4, 2026 01:38
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