# File Structure

> How a FizzBee spec file is laid out: optional YAML frontmatter for model-checker options, followed by the specification itself.

Canonical: https://fizzbee.io/reference/language/file-structure/
Source: https://github.com/fizzbee-io/fizzbee/blob/main/examples/references/LANGUAGE_REFERENCE.md#file-structure


## YAML Frontmatter (Optional)

FizzBee files can include YAML frontmatter for configuration:

```yaml
---
# Global options
options:
  max_actions: 100
  max_concurrent_actions: 2
  crash_on_yield: true

# Per-action options
action_options:
  ActionName:
    max_actions: 50
    crash_on_yield: false

# Other settings
deadlock_detection: true
liveness: strict
---
```

## Fizz Specification

After the frontmatter (or at the start if no frontmatter), the FizzBee specification contains:

1. **Top-level constants**: Global constant definitions
2. **Functions**: Pure or stateful functions (atomic or serial)
3. **Actions**: Model checker invoked operations
4. **Roles**: Class-like structures for actors/processes
5. **Assertions**: Safety and liveness properties

