---
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.
