Skip to content

docs(skills): specialism coverage and composition guide from fresh-builder testing - #624

Merged
bokelley merged 25 commits into
mainfrom
bokelley/test-specialisms
Apr 20, 2026
Merged

bokelley merged 25 commits into
mainfrom
bokelley/test-specialisms

Conversation

@bokelley

Copy link
Copy Markdown
Contributor

Summary

Ran five rounds of fresh-Claude-builder tests across the 23 AdCP specialisms and the OAuth + signing + idempotency cross-cutting concerns. Each round spawned isolated Claude agents, asked them to build a working agent for a specialism using only the skills/build-*-agent/SKILL.md content, and scored orientation + build confidence. Reports under .context/specialism-tests{,-round2,-round3,-round4,-round5}/ (gitignored).

Median scores by round: R1 4/3 → R2 4.5/4 → R3 5/4 → R4 cross-cutting 4/2 → R5 revalidation 4/4.

What changed

  • Every build-*-agent/SKILL.md got a "Specialisms this skill covers" table mapping specialism IDs to per-specialism deltas, with dedicated subsections for each specialism the storyboard exercises. Root CLAUDE.md gained the inverse specialism → skill index.
  • build-seller-agent picked up per-specialism sections for sales-guaranteed (submitted→pending_approval→active transition), sales-non-guaranteed (bid_price + update_media_buy), sales-broadcast-tv (agency_estimate_number, measurement_terms, Ad-ID, C7 windows), sales-social (walled-garden sync flow), sales-proposal-mode, audience-sync (after reclassification from governance to media-buy), and signed-requests (RFC 9421 verifier wiring + grader prerequisites).
  • build-governance-agent aligned to the AdCP 3.0 GA Plan rewrite: authority_level split into budget.reallocation_threshold + human_review_required. content-standards.policies corrected to the structured-array shape. validate_content_delivery / validate_property_delivery shapes fixed to match storyboard. inventory-lists renamed to property-lists. New collection-lists section for program-level brand safety (IMDb/Gracenote/EIDR).
  • build-creative-agent split into three archetype branches: creative-ad-server (stateful library + pricing), creative-template (stateless transform), creative-generative (brief-to-creative). The build_creative handler diverges materially across them.
  • Composition guide added to build-seller-agent: middleware ordering through serve({ authenticate, preTransport }), principal threading (OAuth subject + verified signing keyid → idempotency namespace), 401 disambiguation (Bearer vs Signature challenge), idempotency semantics for async submitted responses. Error-code table (SERVICE_UNAVAILABLE retry / IDEMPOTENCY_CONFLICT / IDEMPOTENCY_EXPIRED) and JWT claim-to-principal mapping for multi-tenant setups.

Upstream issues closed by this work or by paired upstream PRs

Five issues filed against adcontextprotocol/adcp during R1; three already closed by upstream merges this week:

  • adcontextprotocol/adcp#2284 — content_standards.policy shape mismatch (closed)
  • adcontextprotocol/adcp#2285 — audience-sync governance-vs-media-buy classification (closed)
  • adcontextprotocol/adcp#2286 — governance findings schema conflict (closed)
  • adcontextprotocol/adcp#2287 — specialism/tool-family naming (still open; inventory-lists rename landed upstream, other items pending)
  • adcontextprotocol/adcp#2288 — tracking epic (still open)

Test plan

  • Read each build-*-agent/SKILL.md section against its specialism's compliance/cache/latest/specialisms/<id>/index.yaml — sample shapes and field names should match.
  • Verify the three <a name> anchors (idempotency, protecting-your-agent, composing-oauth-signing-and-idempotency) resolve when clicking cross-links in the rendered markdown.
  • Spot-check that the code examples compile when copy-pasted into a sandbox (they reference real @adcp/client and @adcp/client/server exports; verified against src/lib/ before writing).

Docs-only; no changeset required per project rules.

🤖 Generated with Claude Code

bokelley and others added 10 commits April 19, 2026 14:23
Every SKILL.md now has a "Specialisms this skill covers" table mapping
specialism IDs to concrete deltas, plus per-specialism sections where
the compliance storyboard requires behavior the baseline did not cover.
Root CLAUDE.md gets an inverse specialism → skill index.

Derived from a fresh-builder test against all 21 specialisms; median
build confidence was 3/5 on the prior skills, with six specialisms at
≤2/5. Upstream issues filed as adcontextprotocol/adcp#2284-#2288.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Upstream merges today invalidated two pieces of guidance:

- #592 dropped the 'escalated' check_governance
  status. The spec enum is now approved | denied | conditions. Human review
  is signalled via a denied decision with a critical-severity finding, and
  the buyer resolves review off-protocol before re-calling.
- #593 landed the real signing API surface
  (verifyRequestSignature, createExpressVerifier, VerifierCapability). My
  earlier skill guidance imported a fictional verifyRfc9421Signature helper.

Also fixes the approved-with-conditions response shape — was status:'approved'
plus a conditions[] array, should be status:'conditions' (the enum itself has
a conditions value).

No changeset — docs only.
Two upstream landings touched skill guidance:

- #603 split the old plan.authority_level enum into
  plan.human_review_required (GDPR Art 22 / EU AI Act, covers data-subject
  decisions) and budget.reallocation_threshold / reallocation_unlimited (budget
  autonomy). Plan shape updated; handler code updated; spend-authority specialism
  row updated.
- #600 shipped the RFC 9421 signed-requests grader
  with three phases (capability_discovery, positive_vectors, negative_vectors).
  Skill no longer claims "runner not yet implemented"; signed-requests section
  now documents the grading surface (WWW-Authenticate error codes), test-kit
  prerequisites, and the revoked-keyid / per-keyid cap requirements.

No changeset — docs only.
…sts wiring

Round-3 fresh-builder tests surfaced 4 residual bugs (6 specialisms tested, median 5/4):

- governance-delivery-monitor summary-table row said 'delivery_evidence' but
  code and storyboard use 'delivery_metrics'. Fixed.
- Skill claimed 'phase' is not on the wire — storyboard sends phase:'delivery'
  and llms.txt lists it as optional. Now: phase is optional-but-authoritative;
  handler routes on phase || delivery_metrics presence.
- validate_content_delivery 'artifact.assets' was shown as an object; actual
  shape is an array of {type, url, width, height, duration_ms?}. Also added
  'artifact.description' which the storyboard uses for calibration matching.
- signed-requests: showed JWKS with a comment 'mark revoked before grading'
  but never showed the revocationStore.insert call, had no per-keyid cap
  example for vector 020, and no mount-order warning for express body-parsers
  (covers_content_digest silently breaks if JSON parser runs first). All
  three now have copy-pasteable snippets.

Also fixed CLAUDE.md stale 'delete_audience' reference in the specialism
index — deletion rides on sync_audiences, no separate tool.

No changeset — docs only.
…llers

Two cross-cutting fixes on the seller skill's Protocol-Wide Requirements section:

1. Idempotency — replace the manual ctx.store.get('idempotency',...)/put
   pattern (which reinvents the wheel and misses payload-hash conflict
   detection) with the real createIdempotencyStore + createAdcpServer({
   idempotency }) wiring. Matches what build-si-agent already uses. Framework
   handles replay detection, IDEMPOTENCY_KEY_CONFLICT, and ttl validation.

2. OAuth — section was missing entirely. Adds a focused subsection covering
   the one thing the seller actually has to do right (WWW-Authenticate Bearer
   challenge + RFC 9728 / RFC 8414 metadata documents). Clients handle
   discovery and NeedsAuthorizationError; sellers just need to advertise
   correctly. Points at npx @adcp/client diagnose-auth for validation.

No changeset — docs only.
Round-4 cross-cutting test scored 2/5 on composition despite 4-5/5 on each
concern in isolation. The builder surfaced four specific gaps at the
boundaries between OAuth, signing, idempotency, and async submitted flows:

1. Middleware mount order — OAuth → signature verify → JSON parse → MCP
   transport → framework idempotency. Raw body must reach the verifier;
   bearer validation runs first so we don't canonicalize unauthenticated
   requests.

2. Principal threading — resolveSessionKey MUST come from an authenticated
   identity (OAuth subject + verified signing keyid), not self-declared
   buyer metadata. Two buyers on one OAuth tenant with different signing
   keys must not share a replay namespace.

3. 401 disambiguation — OAuth fails first. Bearer challenge goes out alone
   when the bearer is missing/expired; Signature challenge only when the
   request is authenticated but signed wrong. RFC 7235 allows multiple
   challenges; the signed-requests grader doesn't exercise the combined
   case.

4. Idempotency × submitted — ground-truthed against src/lib/server/
   idempotency/store.ts: the framework caches successful mutations
   including submitted envelopes, injects replayed:true on replay, and
   uses a 120s in-flight TTL matching the AdCP working-response timeout.
   Second IO is not created on replay; setup.url stays stable.

All ground-truthed against src/ before writing; the example middleware
chain is not speculative.

No changeset — docs only.
…links

Three R5 follow-ups, all ground-truthed against src/:

1. Name the three idempotency error codes the framework emits, with a
   table keyed on what triggers each and what the buyer should do.
   In-flight parallels return SERVICE_UNAVAILABLE with retry_after:1
   (verified in src/lib/server/create-adcp-server.ts). Handler authors
   no longer need to grep framework source to write replay assertions.

2. OAuth claim-to-principal paragraph. Covers aud/iss/scope validation,
   using sub as the principal, multi-tenant composition (tenant:sub to
   avoid sub collisions across tenants), and the OAuth/signing keyid
   reconciliation rule. resolveSessionKey example updated to compose
   tenant, subject, and keyid.

3. Cross-links: the OAuth section and the signed-requests specialism
   section both point down to the composition subsection. Added an
   explicit anchor (composing-oauth-signing-and-idempotency) so the
   links are stable across heading edits.

No changeset — docs only.
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