Artifact 5cd8ca6a6bdd1ad54c1eff51129438d1f6b35873c73fc39aba64f40598178c9a:
- File
docs/conf-format.md
— part of check-in
[75c8fde976]
at
2026-11-18 23:06:52
on branch trunk
— Instructions join per harness, and an upstream can be a local folder
A harness's instruction file is now joined from up to four suppliers, ranked: the shared one, the harness's own (an outfit with only = HARNESS), the one limited to this machine, and the machine's own for that harness. Each rank has at most one supplier; more than one rank is joined in that order, each source as it is in the store, separated by a blank line. One supplier still links straight to the store's file. So every harness can read a shared file and one harness an extra one, where an only outfit's instructions used to clash with the shared ones. The same rule holds at personal scope.
An upstream whose url is file:// and an absolute path is a local upstream. suit upstream NAME take with no FOLDER takes from it. The hourly suit tend takes every local upstream whose folder changed since its last take, and accepts it when trust = auto, so a skill whose home is one of the owner's own repositories is placed without a copy kept by hand. Changed is decided by a stamp of the folder kept in suit's home folder (path, size, mtime, inode and executable bit of each entry): an unchanged hour costs one lstat per entry and opens no file of the upstream. As with the no-change run, an edit that keeps a file's size and mtime is not seen until the next one that does not. A missing folder is one attention item that clears when it is back. The take comment names the folder, and the pin when there is one.
Three upstream usage cases changed their expected text, because take no longer needs a FOLDER.
3828 unit checks (was 3792), 625 shell cases, 1258 store cases (was 1153), 1032 placement cases (was 985), 382 project cases (was 378), 237 usage cases (was 236), 288 curate cases, 376 curate-apply cases and 172 https cases, under clang, under gcc 16, with no user name set and umask 002, and under umask 027, in one run of make gate (77 minutes). 100% coverage in all 34 source files. (user: dmestas, size: 11350) [annotate] [blame] [check-ins using]
# suit.conf format This is the format as phase 1 parses it. `suit check FILE` parses a file and prints the canonical dump, or prints one error and exits 2. A file with any error is rejected whole. `suit check` with no FILE does the same for every wardrobe at once (see "More than one wardrobe" below). ## Lines - A line is at most 4096 bytes, not counting the newline. A file is at most 1 MiB (1048576 bytes). A NUL byte in a line is an error. - Blank lines are ignored. `\r` before the newline is whitespace. - `#` starts a comment when it is the first non-space character of the line or follows a space or tab. `a#b` keeps its `#`. There is no quoting, so a `#` after a space is a comment even inside quotes. - After comments are removed, leading and trailing whitespace is trimmed. ## Sections A section header is `[KIND ARGS...]`. Words are separated by spaces or tabs. A name is 1 to 128 characters of `A-Z a-z 0-9 . _ -`. | Header | Meaning | |---|---| | `[harness NAME]` | A harness. | | `[outfit NAME]` | An outfit. | | `[wear SCOPE [TARGET] [machine=NAME]]` | What a scope wears. | | `[need HARNESS NAME]` | A need. HARNESS must name a `[harness]` section. | | `[upstream NAME]` | An upstream. | For `wear`, SCOPE is `enterprise`, `user`, `shared` or `personal`. - TARGET is a project's remote address such as `github.com/owner/name` (characters `A-Z a-z 0-9 . _ - / : @ ~`). It is required for `shared` and `personal` and forbidden for `enterprise` and `user`. - `machine=NAME` comes last and is allowed only on `user` and `personal`. A `user` or `personal` wear with it applies on the machine whose name is NAME (`suit machine`, docs/store.md) and is ignored on any other, or when the machine has no name. A section is a duplicate when its kind and all its header words match an earlier one. `[wear user]` and `[wear user machine=studio]` are different sections. Limits per file: 64 harnesses, 512 outfits, 256 wears, 256 needs, 128 upstreams, 8192 entries in all. ## Entries An entry is `KEY = VALUE`. The key is everything before the first ` = ` (a space, an equals sign, a space), trimmed, with runs of whitespace inside it reduced to one space. The value is the rest, trimmed. `KEY =` with nothing after it is an empty value, which is an error. Every entry belongs to the nearest section above it. A list value is whitespace-separated words; it is stored and dumped with single spaces. ### harness | Key | Value | Repeatable | |---|---|---| | `KIND.SCOPE` | a path | no | | `record` | a path | yes | | `event NAME` | the harness's own event name, one word | no | | `sessions` | a glob of files holding session records: absolute, or starting with `~/` | yes, at most 8 | | `session time` | a path in a record: where its time is | no | | `session project` | a path in a record: where its working folder is | no | | `use KIND` | a rule saying what makes a record an invocation | yes, at most 16 in all | KIND is `skills`, `agents`, `commands` or `instructions`. SCOPE is `enterprise`, `user`, `shared` or `personal`. NAME in `event NAME` is letters, digits and `. _ - /`. The last four describe a harness's session records, for the usage counts ([usage.md](usage.md)). In `sessions`, `~` is the home folder and `*` matches any run of characters within one path part; nothing else is a wildcard. A path is field names joined by dots, a part ending in `[]` meaning each element of an array, and `.` alone the record itself. In `use KIND`, KIND is `skill`, `agent` or `command` and the value is a rule: ``` use skill = message.content[] where type=tool_use name=Skill name input.skill id id use command = . where type=user name message.content between <command-name>/ </command-name> ``` `IN [where FIELD=VALUE ...] name PATH [between A B] [id PATH]`, in that order, words separated by spaces or tabs; usage.md gives each part. A rule is one value, so a `#` after a space in it starts a comment as anywhere else: a rule cannot hold one, and has no quoting to get round it. A malformed rule is an error at its line that names what is wrong (`use skill: 'name PATH' is missing`). A `where` has at most 4 tests; a path at most 8 steps of 32 bytes. `session time` and `session project` take a path with no `[]`. ### outfit | Key | Value | |---|---| | `include` | list of outfit names | | `skills`, `agents`, `commands` | list of names; `*` is allowed | | `instructions` | a path | | `only` | one harness name. For `instructions`, the outfit's file is that harness's own and is joined after the shared one ([store.md](store.md), "Joined instructions") | | `slot NAME` | a path; NAME is letters, digits and `. _ - /` | | `file DEST` | a path; DEST is one word, `~` allowed | In a harness, a `KIND.personal` path is relative to a project's folder and has no `..` part. An outfit worn at personal scope may have a `file DEST` only with a relative DEST with no `..` part, and no `slot`. The parser accepts them; placing the scope refuses them, naming the outfit ([projects.md](projects.md)). ### wear | Key | Value | |---|---| | `outfits` | list of outfit names | | `publish` | `yes` or `no`; only on `wear shared` | ### need | Key | Value | |---|---| | `prompt` | a path in the wardrobe: relative, with no `..` part, naming a regular file | | `done` | the test, in one of two forms (below) | `done` is one of these and nothing else: - `PATH exists`: true when a file, folder or link is at PATH (a link counts whether or not its target is there). - `PATH contains "TEXT"`: true when PATH is a regular file of at most 4 MiB that holds TEXT as a string of bytes. TEXT is everything between the first `"` after `contains ` and the last `"` on the line, so it may hold spaces and `"`. It may not be empty, and nothing may follow the last `"`. PATH is one word. A leading `~` is the home folder. PATH must then be absolute. Anything else is an error at the line of the `done` entry: `need HARNESS NAME: cannot read the test: ...`. A file that is not there is not done. A file that cannot be read, is not a regular file, or is over 4 MiB is `cannot tell`, and counts as not done. See [needs.md](needs.md). ### upstream | Key | Value | |---|---| | `url` | one word | | `pin` | one word | | `path` | a path | | `trust` | `review` or `auto` | | `into` | a relative path of names | Every key is optional. `trust` defaults to `review`, `path` to the top of the folder an upstream is taken from, and `into` to `skills`. `into` says where the upstream's files land in the wardrobe: each part between slashes is a name (letters, digits, `.`, `_`, `-`) that does not start with a dot, so there is no empty, `.` or `..` part and no leading or trailing slash, and it is at most 256 bytes. `suit upstream NAME take` needs a `pin`, at most 256 bytes, unless the `url` is local, and a `path` with no `..` part; see [upstreams.md](upstreams.md). A `url` of `file://` and an absolute path, `url = file:///home/me/skills-repo`, makes a local upstream: a folder on this machine that `suit upstream NAME take` takes from with no FOLDER, and that the hourly `suit tend` takes again when it changes. Its `pin` is optional. `file://` followed by anything but a slash is refused where the url is used. Only `record`, `sessions` and `use KIND` may appear more than once in a section. Two `slot` keys with the same NAME, or two `file` keys with the same DEST, are duplicates. ## Errors Each error is one line on stderr, `PATH:LINE: message`, and the exit status is 2. Nothing is printed to stdout. Line 0 means the problem is with the whole file (it cannot be opened, or it is over 1 MiB). Errors are found in this order: syntax and limits as the file is read, top to bottom; then references, in file order; then include cycles. - unknown section kind, malformed header, wrong number or form of header words - unknown key, malformed entry, empty value, bad value, entry before any section - duplicate section, duplicate key - a limit exceeded, including more than 8 `sessions` or 16 `use` keys in a harness - `include` of an unknown outfit, `wear` naming an unknown outfit, `only` or `need` naming an unknown harness. These are reported at the line of the entry, or of the header for `need`. Forward references are fine. - an `include` cycle, reported at the `include` line that closes it, as `include cycle: a -> b -> a` ## The dump One fact per line. Sections are ordered by kind (harness, outfit, wear, need, upstream), then by their header words. A section is listed on its own line first, so empty sections show. Entries follow, ordered by key, then value: ``` harness claude harness claude skills.user = ~/.claude/skills wear user machine=studio wear user machine=studio outfits = voice need claude statusline done = ~/.claude/settings.json contains "slots/statusline" ``` The order of sections and entries in the file does not change the dump. ## More than one wardrobe Placing takes the `suit.conf` of every wardrobe you have, merged into one set. 1. Which wardrobes take part. Every folder directly under `$SUIT_HOME/store` whose name is a name (above) and that holds a regular file `suit.conf`, in byte order of name. A folder without `suit.conf` supplies nothing and is not an error. A folder whose name starts with `.` or is not a name is skipped. At most 16 take part; more is an error that says so. With none, suit says `STORE:0: no wardrobe with a suit.conf`, naming `$SUIT_HOME/store`. 2. One namespace. Each file is parsed on its own, then they are combined. Harness, outfit, need and upstream names are shared: `include`, `outfits`, `only` and a need's HARNESS may name something defined in any wardrobe. Unknown names and include cycles are found on the combined set and reported at the `FILE:LINE` of the entry, where FILE is that wardrobe's `suit.conf`. 3. No order between wardrobes. Which asset wins is decided only by scope and limit ([vocabulary.md](vocabulary.md)). The byte order of names only makes output stable. 4. The same section in two wardrobes (the duplicate rule above) is an error, and that includes `[wear user]`: `FILE2:LINE2: duplicate section [wear user]; first at FILE1:LINE1`. A second wardrobe that wears something at User scope uses `[wear user machine=NAME]`. 5. The limits above bound the combined set too: 64 harnesses, 512 outfits, 256 wears, 256 needs, 128 upstreams, 8192 entries and 1 MiB of files in all. Over a limit is an error in the file of the wardrobe that pushed it over. 6. Paths resolve where they are written. Every asset name and path in an outfit (`skills`, `agents`, `commands` including `*`, `instructions`, `slot`, `file`) and a need's `prompt` is in the store of the wardrobe whose config defines that section. `skills = *` in a wardrobe means that wardrobe's skills only. An outfit included from another wardrobe gets its assets from that wardrobe's store. 7. The same destination from two wardrobes at the same scope and limit is a clash, as within one wardrobe: `two assets want DEST: SRC (in wardrobe A) and SRC (in wardrobe B)`. 8. An error in any wardrobe's config rejects the whole set: nothing is placed. `suit check` with no FILE prints the dump of the combined set, or the first error and exit status 2. The dump does not say which wardrobe a line came from.