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

# nika.yaml project file

> Use the released project control plane for policy, armed beats, retention and provenance.

> [!NOTE]
>
> **Live project control plane.** The released engine
> discovers `nika.yaml` from the working directory toward its
> ancestors. The file is optional when built-in defaults are enough. Its
> project-shape grammar is closed: `nika` ·
> `ceiling` · `arm` · `traces` ·
> `registry`. Direct runs and the cadence path
> (`nika arm` · `nika serve`) read the same file.

`nika.yaml` governs the project around the SDK. A `*.nika` file carries
one executable workflow. Keeping those roles separate is the foundation of a
clean application integration.

## One file for direct runs and armed beats

```yaml theme={"system"}
nika: my-project

ceiling: 0.50

traces:
  keep: 30d

registry:
  floor: provenanced

arm:
  - workflow: workflows/daily-brief.nika
    cadence: "TZ=Europe/Paris 30 7 * * 1-5"
    où: local
    plafond: 0.20
    manqué: rattraper-une-fois
    chevauchement: sauter
```

Every block is live, and they compose: direct runs apply the policy rungs, and
`nika arm`, `nika serve` and `nika arm fire` read the same file. Leave out any
block whose default suits the project. The closed project-shape vocabulary
remains nika · ceiling · arm · traces · registry. An unknown key refuses with
its line and the accepted set. A present file that silently ignores a typo
would be more dangerous than an absent file, so the parser never drops one.

| Block | Project job | Released consumer |
| - | - | - |
| `nika: <project-name>` | Project identity (kebab-case name · not a schema tag) | All project readers |
| `ceiling` | Default per-run USD ceiling | Direct runs and cadence |
| `arm` | Team registry of workflow beats | `nika arm` and `nika serve` |
| `traces.keep` | Project rung for run-journal retention | Direct run path |
| `registry.floor` | Minimum admitted artifact provenance | Direct workflow operations |

## Discover the governing file

The engine walks from the current working directory toward its ancestors and
uses the first `nika.yaml`, like Git finds `.git`.

DISCOVERY · FIRST PROJECT ROOT WINS

<pre tabIndex="0">
  /srv/project/apps/api/       ← Nika cwd
  &#x20;           │
  &#x20;           ├── no nika.yaml
  &#x20;           ↑
  &#x20;   /srv/project/                ← nika.yaml found

  &#x20;   direct traces stay at cwd · arm state stays at project root
</pre>

> [!TIP]
>
> **One client, local by default.** Import `Nika` from
> the package root and omit `url`. The client takes the engine
> from `bin`, then `NIKA_BIN` (both absolute paths), then
> the platform package npm installed with it; it never uses a
> `nika` found on your `PATH`. These examples target
> the published [0.124.1 SDK release](https://github.com/supernovae-st/nika-client/tree/v0.124.1).

```ts theme={"system"}
import { Nika } from '@supernovae-st/nika'

export const nika = new Nika({
  cwd: '/srv/project',
})

const run = await nika.run('workflows/daily-brief.nika')
const result = await run.result()
```

Prefer a `cwd` at the project root. It keeps workflow paths, project discovery
and `.nika/` state aligned. The [CWD and monorepos](https://docs.nika.sh/sdk/project/cwd-and-monorepos.md)
page documents the split when a nested process room is intentional.

## Found and inspect

```sh theme={"system"}
printf 'nika: my-project\n' > nika.yaml
nika arm
```

A project file can be one line. `nika arm` validates the project file and its
cadence grammar, reports its armed beats and schedules nothing. A direct run
applies the same file's policy rungs through the normal project discovery
path. `nika init` also writes a commented `nika.yaml`, among about 30 agent,
editor and hook files ([the full list](https://docs.nika.sh/getting-started/agents.md#nika-init-teach-the-repo)).

> [!WARNING]
>
> Do not pass `nika.yaml` to `Nika.run()`. The SDK runs a
> `*.nika` workflow. The engine discovers `nika.yaml` from `cwd` and
> applies its project policy around that run.

## Continue through the project

> [card] [Project file](https://docs.nika.sh/sdk/project/nika-yaml.md)
>
> Discovery, closed grammar and every rung in one file.

> [card] [CWD and monorepos](https://docs.nika.sh/sdk/project/cwd-and-monorepos.md)
>
> Align project discovery, direct traces and armed state.

> [card] [Arm registry](https://docs.nika.sh/sdk/project/arm-registry.md)
>
> Cadence, spend, silence, overlap and suspension policy.

> [card] [Policy ladders](https://docs.nika.sh/sdk/project/policy-ladders.md)
>
> Invocation, environment, project and operator precedence.

> [card] [Runtime state](https://docs.nika.sh/sdk/project/runtime-state.md)
>
> Traces, firing ledgers, watermarks and server persistence.


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