# How lessons work

> What's in a lesson, the order it plays in, and how answers are scored.

Every lesson teaches **one idea** in 5 to 10 minutes. If you give your agent a long article, it picks the central idea and suggests the rest as follow-up lessons.

## The shape of a lesson

A lesson plays as a run of screens, one brick each:

1. **Intro.** The title, a one-line summary, the level, and how long it takes.
2. **Hook.** A question before any teaching, to make you guess. It isn't scored: getting it wrong is the point.
3. **Concepts and practice.** One to three short [concept bricks](https://learn.ninja/docs/bricks/concept), each followed right away by two to four questions that practise it.
4. **Challenge.** One harder question that brings the ideas together.
5. **Fix your mistakes.** Any question you missed comes back once.
6. **Wrap-up.** Your score and two to four takeaways, plus a suggested next lesson.

## Feedback on every answer

You check each answer. A miss gets one short line that explains the mistake behind that option, and you try again. Miss twice and the answer is shown with its explanation. A correct answer gets a short "why", if you want it.

Here's a wrong pick, already checked:

```json
{
  "id": "p1",
  "prompt": "On a checkout page, which action should be primary?",
  "hint": "What is the one thing this page exists to help people do?",
  "explanation": "Checkout exists to complete the purchase, so **Place order** is the primary action.",
  "type": "choice",
  "options": [
    {
      "id": "a",
      "text": "Place order"
    },
    {
      "id": "b",
      "text": "Continue shopping",
      "feedback": "Useful, but it pulls people away from finishing their purchase."
    },
    {
      "id": "c",
      "text": "Apply coupon",
      "feedback": "Only some people need it, so it shouldn't compete with the main action."
    }
  ],
  "correct": [
    "a"
  ],
  "multiple": false
}
```

## Scoring

The wrap-up counts how each question went the first time through: right on the first try, right after a hint, right on the second try, or missed. The hook isn't scored, and neither are retries in "Fix your mistakes".

## Built for any language

Lessons are written in the learner's language, and the player's own buttons and messages follow it. Right-to-left languages like Arabic flip the whole layout. Code always stays as written.

## What a lesson can't do

* **Run code.** Visuals are plain HTML and CSS in a sandbox, with no scripts.
* **Show photos or images.** Visuals are drawn with HTML, formulas, and code.
* **Take typed answers.** Gaps use word chips instead.
* **Save progress.** There are no accounts yet, so a lesson starts fresh each time.
