Artifact db74c256ac98d24ffcc21a3eb41e1799ebb7c7ce3a44c990426d6ee1fa8abbb4:
- File
docs/conf-format.md
— part of check-in
[3cb21b0428]
at
2026-11-16 08:11:34
on branch trunk
— Phase 8c-1: an upstream is taken from a folder, reviewed, and merged
suit upstream NAME take FOLDER checks the upstream's files in on the branch upstream-NAME of the wardrobe that defines it, at INTO/ENTRY, with the comment upstream NAME at PIN. The check-in is built as a deck on a repository opened with no checkout, so the working copy is not touched. Its first parent is trunk's first check-in, so a later merge is three-way. Dot entries are skipped, links are refused, the lint runs, and a file that something else supplies is a clash. into is a new key, default skills; trust defaults to review.
With trust = review the update waits: the attention file says so, suit upstreams lists each upstream as never taken, current, waiting for review or conflict, and suit upstream NAME diff lists what accept would add, change, remove or conflict on. suit upstream NAME accept merges the branch into trunk after a dry run. A conflict changes no file and writes no marker; --mine PATH and --theirs PATH settle one. With trust = auto a clean take is accepted at once.
Every accept writes the tracked file upstreams/NAME, holding the hash and pin it accepted, into its merge check-in. So a merge that changes no other file can still be checked in, and keeping your version of the only conflict ends as current.
The proof: a local fix to a taken file survives an update that changes another line, and an update that rewrites the same line waits as a conflict with trunk byte-identical to before.
Limits, all in docs/upstreams.md. suit back after an accept refuses, as after any check-in, and no command undoes an accept. diff prints the list of files, not their text. After --mine, a later take that touches the same lines can conflict again, because the library leaves the merge parent off that check-in. Accept works only at trunk's tip. A wardrobe and an upstream of one name share an attention item. Fetching over the network is part two and is not built.
1473 unit checks (was 1431), 620 shell cases (was 612), 968 store cases (was 669), 846 placement cases and 378 project cases, under clang, under gcc 16, with no user name set, and under a strict umask, in one run of make gate (34 minutes). 100% coverage in all 26 source files. The speed budget still passes. No existing case was changed. (user: dmestas, size: 9267) [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 | KIND is `skills`, `agents`, `commands` or `instructions`. SCOPE is `enterprise`, `user`, `shared` or `personal`. NAME in `event NAME` is letters, digits and `. _ - /`. ### outfit | Key | Value | |---|---| | `include` | list of outfit names | | `skills`, `agents`, `commands` | list of names; `*` is allowed | | `instructions` | a path | | `only` | one harness name | | `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, and a `path` with no `..` part; see [upstreams.md](upstreams.md). Only `record` 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 - `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.