Cheat Sheet
Quick reference for the dot-prompt language syntax and features.
@ Sigils
| Sigil | Meaning |
|---|---|
| @name | Variable declaration or reference |
| {name} | Static fragment reference (cached) |
| {{name}} | Dynamic fragment reference (live) |
| # | Internal comment (stripped from LLM output) |
| -> | Indented documentation for params/fragments |
| = | Default value for params |
T Data Types
| Type | Can Branch? | Usage | Purpose |
|---|---|---|---|
| str | No | @query: str | Raw text input |
| int | No | @count: int | Raw numeric data |
| int[a..b] | Yes | @step: int[1..5] | Bounded integers |
| bool | Yes | @toggle: bool | True/False logic |
| enum[...] | Yes | @mode: enum[a, b] | Mutually exclusive modes |
| list[...] | Yes | @skills: list[A, B] | Multiple selection |
Tip: Only compile-time types (Yes to Branching) can drive if, case, and vary blocks.
C Control Flow
If Block
if @step is 1 doHello! Welcome.elif @step is 2 doContinue.elseFinal.end @step
Case Block
case @level dobeginner: Use simple analogies.advanced: Use technical terms.end @level
Vary (A/B Test)
vary @style doformal: Structured overview.casual: Jump straight in.end @style
F Fragments
Declaration
fragments:{rules}: static from: shared/rules.prompt{{history}}: dynamic -> Live conversation history{skill}: static from: skillsmatch: @skill_name
| Operator | Meaning |
|---|---|
| is x | Equals |
| not x | Does not equal |
| above x | Greater than |
| below x | Less than |
| min x | Greater than or equal |
| max x | Less than or equal |
| between x and y | Inclusive range |