Writing Swirls
Writing Swirls
Syntax, file discovery, embedded code, and common parser errors.
Use these references when writing .swirls files. To choose which declarations your system needs, start with the primitives map.
- How it works: what happens between writing a file and a running system.
- Syntax: comments, identifiers, values, schemas, and
@ts/@json/@sql/@prismablocks. The complete top-level block list lives here. - Multi-file workflows: splitting declarations across files. Swirls systems span as many files as you need.
- Context: the
contextobject inside@tsblocks (nodes,reviews,secrets,meta,iteration,db). - Common mistakes: the incorrect patterns people (and agents) write most often, with corrections.
- Testing:
mockandplaybookblocks,swirls test, and validating suites withswirls doctor.