Skip to content

Examples gallery: 5 → 18 agents, generated from the compiler#4

Merged
ZubeidHendricks merged 1 commit into
mainfrom
examples-gallery
Jun 17, 2026
Merged

Examples gallery: 5 → 18 agents, generated from the compiler#4
ZubeidHendricks merged 1 commit into
mainfrom
examples-gallery

Conversation

@ZubeidHendricks

Copy link
Copy Markdown
Owner

What

Grows the examples gallery from 5 to 18 agents — the launch checklist wants 15–20 here as the SEO/discovery surface — and makes the whole page generated from the real compiler so it can't drift.

The 13 new agents

classifier · translator · sql-generator · code-reviewer · email-writer · support-agent · contact-extractor · meeting-notes · product-namer · changelog-writer · faq-bot · persona-bot · research-director

Chosen so that, between them, they exercise every language feature: enum input and output, number inputs, object/array types, an array-of-objects-with-an-enum-field output, multiple tools, system: blocks, {env} interpolation, {#each}/{#if}, and uses: composition — none of which the original 5 covered fully.

Drift-proof by construction

scripts/gen-examples.mjs owns the page:

  • each section's TypeScript is the exact toac output (compiled at generation time, never hand-written);
  • each Open in playground link is the base64url of the source, matching Playground.vue's share()/fromHash() encoding (verified by round-trip);
  • the original 5 examples reproduce byte-for-byte (only 5 lines move in the diff).

A --check mode runs in CI (node scripts/gen-examples.mjs --check) to fail if examples.md ever falls out of sync with the compiler. It already earned its keep — it caught an invalid {#if}-on-an-array example during authoring (TOA305).

Verified

  • All 18 compile with zero diagnostics (the generator throws otherwise).
  • prettier --check clean; --check mode reports up to date.
  • Full vitepress build renders the expanded page without errors.

🤖 Generated with Claude Code

The gallery was 5 hand-written examples; the launch checklist wants 15–20 as
the SEO/discovery surface. Add 13 real-use-case agents (classifier, translator,
sql-generator, code-reviewer, email-writer, support-agent, contact-extractor,
meeting-notes, product-namer, changelog-writer, faq-bot, persona-bot,
research-director) that together cover every language feature: enum in/out,
number inputs, object/array types, multiple tools, `system:`, `{env}`,
`{#each}`/`{#if}`, and `uses:` composition.

The whole page is now generated by scripts/gen-examples.mjs: each section's
TypeScript is the *exact* `toac` output and each playground link is the
base64url of the source (matching Playground.vue), so neither can drift from
the compiler. A `--check` mode runs in CI to keep examples.md current; it
already caught one invalid `{#if}`-on-an-array example during authoring.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@ZubeidHendricks ZubeidHendricks merged commit f42c39f into main Jun 17, 2026
1 check passed
@ZubeidHendricks ZubeidHendricks deleted the examples-gallery branch June 17, 2026 18:51
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