Artifact 691bda4fa94fd14d79c495d4465fb53f02a37cbf7fb1f82dd70f0959af8840b2:
- File
docs/conf-format.md
— part of check-in
[3598f9d78d]
at
2026-11-14 13:15:53
on branch trunk
— Phase 8a: needs are checked, listed, and shown until they are done
A need is a step a harness must do for itself, such as registering a slot in its own settings. suit never edits those settings; it says what is needed and can tell when it has been done.
The done test has two forms and nothing else: PATH exists, and PATH contains "TEXT". suit needs lists every need as done, not done or cannot tell, and changes nothing. suit need HARNESS NAME prints the prompt's exact bytes so it can be handed to the harness.
After each apply the attention file holds one item for each need not done and none for those that are. Other kinds of item are left alone and keep their order, and nothing is written when nothing changed. If that update fails, apply writes no stamp, so the next run tries again. A bad need stops apply before it places anything. suit off removes the items.
suit-run is untouched and the speed budget still passes.
An eighth fuzz target covers the done-test parser.
1355 unit checks, 479 shell cases, 669 store cases, 745 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 24 source files. No suite has fewer cases than at the last check-in. (user: dmestas, size: 6137) [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. ## 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` | 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.