| name | split |
| type | primitive |
| description | Transform Note structure into Collection |
Split
INPUT CONTRACT
target: Note (variable or ID)
out: Variable name
field: Optional string (default "results") — for JSON objects with array field
delimiter: Optional string (default "sentence") — for plain text: "sentence", "paragraph", "line", or custom
REQUIREMENTS:
target MUST be Note (not Collection)
- Note content MUST be: JSON array, JSON object with array field, JSONL, or plain text
NOT SUPPORTED:
- ❌ Collection (Collections already split)
- ❌ Invalid JSON structure
OUTPUT
Returns Collection of Notes, one per element/segment. Empty segments filtered out.
FAILURE SEMANTICS
Returns failed when:
- Target is Collection (not Note)
- Invalid JSON structure
- No items to split
Empty Collection ≠ error — indicates no splittable content, not failure.
REPRESENTATION INVARIANTS
- Note containing JSON array ≠ Collection
split converts: array → Collection, text → Collection