Skip to content

docs(compliance): operator index + skill § Validate-locally across all 8 skills#709

Merged
bokelley merged 6 commits into
mainfrom
bokelley/compliance-docs-and-harness
Apr 21, 2026
Merged

docs(compliance): operator index + skill § Validate-locally across all 8 skills#709
bokelley merged 6 commits into
mainfrom
bokelley/compliance-docs-and-harness

Conversation

@bokelley

Copy link
Copy Markdown
Contributor

Summary

Closes the compliance-testing discoverability gap: the SDK has a mature surface (adcp storyboard run, adcp fuzz T1/T2/T3, adcp grade request-signing, --webhook-receiver, --invariants, validation hooks, SubstitutionEncoder, multi-instance, dogfood harness) but skills barely referenced it and operators had to read source to find the right command.

Two commits

1. docs(validation): VALIDATE-YOUR-AGENT index + skill-matrix harness

  • New docs/guides/VALIDATE-YOUR-AGENT.md — five-command operator checklist plus deep command reference for storyboard runner, adcp fuzz (Tier 1/2/3), request-signing grader, multi-instance, webhook conformance, schema-driven validation, custom --invariants, and SubstitutionEncoder/Observer.
  • BUILD-AN-AGENT.md § Compliance Check and root CLAUDE.md link to the new doc.
  • scripts/manual-testing/skill-matrix.json — 14 skill × storyboard pairs.
  • scripts/manual-testing/run-skill-matrix.ts — driver exposed as npm run compliance:skill-matrix. Supports --filter, --parallel, --stop-on-first-fail, --keep-workspaces.

2. docs(skills): unified § Validate Locally section across all 8 build-*-agent

All 8 skills (seller, brand-rights, creative, generative-seller, governance, retail-media, si, signals) get a consistent § Validate Locally block pointing at VALIDATE-YOUR-AGENT.md, then listing:

  • Canonical storyboard IDs for that specialism
  • Cross-cutting bundles (security_baseline,idempotency,schema_validation,error_compliance)
  • adcp fuzz with the right --tools list
  • Per-specialism failure decoder
  • npm run compliance:skill-matrix -- --filter <name> as the port-less fallback

Skill-specific extras: retail-media gets SubstitutionEncoder wiring; seller gets specialism-bundle enumeration + signed-requests + multi-instance pointers; governance gets Tier-3 --auto-seed fuzz + 3.0 GA authority_level → human_review_required reminder.

Test plan

  • npm run compliance:skill-matrix -- --help — works
  • npm run compliance:skill-matrix -- --filter seller — correctly selects 5 pairs
  • npm run compliance:skill-matrix -- --filter nonexistentfilter — exits 2 with helpful message
  • Every skill file has exactly one ## Validate Locally heading (no leftover ## Validation)
  • Run full matrix end-to-end (next PR — that's the dogfood test)

🤖 Generated with Claude Code

bokelley added a commit that referenced this pull request Apr 21, 2026
bokelley and others added 4 commits April 21, 2026 09:57
New operator-facing docs/guides/VALIDATE-YOUR-AGENT.md: five-command
checklist plus command-by-command references for storyboard runner,
adcp fuzz (T1/T2/T3), adcp grade request-signing, multi-instance,
webhook conformance, schema-driven validation hooks, custom
--invariants, and SubstitutionEncoder/Observer. BUILD-AN-AGENT.md and
root CLAUDE.md link to it so builders find the full surface without
reading source.

New scripts/manual-testing/skill-matrix.json + run-skill-matrix.ts
driver, exposed as `npm run compliance:skill-matrix`. Fans out the
existing agent-skill-storyboard harness across 14 skill × storyboard
pairs (seller, brand-rights, creative, generative-seller, governance,
retail-media, si, signals) with --filter, --parallel, --stop-on-first-fail.

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

Replaces skill-specific § Validation sections (which varied in depth and
didn't mention fuzz, webhook-receiver, multi-instance, substitution,
--invariants, or the skill-matrix harness) with a consistent § Validate
Locally block per skill. Each block points at docs/guides/VALIDATE-YOUR-AGENT.md
for the full picture, then covers specialism-specific commands: canonical
storyboard IDs, cross-cutting bundles (security_baseline, idempotency,
schema_validation, error_compliance), rejection-surface fuzz with the
right --tools list, and a decoder for the most common per-specialism
failure modes.

Skill-specific extras:
- retail-media: SubstitutionEncoder.encode_for_url_context wiring for
  catalog-driven macro URLs; mentions substitution_encoding_violation /
  substitution_binding_missing grader failures.
- seller: specialism bundle enumeration (sales_guaranteed, broadcast_tv,
  streaming_tv, social, etc.); signed-requests grader pointer; multi-
  instance pointer.
- governance: --auto-seed fuzz (Tier 3 update-tool coverage); 3.0 GA
  authority_level → human_review_required reminder.

Every skill also points at `npm run compliance:skill-matrix -- --filter <name>`
as the port-less fallback — invokes the dogfood harness in an isolated
workspace when local binding isn't available.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…ontroller skill refs

Matrix perf:
- New `--shared-node-modules <path>` flag on `agent-skill-storyboard.ts`
  symlinks the scratch workspace's `node_modules` to a cached template
  instead of running `npm install` per pair. The matrix driver prepares
  the template once in `.cache/harness-template/` (~30s) and every
  subsequent pair skips install (~20s saved per pair).
- `run-skill-matrix.ts` parallel default auto-picks `min(4, cpus/2)` —
  was `1`. 14-pair full matrix drops from ~34 min serial to ~9 min on
  a typical laptop.
- Fast-fail up-front if the `claude` CLI isn't on PATH (saves every
  pair from hitting the same wall).
- Summary line now prints wall, cpu, and speedup so regressions are
  obvious.
- `--no-shared-install` escape hatch for debugging template drift.

Skills (createComplyController is the new scaffold from #708):
- build-seller-agent/SKILL.md § Compliance Testing now leads with
  `createComplyController` (adapter-based, handles dispatch +
  idempotency + sandbox gating). `registerTestController` demoted to
  the "low-level alternative" footnote.
- build-creative-agent/SKILL.md gains § Deterministic Testing covering
  seed.creative + force.creative_status adapters, required for
  `creative_generative/seller` and `deterministic_testing` storyboards.
- docs/guides/VALIDATE-YOUR-AGENT.md gains § Deterministic testing
  section pointing at `createComplyController` with the canonical
  adapter example.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@bokelley bokelley force-pushed the bokelley/compliance-docs-and-harness branch from ab3e35e to 3ffd7d1 Compare April 21, 2026 14:04
@bokelley bokelley merged commit 745415f into main Apr 21, 2026
12 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