Arx docstrings use the Douki YAML format and are validated against the official Douki schema.
Docstrings are delimited by triple backticks:
```
title: Example docstring
summary: Optional summary value.
```
- module docstring
- function docstring
Every docstring must provide at least:
title(required by Douki schema)
Valid minimal docstring:
```
title: Add two numbers
```
The module docstring must:
- be the first top-level statement
- start at line 1, character 0
Valid:
```
title: Module docs
```
fn main() -> i32:
```
title: main
summary: Entry point for the module.
```
return 1
A function docstring must be the first statement in the function body, right
after : and the required newline/indentation.
Valid:
fn main() -> i32:
```
title: Function docs
summary: Function summary
```
return 1
Invalid:
fn main() -> i32:
return 1
```
title: Too late
summary: This docstring is valid Douki but in the wrong position.
```
Docstrings are currently lexed and validated for:
- placement rules (module/function positions)
- Douki YAML schema conformance
After validation, they are intentionally ignored during AST/IR generation until
dedicated DocString nodes are added in astx and irx.