Skip to content

feat: storyboard coverage and comply() scenario filtering#1985

Merged
bokelley merged 6 commits intomainfrom
bokelley/client-storyboards
Apr 8, 2026
Merged

feat: storyboard coverage and comply() scenario filtering#1985
bokelley merged 6 commits intomainfrom
bokelley/client-storyboards

Conversation

@bokelley
Copy link
Copy Markdown
Contributor

@bokelley bokelley commented Apr 7, 2026

Summary

Changes

New storyboards (5):

  • capability_discovery.yaml — protocol-level capability introspection
  • campaign_governance_denied.yaml — hard denial, no escalation
  • campaign_governance_conditions.yaml — conditional approval with binding conditions
  • campaign_governance_delivery.yaml — delivery monitoring with drift re-check
  • creative_lifecycle.yaml — sync 3 formats, list/filter, build/preview

Comply performance fix:

  • extractScenariosFromStoryboard() extracts comply_scenario values from storyboard YAML
  • filterToKnownScenarios() validates extracted names against TRACK_SCENARIOS
  • Storyboard run endpoint passes only referenced scenarios to comply()

Track changes:

  • New campaign_governance track with 5 scenarios
  • Added creative_lifecycle to existing creative track

Test plan

  • 563 unit tests pass (pre-commit hook)
  • TypeScript compiles clean
  • All 16 storyboards load and pass structural validation
  • Schema prefix validation updated for protocol/ refs
  • extractScenariosFromStoryboard tested for dedup and empty cases
  • Manual: run storyboard evaluation against test-mcp agent (follow-up)

Closes #429, #430, #431, #433. Partial progress on #432.

🤖 Generated with Claude Code

bokelley added a commit that referenced this pull request Apr 8, 2026
Remove storyboard YAMLs (brand_rights, capability_discovery) and brand
compliance track — these belong in #1985 which covers full storyboard
coverage and comply() migration.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
bokelley added a commit that referenced this pull request Apr 8, 2026
* fix: storyboard validation failures against training agent

- Add creative and account capability blocks to get_adcp_capabilities
  response so capability_discovery validation passes (#1990)
- Increase training agent rate limit from 60 to 300 req/min to prevent
  cascading failures during bulk storyboard evaluation (#1991, #1992, #1994)
- Add brand_rights and capability_discovery storyboard YAMLs (#1993, #1992)
- Add brand compliance track to TRACK_SCENARIOS infrastructure (#1993)
- Update storyboard test to accept core/ and brand/ schema_ref prefixes

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix: address code review and security review findings

- Update stale rate limit comment (60→300 req/min) in task TTL calculation
- Add 'brand' to supported_protocols since training agent implements brand tools
- Update test expectation for supported_protocols

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix: training agent schema compliance for creative handlers

- Add created_date and updated_date to list_creatives response (required by schema)
- Add include_snapshot param to list_creatives tool schema and return
  snapshot_unavailable_reason when requested
- Fix build_creative assets format: use object map with content field
  instead of array with html field (matches creative-manifest.json schema)
- Add generative build mode (target_format_id only, no manifest/library)
  since training agent declares supports_generation: true
- Fix preview_creative render format: use render_id, output_format, role,
  preview_url/preview_html per preview-render.json schema

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix: address code review and security review findings (round 2)

- Fix preview_creative response: add response_type, preview_id, input
  fields per preview-creative-response.json schema
- Fix preview_creative: reject invalid format_ids with INVALID_FORMAT error
- Fix BuildCreativeArgs/PreviewCreativeArgs: type assets as Record (object
  map) matching creative-manifest.json schema, not Array
- Cap target_format_ids at 50 to prevent response amplification
- Remove non-schema synced_at field from list_creatives response

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* refactor: scope PR to training agent fixes only

Remove storyboard YAMLs (brand_rights, capability_discovery) and brand
compliance track — these belong in #1985 which covers full storyboard
coverage and comply() migration.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix: type training agent responses with @adcp/client types

Import BuildCreativeResponse, ListCreativesResponse,
PreviewCreativeResponse, and CreativeManifest from @adcp/client and use
them as return types. The compiler now catches shape mismatches at build
time:

- Removed creative_id from CreativeManifest (not in schema)
- Changed multi-format response from { results } to { creative_manifests }
- buildHtmlAssets returns AdcpCreativeManifest['assets'] type

Previously, handlers returned untyped object literals — the MCP SDK
wraps them in content[0].text as opaque strings, so TypeScript couldn't
validate the domain payload shape.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
bokelley and others added 3 commits April 8, 2026 06:53
Add five new storyboards and fix comply() performance for storyboard evaluations.

Storyboard coverage:
- capability_discovery: get_adcp_capabilities validation (#429)
- campaign_governance_denied: hard denial with no escalation (#430)
- campaign_governance_conditions: conditional approval flow (#430)
- campaign_governance_delivery: delivery drift monitoring (#430)
- creative_lifecycle: multi-format sync, list, build, preview (#431)

Comply performance (#433):
- extractScenariosFromStoryboard() extracts comply_scenario values from YAML
- filterToKnownScenarios() validates scenario names against TRACK_SCENARIOS
- Storyboard run endpoint now passes only referenced scenarios to comply(),
  reducing calls from 30+ to 2-5 per storyboard evaluation

Track changes:
- Add campaign_governance track with 5 scenarios
- Add creative_lifecycle to creative track

Closes #429, #430, #431, #433. Partial progress on #432.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Five new storyboards covering uncovered protocol domains:
- social_platform: accounts, audiences, native creatives, events, financials
- si_session: SI offering discovery, session lifecycle
- brand_rights: identity, rights licensing, creative approval
- property_governance: property list CRUD, delivery validation
- content_standards: standards CRUD, calibration, delivery validation

comply() migration from track-based to storyboard-based routing:
- PLATFORM_STORYBOARDS maps each platform type to recommended storyboards
- comply() accepts storyboards option (priority: scenarios > storyboards > tracks)
- evaluate_agent_quality uses PLATFORM_STORYBOARDS when no explicit tracks
- Heartbeat job uses storyboard routing when agent has a registered platform type
- Compare endpoint now filters to storyboard scenarios

Fixed comply_scenario annotations across all original storyboards:
- Replaced phantom names (account_setup, governance_setup, media_buy_flow)
  with real TestScenario values (full_sales_flow, create_media_buy, etc.)
- Added comply_scenario to all 7 storyboards that had none
- 20/21 storyboards now have test coverage (brand_rights pending #1993)

Validation against training agent filed as issues:
- #1990: capability_discovery creative validation failure
- #1991: creative_ad_server SSE/rate limit errors
- #1992: 15 storyboards skip (agent tool discovery gap)
- #1993: Brand protocol needs @adcp/client scenarios
- #1994: Bulk validation needs backoff

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
bokelley and others added 3 commits April 8, 2026 07:49
The capability_discovery scenario fails with "Tools suggest unreported
protocols: compliance (has: [comply_test_controller])" because the
training agent exposes comply_test_controller but doesn't declare
compliance in supported_protocols.

Task retrieval failures (callToolStream over stateless HTTP) tracked
separately in adcontextprotocol/adcp-client#442.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Picks up the serve() task store fix (adcp-client#443) and skip counting
fix (adcp-client#441). Local validation shows 20/20 storyboards passing
against the training agent.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…rsion)

Keep storyboard routing + @adcp/client 4.22.1 from our branch.
Add userAgent and outbound request logging from main.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@bokelley bokelley merged commit f2d4111 into main Apr 8, 2026
13 checks passed
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.

1 participant