# Troubleshooting

> Find your symptom or your error message, and how to fix it: the twenty most common mistakes, before and after.

Two ways in. **By message**: search the rule printed in brackets, `[step.kind]`; every rule has its section on the [errors page](https://docs.altasystem.ai/reference/errors), and the most common ones are below, before and after. **By symptom**: something does not happen and nothing tells you why.

## By symptom

### `alta: command not found`

`alta` is not on your path. Run the last line of [Install the CLI](https://docs.altasystem.ai/start/install) again, or run every command through npm from the repository folder: `npm run alta -- check my-pack`.

### My file is not checked

`alta lint` only checks a `.json` file that has a `schema` field (or a universe folder). A file without it, or with a misspelled one, is skipped:

```text [Output]
no content file found (a content file is a .json with a `schema` field, or a universe folder)
0 checked, 0 errors, 0 warnings, 1 skipped (no schema)
```

Write the schema as `alta new` does, for example `"schema": "alta.quests/0.3"`. The [standards](https://docs.altasystem.ai/reference/standards/) list every schema name.

### `alta dev` does not start

`alta dev` checks your content first and stops on a problem: it prints `the content does not pass alta lint:` and the same report as `alta lint`. Fix what it says, then run `alta dev` again. If it says it `runs from the Alta System OS repository`, your `alta` was not installed from the repository: see [Install the CLI](https://docs.altasystem.ai/start/install).

### My quest does not appear in the game

- It `requires` another quest: it shows once that quest is done.
- It is not for your system: its `support.platforms` do not list it, or every step has an `os` that leaves your system out.
- Its file is not checked (see [My file is not checked](#skipped)), so `alta dev` did not add it.

### My quest stays locked

A quest opens when every quest of its `requires` is done. `alta lint` does not check yet that these uids exist: a misspelled uid, `"core.my-pack.welcom"`, passes the check and keeps the quest locked for ever. Copy each uid from the quest it names.

### A misspelled field changes nothing

A field the standard does not know is ignored, not reported: `"titel"` next to `"title"` passes the check and is never shown. Use [autocomplete in your editor](https://docs.altasystem.ai/recipes/editor-schemas): the JSON Schemas underline names they do not know.

### My universe looks simpler in `alta dev`

`alta dev` draws a universe pack with a preview renderer, from its `art.json` (shapes, colours, light), so it can look simpler than a universe that ships with the game. If something is missing from the preview, check `art.json` with `alta lint` first.

### `alta publish` says the folder is not in a git repository

`alta publish` reads the commit, the remote and the files of a git repository; it sends nothing.

```text [Output]
not ready (dry run: nothing sent)
  problem: my-chart is not in a git repository
  1. Nothing was sent. Fix the problems above, then run `alta publish` again.
```

Put the folder in a git repository with an https remote, commit, push, and run it again. See [Pin a commit and fill source](https://docs.altasystem.ai/recipes/pin-commit).

## By message: the twenty most common

Each case starts from the pack of `alta new quest-pack my-pack`, breaks one thing, and shows what `alta lint my-pack` prints. Fix the **before** into the **after** and the check passes.

### A comma too many

Rule [`file.json`](https://docs.altasystem.ai/reference/errors#file-json). The position printed (line 8, column 16) points at the second comma.

**Before:**

```json [quests.json]
"act": 1,,
```

**After:**

```json [quests.json]
"act": 1,
```

```text [Output]
FAIL my-pack/quests.json
     error: The file is not valid JSON. [file.json]
       detail: not JSON: Expected double-quoted property name in JSON at position 156 (line 8 column 16)
       fix: Look for a missing comma, a trailing comma or an unclosed quote near the position printed.
       docs: https://docs.altasystem.ai/reference/errors#file-json
1 checked, 1 error, 0 warnings
```

### A misspelled field name

Rule [`step.kind`](https://docs.altasystem.ai/reference/errors#step-kind). Without `kind` the step is nothing the game knows; the fix lists the kinds.

**Before:**

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

**After:**

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

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

### A branch the game does not have

Rule [`quests.branch`](https://docs.altasystem.ai/reference/errors#quests-branch). A quest file adds quests to an existing branch. A branch of your own comes with a chart.

**Before:**

```json [quests.json]
"branch": "mine",
```

**After:**

```json [quests.json]
"branch": "core",
```

```text [Output]
FAIL my-pack/quests.json (quests)
     error: branch: The quests are added to a branch the game does not have. [quests.branch]
       fix: Use an existing branch id, such as core, in branch.
       docs: https://docs.altasystem.ai/reference/errors#quests-branch
1 checked, 1 error, 0 warnings
```

### A uid without its branch

Rule [`quest.uid-prefix`](https://docs.altasystem.ai/reference/errors#quest-uid-prefix). Every uid starts with the branch, then your pack's id: two packs never collide.

**Before:**

```json [quests.json]
"uid": "my-pack.welcome",
```

**After:**

```json [quests.json]
"uid": "core.my-pack.welcome",
```

```text [Output]
FAIL my-pack/quests.json (quests)
     error: quests[0].uid: A quest uid must start with the id of its branch. [quest.uid-prefix]
       in: quest my-pack.welcome
       detail: uid must start with the branch id core.
       fix: Write the uid as <branch>.<name>, e.g. core.my-pack.welcome.
       docs: https://docs.altasystem.ai/reference/errors#quest-uid-prefix
1 checked, 1 error, 0 warnings
```

### A uid the game already uses

Rule [`quest.uid-taken`](https://docs.altasystem.ai/reference/errors#quest-uid-taken). The game's own quests keep their uids; prefix yours with your pack's id.

**Before:**

```json [quests.json]
"uid": "core.daily-hello",
```

**After:**

```json [quests.json]
"uid": "core.my-pack.instant",
```

```text [Output]
FAIL my-pack/quests.json (quests)
     error: quests[2].uid: This quest uid is already used by the game. [quest.uid-taken]
       in: quest core.daily-hello
       detail: already in the game
       fix: Pick another uid; prefix it with your pack's id.
       docs: https://docs.altasystem.ai/reference/errors#quest-uid-taken
1 checked, 1 error, 0 warnings
```

### A quest type that does not exist

Rule [`quest.type`](https://docs.altasystem.ai/reference/errors#quest-type). A weekly quest is a `daily` quest with `"reset": { "every": "week" }`.

**Before:**

```json [quests.json]
"type": "weekly",
```

**After:**

```json [quests.json]
"type": "instant",
```

```text [Output]
FAIL my-pack/quests.json (quests)
     error: quests[2].type: The quest type is not one the game knows. [quest.type]
       in: quest core.my-pack.instant
       detail: unknown type weekly
       fix: Use campaign, instant, daily, repeatable, repair, system or personal, or leave type out for a campaign quest.
       docs: https://docs.altasystem.ai/reference/errors#quest-type
1 checked, 1 error, 0 warnings
```

### A repeatable quest that gives too much

Rule [`quest.repeatable-xp`](https://docs.altasystem.ai/reference/errors#quest-repeatable-xp). A quest the player can redo gives little each time, so experience still means something.

**Before:**

```json [quests.json]
"reward": { "xp": 100 }
```

**After:**

```json [quests.json]
"reward": { "xp": 20 }
```

```text [Output]
FAIL my-pack/quests.json (quests)
     error: quests[1].reward.xp: A repeatable quest gives too much experience. [quest.repeatable-xp]
       in: quest core.my-pack.round
       detail: a repeatable quest gives at most 30 xp
       fix: Lower reward.xp.
       docs: https://docs.altasystem.ai/reference/errors#quest-repeatable-xp
1 checked, 1 error, 0 warnings
```

### `repeat` on a quest that does not repeat

Rule [`quest.repeat`](https://docs.altasystem.ai/reference/errors#quest-repeat). Only a `repeatable` quest has `repeat`.

**Before:**

```json [quests.json]
"type": "instant",
"repeat": { "cooldownS": 60 },
```

**After:**

```json [quests.json]
"type": "instant",
```

```text [Output]
FAIL my-pack/quests.json (quests)
     error: quests[2].repeat: repeat only belongs on a repeatable quest. [quest.repeat]
       in: quest core.my-pack.instant
       detail: repeat only on repeatable quests
       fix: Set "type": "repeatable", or remove repeat.
       docs: https://docs.altasystem.ai/reference/errors#quest-repeat
1 checked, 1 error, 0 warnings
```

### An instant quest that gives too much

Rule [`quest.instant`](https://docs.altasystem.ai/reference/errors#quest-instant). An instant quest is one step and 10 to 30 xp.

**Before:**

```json [quests.json]
"reward": { "xp": 100 }
```

**After:**

```json [quests.json]
"reward": { "xp": 15 }
```

```text [Output]
FAIL my-pack/quests.json (quests)
     error: quests[2].reward.xp: An instant quest has exactly one step and a small reward. [quest.instant]
       in: quest core.my-pack.instant
       detail: an instant quest has one step and 10 to 30 xp
       fix: Keep one step and lower reward.xp.
       docs: https://docs.altasystem.ai/reference/errors#quest-instant
1 checked, 1 error, 0 warnings
```

### A repeatable quest proven by a click

Rule [`quest.machine-proof`](https://docs.altasystem.ai/reference/errors#quest-machine-proof). A quest that comes back must be proven by the machine each time.

**Before:**

```json [quests.json]
{
  "id": "look",
  "kind": "manual",
  "human": "judge"
}
```

**After:**

```json [quests.json]
{
  "id": "look",
  "kind": "check",
  "check": {
    "type": "world",
    "kind": "automation",
    "state": ["running"],
    "min": 1
  }
}
```

```text [Output]
FAIL my-pack/quests.json (quests)
     error: quests[1].steps: This kind of quest must be proven by the machine, not only declared. [quest.machine-proof]
       in: quest core.my-pack.round
       detail: a repeatable quest needs at least one step proven by the machine
       fix: Add a step with a check (or a mission step).
       docs: https://docs.altasystem.ai/reference/errors#quest-machine-proof
1 checked, 1 error, 0 warnings
```

### A manual step without its reason

Rule [`step.manual-reason`](https://docs.altasystem.ai/reference/errors#step-manual-reason). Say why only the player can do it, or give the step a `run` and a `check`.

**Before:**

```json [quests.json]
{
  "id": "read",
  "kind": "manual"
}
```

**After:**

```json [quests.json]
{
  "id": "read",
  "kind": "manual",
  "human": "judge"
}
```

```text [Output]
FAIL my-pack/quests.json (quests)
     error: quests[0].steps[0].human: In 0.3 a manual step says why only the player can do it, so "I did it" never stays on a step the machine could do. [step.manual-reason]
       in: quest core.my-pack.welcome, step read
       detail: a manual step says why only the player can do it (human)
       fix: Add "human": speak, approve, device, external, judge or before; or give the step a run and a check.
       docs: https://docs.altasystem.ai/reference/errors#step-manual-reason
1 checked, 1 error, 0 warnings
```

### A link that is not https

Rule [`step.open-https`](https://docs.altasystem.ai/reference/errors#step-open-https). A link step opens only full https addresses.

**Before:**

```json [quests.json]
"open": "http://example.org/help"
```

**After:**

```json [quests.json]
"open": "https://example.org/help"
```

```text [Output]
FAIL my-pack/quests.json (quests)
     error: quests[2].steps[0].open: A link step opens something other than an https address. [step.open-https]
       in: quest core.my-pack.instant, step done
       fix: Write a full https:// address in open.
       docs: https://docs.altasystem.ai/reference/errors#step-open-https
1 checked, 1 error, 0 warnings
```

### `provenBy` names a step that is not there

Rule [`step.proven-by`](https://docs.altasystem.ai/reference/errors#step-proven-by). The hint lists the steps of this quest that have a proof.

**Before:**

```json [quests.json]
"provenBy": "nmae"
```

**After:**

```json [quests.json]
"provenBy": "name"
```

```text [Output]
FAIL my-pack/quests.json (quests)
     error: quests[0].steps[0].provenBy: provenBy names a step that is not in this quest, makes a loop, ends on a step without a proof, or sits on a step that has its own check. [step.proven-by]
       in: quest core.my-pack.welcome, step read
       detail: provenBy nmae is not a step of this quest
       hint: steps of this quest with a proof: name
       fix: Name a step of the same quest that has a check (or a mission), and remove the step's own check.
       docs: https://docs.altasystem.ai/reference/errors#step-proven-by
1 checked, 1 error, 0 warnings
```

### An executor that is not in the list

Rule [`step.run-executor`](https://docs.altasystem.ai/reference/errors#step-run-executor). A pack never holds a command: it names an executor the game knows.

**Before:**

```json [quests.json]
"do": "shell.run"
```

**After:**

```json [quests.json]
"do": "setup.daemon-name"
```

```text [Output]
FAIL my-pack/quests.json (quests)
     error: quests[0].steps[2].run.do: The step runs an executor that is not in the closed list. [step.run-executor]
       in: quest core.my-pack.welcome, step name
       detail: run.do shell.run is not an executor
       hint: the closed list: https://docs.altasystem.ai/reference/standards/executors
       fix: Use an executor of the closed list in run.do.
       docs: https://docs.altasystem.ai/reference/errors#step-run-executor
1 checked, 1 error, 0 warnings
```

### A missing argument

Rule [`step.run-args`](https://docs.altasystem.ai/reference/errors#step-run-args). The hint says what the executor takes, with its kind and bounds.

**Before:**

```json [quests.json]
"args": {}
```

**After:**

```json [quests.json]
"args": { "name": { "input": "name" } }
```

```text [Output]
FAIL my-pack/quests.json (quests)
     error: quests[0].steps[2].run.args: The step gives its executor an argument it does not take, or a value outside its list. [step.run-args]
       in: quest core.my-pack.welcome, step name
       detail: run.args of setup.daemon-name: name is required
       hint: setup.daemon-name takes name (text, at most 40 characters)
       fix: Give only the arguments the executor takes, e.g. "run": { "do": "llm.signin", "args": { "mind": "claude" } }.
       docs: https://docs.altasystem.ai/reference/errors#step-run-args
1 checked, 1 error, 0 warnings
```

### An argument from an input that is not there

Rule [`step.input-ref`](https://docs.altasystem.ai/reference/errors#step-input-ref). The hint lists the inputs of this step.

**Before:**

```json [quests.json]
"name": { "input": "nmae" }
```

**After:**

```json [quests.json]
"name": { "input": "name" }
```

```text [Output]
FAIL my-pack/quests.json (quests)
     error: quests[0].steps[2].run.args.name: A reference in run.args names an input the step does not have, an answer is not written answers.<key>, or an input is neither used nor saved. [step.input-ref]
       in: quest core.my-pack.welcome, step name
       detail: run.args.name: unknown input nmae
       hint: this step's inputs: name (text)
       fix: Write { "input": "<id of an input of this step>" } or { "answer": "answers.<key>" }, and feed every input to an argument (or saves it).
       docs: https://docs.altasystem.ai/reference/errors#step-input-ref
1 checked, 1 error, 0 warnings
```

### A secret with a value in the file

Rule [`step.input-secret`](https://docs.altasystem.ai/reference/errors#step-input-secret). The player types a secret each time; it never sits in a file.

**Before:**

```json [quests.json]
{
  "id": "token",
  "kind": "secret",
  "default": "123:abc"
}
```

**After:**

```json [quests.json]
{
  "id": "token",
  "kind": "secret"
}
```

```text [Output]
FAIL my-pack/quests.json (quests)
     error: quests[0].steps[2].inputs[0]: A secret stays between the player and their machine: never prefilled, kept, shown or written in a file, and it only feeds an argument the executor declares secret. [step.input-secret]
       in: quest core.my-pack.welcome, step connect
       detail: input token: a secret has no default (it is never prefilled, kept or shown)
       hint: remove "default" from this input: the player types a secret each time, and the program keeps it in its own store
       fix: Remove default, from, saves and pattern from a secret input, bind it to the executor's secret argument, and never write a key or a token in the file.
       docs: https://docs.altasystem.ai/reference/errors#step-input-secret
1 checked, 1 error, 0 warnings
```

### A check type that does not exist

Rule [`check.type`](https://docs.altasystem.ai/reference/errors#check-type). Without a known type, the step could never be proven.

**Before:**

```json [quests.json]
"check": { "type": "process", "name": "codex" }
```

**After:**

```json [quests.json]
"check": { "type": "bin", "name": "codex" }
```

```text [Output]
FAIL my-pack/quests.json (quests)
     error: quests[0].steps[2].check.type: The check names a type the game does not know, so the step could never be proven. [check.type]
       in: quest core.my-pack.welcome, step name
       detail: unknown check type process
       hint: the check types: https://docs.altasystem.ai/reference/standards/checks
       fix: Use a check type of the closed list, e.g. "check": { "type": "bin", "name": "codex" }.
       docs: https://docs.altasystem.ai/reference/errors#check-type
1 checked, 1 error, 0 warnings
```

### A check without what it checks

Rule [`check.bin`](https://docs.altasystem.ai/reference/errors#check-bin). Each check type has its fields; the hint gives an example.

**Before:**

```json [quests.json]
"check": { "type": "bin" }
```

**After:**

```json [quests.json]
"check": { "type": "bin", "name": "codex" }
```

```text [Output]
FAIL my-pack/quests.json (quests)
     error: quests[0].steps[2].check: A bin check must name a program. [check.bin]
       in: quest core.my-pack.welcome, step name
       detail: bin check needs a program name
       hint: e.g. "check": {"type": "bin", "name": "codex"}
       fix: Write "check": { "type": "bin", "name": "codex" }.
       docs: https://docs.altasystem.ai/reference/errors#check-bin
1 checked, 1 error, 0 warnings
```

### An executor on a system where it does not run

Rule [`step.run-os`](https://docs.altasystem.ai/reference/errors#step-run-os). Restrict the step to the systems its executor runs on.

**Before:**

```json [quests.json]
"run": {
  "macos": {
    "do": "mac.open-pane",
    "args": { "pane": "microphone" }
  },
  "linux": {
    "do": "mac.open-pane",
    "args": { "pane": "microphone" }
  }
}
```

**After:**

```json [quests.json]
"os": ["macos"],
"run": {
  "do": "mac.open-pane",
  "args": { "pane": "microphone" }
}
```

```text [Output]
FAIL my-pack/quests.json (quests)
     error: quests[0].steps[2].run.linux: The executor does not run on one of the systems of the step. [step.run-os]
       in: quest core.my-pack.welcome, step name
       detail: executor mac.open-pane does not run on linux
       fix: Restrict the step with os, or use an executor that runs there.
       docs: https://docs.altasystem.ai/reference/errors#step-run-os
1 checked, 1 error, 0 warnings
```

Still stuck? Every rule is on the [errors page](https://docs.altasystem.ai/reference/errors), and every recipe on [Recipes](https://docs.altasystem.ai/recipes/).
