Artifact 813d234ad8847173a1446caa0f48faa67c8a96c96bef0475e760e37ae8884b9e:
- File
docs/conf-format.md
— part of check-in
[71a8d2c4d3]
at
2026-11-16 00:33:58
on branch trunk
— Suit places from every wardrobe, merged into one set
Placing read one wardrobe, named mine. It now takes every folder under the store that holds a suit.conf, in byte order of name, at most 16. Each config is parsed as before and the results are merged: harness, outfit, need and upstream names are shared, so a private outfit can include a public one. Paths and asset names resolve in the store of the wardrobe that defines the section. No wardrobe beats another; scope and limit decide, as before.
The same section in two wardrobes is an error naming both places. The same destination from two wardrobes at one scope is a clash that names the wardrobes. Any error in any config stops plan and apply before anything is placed. A merge that is refused leaves the combined set as it was.
suit check with no file prints the combined dump. suit why names the wardrobe when more than one takes part. The ledger's format did not change: a link's source path already names its wardrobe. The stamp watches every wardrobe's folder and the store folder, so a wardrobe that appears or goes is noticed. Nothing special-cases the name mine.
This is the owner's decision of 2026-11-15, recorded in docs/decisions.md with the rejected alternative, one master config naming assets as wardrobe:path. It corrects the 2026-11-12 line that said wardrobes already stacked.
The message for no config is now STORE:0: no wardrobe with a suit.conf. Fault call numbers in 12 existing cases moved because the store folder is listed first; what each asserts is unchanged.
The no-change run with two wardrobes of 50 files each is 0.83 to 0.85 ms over an empty program, limit 1 ms. The cost is one stat per watched path: 100 files in each wardrobe measured 1.19 to 1.24 ms. The budget fixture watches 100 files in all, as before.
Not covered: suit status with two wardrobes, which needs two repositories in the fixture. A duplicate-section message can be cut short when both paths are very long.
1431 unit checks (was 1355), 612 shell cases (was 606), 669 store cases, 846 placement cases (was 756) 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 (28 minutes). 100% coverage in all 25 source files. No suite has fewer cases than at the last check-in. (user: dmestas, size: 8702) [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.
\rbefore 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#bkeeps 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(charactersA-Z a-z 0-9 . _ - / : @ ~). It is required forsharedandpersonaland forbidden forenterpriseanduser. machine=NAMEcomes last and is allowed only onuserandpersonal. Auserorpersonalwear 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).
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"aftercontainsand 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.
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
includeof an unknown outfit,wearnaming an unknown outfit,onlyorneednaming an unknown harness. These are reported at the line of the entry, or of the header forneed. Forward references are fine.- an
includecycle, reported at theincludeline that closes it, asinclude 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.
- Which wardrobes take part. Every folder directly under
$SUIT_HOME/storewhose name is a name (above) and that holds a regular filesuit.conf, in byte order of name. A folder withoutsuit.confsupplies 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 saysSTORE:0: no wardrobe with a suit.conf, naming$SUIT_HOME/store. - One namespace. Each file is parsed on its own, then they are combined.
Harness, outfit, need and upstream names are shared:
include,outfits,onlyand 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 theFILE:LINEof the entry, where FILE is that wardrobe'ssuit.conf. - No order between wardrobes. Which asset wins is decided only by scope and limit (vocabulary.md). The byte order of names only makes output stable.
- 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]. - 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.
- Paths resolve where they are written. Every asset name and path in an
outfit (
skills,agents,commandsincluding*,instructions,slot,file) and a need'spromptis 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. - 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). - 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.