Skip to content

feat(docs): generate response shapes in TYPE-SUMMARY + currency on delivery tools#724

Merged
bokelley merged 4 commits into
mainfrom
bokelley/type-summary-responses
Apr 21, 2026
Merged

feat(docs): generate response shapes in TYPE-SUMMARY + currency on delivery tools#724
bokelley merged 4 commits into
mainfrom
bokelley/type-summary-responses

Conversation

@bokelley

Copy link
Copy Markdown
Contributor

Option B groundwork — stop treating response shapes as hand-written forever.

What

  • generate-agent-docs.ts extracts response schemas and emits _Response (success branch):_ under every tool in docs/TYPE-SUMMARY.md. For oneOf discriminated responses (e.g., update_media_buy) the generator picks the success arm automatically.
  • TYPE-SUMMARY.md is regenerated; every tool now carries both request AND response shape, visually separated.
  • Seller + creative skills: added explicit top-level currency on getMediaBuyDelivery and getCreativeDelivery examples (response schema requires it; matrix v3 turned up 12 /currency: must have required property failures).

Why

Matrix v3 (post PR #720) still hit 0/14 because upstream kept adding required fields to response schemas. Skill examples hand-roll shapes and drift. The generated TYPE-SUMMARY response blocks give builders an always-current reference they can cross-check against. When spec changes, the generated doc updates immediately and stale hand-written examples stand out.

Next PR (deferred, not in this one): replace hand-written skill **tool** — Response Shape blocks with pointers into TYPE-SUMMARY so shape stays generated.

🤖 Generated with Claude Code

bokelley and others added 3 commits April 21, 2026 13:01
Upstream adcp#2639 added invariants to universal/idempotency.yaml
(idempotency.conflict_no_payload_leak, context.no_secret_echo) without
shipping the matching reference module in the spec tarball. Without
registered assertions, resolveAssertions throws at runner start and
every comply() call against the current compliance cache fails before
executing any storyboard step.

New default-invariants module registers stub implementations tied to
both ids; comply.ts side-effect-imports it so consumers get coverage
automatically. Stubs aim for the spec's stated intent (scan error
envelopes for leaked payload fields; scan context echoes for
caller-supplied secrets). Consumers can override via
clearAssertionRegistry() then re-register their own spec.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@bokelley
bokelley force-pushed the bokelley/type-summary-responses branch from b81e808 to 992fc53 Compare April 21, 2026 17:38
@bokelley
bokelley merged commit 7e04fa0 into main Apr 21, 2026
14 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