Sources
How Plan builds the list of work units — files matching a glob, a numeric range, one-per-line in a file, or a brief split into sections.
A source defines the list of units a campaign will process. Each unit is one iteration — one prompt sent to one agent. Plan never stores the list; it re-enumerates the source on demand and subtracts the outputs already present.
The four sources
Files (glob)
Each file in a folder matching a pattern is a unit.
- Fields: root folder + pattern (e.g.
*.md,page-*.md,*.json). {unit}= the file name without extension;{unit_path}= the full path.- Use when you already have input files to process one by one.
Numeric range
Units are numbers from start to end, zero-padded.
- Fields: start, end, zero-pad.
{unit}=001,002, …- Use for “items 1 to N” without a pre-existing list.
List file
Each non-empty line of a text file is a unit.
- Field: file path.
{unit}= the line text (an id, a URL, a name…).- Use when you already have a list (CSV/TXT).
Brief (assistant)
A Markdown brief split into ## sections. Each section is a unit;
its body becomes {brief}. This is what the Assistant uses, and
it lets each unit carry its own detailed instructions.
Choosing a granularity
Pick the unit size that matches your resilience needs. Finer units mean a crash loses less work and retries are cheaper; coarser units mean fewer launches. For long per-item work (minutes each), one item per unit is usually right.
Common to all sources
For every unit, the agent receives the prompt template with placeholders substituted, and a unit is done when its output exists — which is what makes a campaign idempotent and resumable, whatever the source.