> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nika.sh/llms.txt
> Use this file to discover all available pages before exploring further.

# JSON Schema

> The machine-authoritative schema for .nika.

The canonical schema lives at:

**[https://nika.sh/schema/workflow.json](https://nika.sh/schema/workflow.json)**

It's a standard [JSON Schema draft 2020-12](https://json-schema.org/)
document. Your editor's YAML LSP can consume it directly.

## The mark

`nika: <name>`, the first line of every workflow. The key `nika` declares
"this is a Nika document", the value is the workflow's own kebab-case
identifier — there is no version to pin and no separate `schema:` or
`apiVersion:` field (the engine's internal canonical URI stays
`https://nika.sh/spec/v1` for RDF / conformance tooling, but the author
never types a URL). A `tasks:` key makes the document a workflow; the
project file `nika.yaml` (no `tasks:`) names the project
(`nika: my-project`), not a schema tag.

## Point your editor

Add the LSP modeline at the top of any `.nika` so your editor's YAML
language server consumes the JSON Schema directly:

```yaml the modeline · paste at the top of any workflow theme={"system"}
# yaml-language-server: $schema=https://nika.sh/schema/workflow.json
nika: my-workflow-id
```

See [editor setup](https://docs.nika.sh/getting-started/editors.md) for per-IDE instructions.

## Local validation

```bash theme={"system"}
nika check workflow.nika                 # validates against the current contract
nika check workflow.nika --native-strict # fail remaining native-first hints
nika spec --schema                       # the workflow schema this binary enforces
nika spec --schema --project             # the schema of the project file, nika.yaml
```

The published URL serves the schema for editors; `nika spec --schema` prints
the exact one your binary enforces, and `nika check` remains the judge.

## Versioning policy

* The envelope carries **no version marker** — the mark is the name.
* Minor additions (a new optional field, a new builtin) are **additive**.
* A grammar change ships with its `nika check --fix` migration and a refusal
  that names the move. 0.124 adds `images:` (an `agent:` task on a harness
  seat) and `nika:image_compose` additively.
* Anti-pattern: `nika: v1` + `workflow: { id }` — the previous envelope
  (through 0.108); `nika check --fix` moves the id onto `nika:`.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.