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

# items

> Contract, placement, related fields and source examples for this Nika YAML field.

[Language reference](/reference/language/overview) / `items`

## Meaning and placement

### task → for\_each

The collection · a `$&#123;&#123; ... &#125;&#125;` reference OR a literal array. Evaluated EXACTLY ONCE, before the fan-out; no iteration feeds back into it (spec 03 §where this sits).

| Property        | Declaration                                        |
| --------------- | -------------------------------------------------- |
| Requirement     | Required in this object                            |
| Schema location | `/$defs/task/properties/for_each/properties/items` |
| type            | \["string", "array"]                               |

**In the same object:** [fail\_fast](/reference/language/words/fail_fast) · [max\_parallel](/reference/language/words/max_parallel)

[Schema source (use the pointer above)](https://github.com/supernovae-st/nika-spec/blob/c5ebbb7b862b68bc6cf7235efba61173b844afc6/schemas/workflow.schema.json)

## In a source template

Excerpt from `templates/agent-loop.nika.yaml`, source lines 124–133. This is a fragment, not a runnable workflow.

```yaml illustration theme={"system"}
          findings:
            type: array
            minItems: 1               # an empty list is a schema miss, never a green run
            items: { type: string, minLength: 1 }

  confirm:
    with:
      # The schema above already refuses an empty list and an empty string;
      # this assert is the trust boundary downstream code can SEE, and the
      # place for YOUR law once the goal fixes one (a count · a required id ·
```

### Templates containing this field

| Template                                 | Source                                                                                                                                         |
| ---------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
| `templates/agent-loop.nika.yaml`         | [Line 127](https://github.com/supernovae-st/nika-spec/blob/c5ebbb7b862b68bc6cf7235efba61173b844afc6/templates/agent-loop.nika.yaml#L127)       |
| `templates/document-to-fields.nika.yaml` | [Line 74](https://github.com/supernovae-st/nika-spec/blob/c5ebbb7b862b68bc6cf7235efba61173b844afc6/templates/document-to-fields.nika.yaml#L74) |
| `templates/fanout.nika.yaml`             | [Line 102](https://github.com/supernovae-st/nika-spec/blob/c5ebbb7b862b68bc6cf7235efba61173b844afc6/templates/fanout.nika.yaml#L102)           |

These are literal key occurrences in the source files, not an execution or conformance claim. [How to instantiate a template](/guides/templates).

## Contract and implementation

This page projects the named specification revision. Check [released engine status](/reference/status) and [the validation workflow](/guides/agent-authoring) before running a file. An optional field is not evidence that every engine supports every value.

Canonical identity: `language:word:items`. Spec revision: [`c5ebbb7b862b`](https://github.com/supernovae-st/nika-spec/tree/c5ebbb7b862b68bc6cf7235efba61173b844afc6).

[How documentation stays connected](/reference/knowledge-system).
