# Your first quest pack, in the game, in 5 minutes

> Your first quest pack, visible in the game, in 5 minutes.

You create a quest pack, check it, and see your quest in the game on your machine. Then you break it on purpose, to learn how to read an error.

**Before you begin (5 minutes)**

- Node 20 or later, and git.
- The `alta` command: [install the CLI](https://docs.os.altasystem.ai/start/install) (one minute).

<details class="alta-agent">
<summary>Prompt for your agent</summary>

Paste this into Claude Code or Cursor, in an empty folder:

```text [Prompt]
Run `alta new quest-pack my-first-pack`, then `alta lint my-first-pack`, and tell me what the pack contains.
Then run `alta dev my-first-pack` and give me the address it prints. If `alta` is missing, follow
https://docs.os.altasystem.ai/start/install first.
```

</details>

### Create the pack

In an empty folder, ask `alta` for a quest pack. It writes one file, `my-first-pack/quests.json`.

```sh [Terminal]
alta new quest-pack my-first-pack
```

```text [Output]
created my-first-pack/quests.json (quest-pack, id my-first-pack)
next: edit the texts, then `alta lint my-first-pack`, then `alta dev my-first-pack`
```

### Look at what was created

A **quest** has a title the player reads, a reward in experience points, and **steps**. The first step is `manual`: the player says it is done. The pack holds two more quests, one of them proved by the machine (`kind: "check"`).

```json{11-14,19-21,24-25} [my-first-pack/quests.json]
{
  "schema": "alta.quests/0.3",
  "branch": "core",
  "quests": [
    {
      "id": "my-first-pack-welcome",
      "uid": "core.my-first-pack.welcome",
      "act": 1,
      "giver": "daemon",
      "main": false,
      "title": {
        "en": "My First Pack: first steps",
        "fr": "My First Pack : premiers pas"
      },
      "summary": {
        "en": "Replace this text: what the player learns here.",
        "fr": "Remplace ce texte : ce que le joueur apprend ici."
      },
      "reward": {
        "xp": 40
      },
      "steps": [
        {
          "id": "read",
          "kind": "manual",
          "human": "judge",
          "title": {
            "en": "Read what this pack is about",
            "fr": "Lire de quoi parle ce pack"
          }
        },
        {
          "id": "pick",
          "kind": "choice",
          "title": {
            "en": "Pick a pace",
            "fr": "Choisir un rythme"
          },
          "saves": "my-first-pack.pace",
          "choices": [
            {
              "id": "calm",
              "label": {
                "en": "Calm",
                "fr": "Calme"
              }
            },
            {
              "id": "busy",
              "label": {
                "en": "Busy",
                "fr": "Soutenu"
              }
            }
          ]
        },
        {
          "id": "name",
          "kind": "action",
          "optional": true,
          "title": {
            "en": "Give your helper a name",
            "fr": "Donne un nom à ton assistant"
          },
          "inputs": [
            {
              "id": "name",
              "kind": "text",
              "max": 40,
              "label": {
                "en": "Its name",
                "fr": "Son nom"
              },
              "saves": "answers.my-first-pack.name"
            }
          ],
          "run": {
            "do": "setup.daemon-name",
            "args": {
              "name": {
                "input": "name"
              }
            }
          },
          "check": {
            "type": "identity"
          }
        }
      ]
    },
    {
      "id": "my-first-pack-round",
      "uid": "core.my-first-pack.round",
      "act": 1,
      "giver": "operator",
      "type": "repeatable",
      "repeat": {
        "cooldownS": 3600
      },
      "requires": [
        "core.my-first-pack.welcome"
      ],
      "title": {
        "en": "A round",
        "fr": "Une ronde"
      },
      "summary": {
        "en": "Proven by the machine: at least one automation runs.",
        "fr": "Prouvée par la machine : au moins une automatisation tourne."
      },
      "reward": {
        "xp": 20
      },
      "steps": [
        {
          "id": "look",
          "kind": "check",
          "title": {
            "en": "One automation runs",
            "fr": "Une automatisation tourne"
          },
          "check": {
            "type": "world",
            "kind": "automation",
            "state": [
              "running"
            ],
            "min": 1
          }
        }
      ]
    },
    {
      "id": "my-first-pack-instant",
      "uid": "core.my-first-pack.instant",
      "act": 1,
      "giver": "daemon",
      "type": "instant",
      "title": {
        "en": "A quick one",
        "fr": "Une rapide"
      },
      "reward": {
        "xp": 15
      },
      "steps": [
        {
          "id": "done",
          "kind": "manual",
          "human": "judge",
          "title": {
            "en": "Say it is done",
            "fr": "Dire que c'est fait"
          }
        }
      ]
    }
  ]
}
```

### Check it

`alta lint` runs the same validators as the game. A pack that passes here loads in the game.

```sh [Terminal]
alta lint my-first-pack
```

```text [Output]
ok   my-first-pack/quests.json (quests)
1 checked, 0 errors, 0 warnings
```

### See it in the game

`alta dev` builds the game with your pack and serves it on your machine. Open the address it prints: your quest is in **Tracked quests**.

**Try it:**

```sh
alta dev my-first-pack
```

The terminal prints `Open: http://127.0.0.1:8797/?t=…` (or the next free port, if 8797 is taken). Open it; leave the terminal running.

### Change a text and look again

Stop the server with <kbd>Ctrl</kbd>+<kbd>C</kbd>. In `quests.json`, change the English title of the first quest, for example to `"My First Pack: hello"`. Run `alta dev my-first-pack` again and reload the page: the new title is there.

### Break it on purpose

Misspell the first `"kind"` as `"knd"` and check again. `alta lint` names the file, the field and the rule, [`step.kind`](https://docs.os.altasystem.ai/reference/errors#step-kind), says how to fix it and links to the rule's page. Put `"kind"` back and the check passes.

**Before:**

```json [quests.json]
"knd": "manual",
```

**After:**

```json [quests.json]
"kind": "manual",
```

```sh [Terminal]
alta lint my-first-pack
```

```text [Output]
FAIL my-first-pack/quests.json (quests)
     error: quests[0].steps[0].kind: The step's kind is missing or misspelled. [step.kind]
       in: quest core.my-first-pack.welcome, step read
       fix: Write "kind" with one of: manual, choice, check, action, command, link, mission.
       docs: https://docs.os.altasystem.ai/reference/errors#step-kind
1 checked, 1 error, 0 warnings
```

**Next:**

- [Your first Agent Chart](https://docs.os.altasystem.ai/charts/quickstart)
- [Prove a step by the machine](https://docs.os.altasystem.ai/guides/quests/prove-with-checks)
- [Publish from git](https://docs.os.altasystem.ai/marketplace/publish)
