Quiz template
Multiple-choice quiz scaffold with avatar reactions on right/wrong and a single sprout.score completion call.
| Status | Pairs with | Nouns |
|---|---|---|
| Template | Interactive canvas | Canvas |
What it does
A canvas template: title, question array, multiple-choice answer buttons, immediate visual feedback per answer, mid-activity avatar signals on right/wrong/stuck, and a single sprout.score call at the end.
Drop your questions in, hand the rest to Sprout. Tunable by age via dimensions.age.
How to use it
Open the .md spec. Copy the canvas HTML, fill in the questions array. The skill prompt tells your agent how to canvas.create + wrap + deliver. Two-step dry-run/commit included.
The spec
This is the raw .md content. Download as file or copy below.
name: quiz-template
slug: quiz-template
description: Multiple-choice quiz canvas with avatar reactions and one sprout.score completion call.
category: home_agent
status: template
pairs_with_patterns:
- canvas
pairs_with_nouns:
- Canvas
- Task
handsReferenced:
- canvas_create
- skill_write
- task_create
inputVariables:
- name: title
- name: questions
description: "Array of { prompt, choices[], correctIndex }."
- name: age
description: Reading-level dimension. "6-7" | "8-9" | "10+".
# Canvas shape
<section id="content">
<h2 id="title"></h2>
<div id="question"></div>
<div id="choices"></div>
<div id="score"></div>
</section>
<script>
// ... render question, handle clicks, sprout.signal() on right/wrong,
// sprout.score({ value, max }) at the end ...
</script>
# Skill prompt
For {{input.title}} on age {{input.age}}:
1. canvas.create with dryRun: true, embedding the questions array.
2. Echo the previewHtml + specHash to the parent. Pause.
3. On approval: canvas.create dryRun: false, specHash: <echoed>.
4. skill.write wrapping the canvas.
5. task.create when invoked.
Related
Was this page helpful?