Examples gallery: 5 → 18 agents, generated from the compiler#4
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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-directorChosen 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}, anduses:composition — none of which the original 5 covered fully.Drift-proof by construction
scripts/gen-examples.mjsowns the page:toacoutput (compiled at generation time, never hand-written);Playground.vue'sshare()/fromHash()encoding (verified by round-trip);A
--checkmode runs in CI (node scripts/gen-examples.mjs --check) to fail ifexamples.mdever 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
prettier --checkclean;--checkmode reports up to date.vitepress buildrenders the expanded page without errors.🤖 Generated with Claude Code