Skip to content
Lyncat Tria

TRIA.md

TRIA.md is where a space’s rules live. It sits at the root of the folder, it’s a plain text file and it’s the single source of truth: if it isn’t in here, Tria doesn’t know it.

You don’t have to write it from scratch. Start from a template and change it with one sentence in Ask Tria.

What it looks like

It has two parts: a header between two --- lines, with what Tria always follows, and below it, in plain language, your folders, what each document is called and the special cases.

markdown
---inbox: "99-Inbox"duplicates: "98-Duplicates"protected:  - "1-Invoices Issued/2024"new_folders: subfolders_only---# Document organization — Freelancer## Folders| Folder | Contents ||---|---|| `2-Invoices Received/` | Invoices and receipts from suppliers and expenses. Subfolders `YYYY/Q1`…`Q4` by invoice date. |## Naming| Type | Format | Example ||---|---|---|| Invoice received | `Invoice [Supplier] - YYYY-MM-DD` | `Invoice Bay Stationery - 2025-03-14.pdf` |## Special cases- The quarter is decided by the invoice date, not the payment date.- If the date, the issuer or the document type can’t be made out, the document stays pending.

The header

The keys are in English, so Tria always reads them the same way.

KeyWhat it is
inboxThe inbox: the folder where you drop what comes in. Required.
duplicatesWhere exact duplicates go. Required.
protectedFolders Tria doesn’t touch: it never moves anything into or out of them. Wildcards work, like "7-Invoices/20*/". Optional.
new_foldersWhether Tria can create folders: never, subfolders_only (only subfolders inside existing ones, like the year or the quarter) or anywhere (wherever needed). Defaults to subfolders_only.

Paths are relative to the root of the space, with no ... The inbox and the duplicates folder can’t be inside each other. If the header isn’t valid, the space stops with a clear error until you fix it; in the CLI, tria rules check tells you what’s wrong.

The rules

Below the header, write the way you’d explain it to a person. The templates use three sections:

  • Folders: what goes in each one, with its subfolders.
  • Naming: the name format for each type of document, with an example.
  • Special cases: whatever isn’t obvious, like what to do with a draft or when to leave something pending.

Tria sends the whole of TRIA.md with every document, so whatever you change applies from the next read. When you change it, anything already read in the inbox gets read again.

There’s no hidden memory: correcting a proposal only changes what Tria does next time if the rule ends up in TRIA.md.

How to change it

  • In the app, in Rules (⌘4): “Tell Tria what to change”, the suggestions that come from your corrections, and “How Tria Works”, a form for “New folders” and “Folders Tria doesn’t touch”. You can see the sections, but you can’t edit them inside the app: to write by hand, use “Open in Editor”.
  • In the CLI: with your usual editor, then tria rules check. To ask for a change in one sentence, tria rules ask.

When you apply a change you asked Tria for, or one from the header form, Tria first saves the previous version in .tria/rules-history/. It keeps the last 20.