Skip to content
suit Decisions
Login

Decisions

Settled on 2026-11-12. Each has a short reason. A change to one of these gets its own dated entry below the table, with what changed and why.

Question Decision Why
Language C23, one binary No runtime to install. The compiler on macOS builds it today.
Dependencies None to install. SQLite, libfossil, zlib and TLS are compiled in. Version control inside the tool is worth more than the smallest binary.
TLS OpenSSL first, behind an interface of connect, read, write, close A client written from the RFCs can replace it later without touching the rest.
Version control Fossil, through libfossil's C API. Remote on zeitforge. Worked on with zit. Merge keeps a local edit through an upstream update. Tested.
Name suit for the tool, wardrobe for the repository Reuses the first version's name, content and design record.
Harnesses Described as data in the wardrobe. No harness code in suit. Every other tool has a fixed list of harnesses.
Anything a harness must do itself A need: a prompt its own agent follows, with a test Keeps suit ignorant of harness formats.
Scopes Enterprise, User, Project shared, Project personal, with machine and harness limits See vocabulary.md.
Editing In place, in the store. Suit checks edits in and syncs them hourly. Editing where you find it is what people and agents already do.
Files a harness rewrites Recorded into the wardrobe when they change, per machine The harness stays in charge and there is still history.
Status lines and hooks In the wardrobe. Registered once to a slot, then changed by linking. suit hook dispatches hooks. One registration, no later edits to a harness's settings.
Upstream updates Wait for review by default. trust = auto per upstream. A skill is instructions to an agent, so a change from elsewhere is untrusted input.
When suit runs Two timers: every minute suit-run, every hour suit tend (see 2026-11-13). Nothing installed in a harness. No agent waits on it.
Speed The no-change run costs at most 1 ms more than an empty program built the same way, writes nothing and opens no database. The build fails otherwise. Starting a process costs about 6 ms under load, so the budget is relative.
First harnesses Claude Code, Codex, pi Proven in a scratch home folder before any real folder is touched.
One binary or two One A 3 MB binary starts about 1 ms slower than a 33 KB one. Not worth a second program.

2026-11-12: the speed baseline is an empty program, not /usr/bin/true

The speed budget was measured against /usr/bin/true with a limit of 1 ms. It is now measured against build/empty, a program whose main returns 0, built with the same compiler and flags as suit, with a limit of 1 ms. /usr/bin/true is still printed, for information only. Reason: a system binary starts 0.6 to 1.5 ms faster than any binary we build on macOS (a byte-for-byte copy of /usr/bin/true is already 0.4 to 1.0 ms slower than the original), so the old baseline measured macOS and not suit. The test compares within the same round and takes the median of the per-round differences, because run-to-run noise at this machine's load is large.

Measured in phase 1: 0.92 ms quiet and 0.94 ms loaded over the empty program (0.65 to 0.76 ms in earlier runs). About 0.28 ms of that is binding 47 libc symbols at launch, so the cost grows with what is linked in. The one-binary decision is to be re-measured in phase 2, when SQLite, libfossil, zlib and TLS are linked. If the no-change run then exceeds 1 ms, the fix is a small front program for the timer and the hook dispatcher, not a looser budget.

2026-11-12: the wardrobe is two repositories

Your config is split into a public wardrobe (skills, agents, commands, outfits) and a private one (instructions, files recorded from each machine, anything personal). The lint that rejects token-shaped values does not catch account ids, names or local paths, which the instruction file and recorded settings contain. Wardrobes already stack, so this adds no mechanism. (Corrected on 2026-11-15, below: that sentence was not true of the code.)

2026-11-12: libfossil is used through its C API, with suit's own file writer

Pinned to trunk check-in f2983dcd78, with SQLite 3.55.0. Three facts from reading libfossil's source decided this:

2026-11-12: where each gate runs

The forge's Linux runner has gcc and no clang. On every push it runs the suite under gcc's ASan and UBSan and then under Fil-C (make ci). Coverage, static analysis, live fuzzing and the speed budget need clang and run on the development machine before a check-in (make all).

2026-11-12: the no-change run is its own program

Phase 2 linked SQLite, libfossil and zlib into suit and measured the no-change run both ways (docs/evidence.md, "Phase 2"). The one binary costs 0.82 ms over an empty program on a quiet machine and 0.98 to 1.38 ms under loadgen 30 8, over the 1 ms budget. A front program built only from the no-change path costs 0.40 to 0.42 ms quiet and 0.52 to 0.72 ms loaded. So:

2026-11-12: the ledger is a text file

The ledger, $SUIT_HOME/ledger, is a plain text file: one link DEST SOURCE line per symlink suit made, and one dir DEST line per folder it made to hold one, and one file PATH line per joined instruction file it wrote (docs/store.md). It is rewritten whole, beside and renamed, so a reader sees the old ledger or the new one. Reason: status and off must work with nothing but the file, no database and no store, so they still work when the store is damaged, the config is wrong or SQLite cannot open. The parser is strict (absolute paths with no space, no duplicates, at most 4096 entries, 1 MiB, 8192 bytes a line, a final newline) and has its own fuzz target. Before placing anything, suit writes a ledger that lists everything about to exist and everything about to go; after, one that lists what is on disk. So a crash leaves the ledger a superset of the disk, never a subset, and off never misses a link suit made. The dir lines are an addition to the first design (links only): without them off could not leave the home folder as it found it.

2026-11-12: suit run applies, and exit code 10 is the compare's alone

suit run was the no-change compare and exited 10 when something differed. It now does the work: it compares, and when something differs it runs apply and exits 0. Exit 10 and the changed: PATH lines belong to suit compare, which is the compare alone, with the same exit codes as the old suit run (0 unchanged, 10 changed, 11 no stamp, 12 bad stamp). The timer's program, suit-run, still does the compare itself and replaces itself with suit run on a difference. The stamp now covers the config, the ledger and every file and folder in the store but the checkout database, so an edit anywhere in the store is a reason to apply.

The links of the Project personal scope sit inside a project and must not be committed by accident. Suit hides them with the project's local exclude file (info/exclude of the main repository, found through commondir for a linked worktree), in a marked block that suit off removes, and not with the global ignore file. A global entry would hide same-named files in every project, including a file another project commits on purpose. A Fossil or zit project has no local exclude file, so its links are placed and suit status says they are visible. A destination that already holds something that is not suit's link is a clash and stays untouched, so what a project commits always wins; suit never runs git.

2026-11-13: how sync pulls, merges and pushes

suit sync uses fsl_sync_client (pull, then push) and fsl_ckout_merge. The password reaches libfossil only through its password callback, with the user name in the address, so it is in no address string or message. A fork is another open trunk leaf besides the working copy's version. It is tried as a dry run first and merged only if no file conflicts, because a merge writes conflict markers into files. libfossil's merge silently drops a file the other side deleted and silently skips one this side deleted, so suit compares the common ancestor's files with each side's and counts those as conflicts. A merge that changes no file cannot be checked in (fsl_checkin_commit answers FSL_RC_NOOP), so the files go back and the fork stays. A conflict does not stop the push: a fork on the remote loses nothing. file:// runs stock fossil test-http, which can leave fossil's own background process running; the tests turn it off with backoffice-disable.

2026-11-13: how clone gets a wardrobe onto a second machine

suit clone NAME URL uses fsl_clone (protocol 3) with fsl_repo_create's options, into NAME.fossil.clone beside the destination, then renames it into place: a clone that fails or is killed leaves no repository file under the name a reader looks for. fsl_clone makes its own libfossil context, so none of its file calls go through suit's wrappers and the fault tests cover suit's steps around it; a remote that cannot be used is covered by really using one that cannot. After the rename, store open and the remotes line follow; a failure of either removes the store and the repository file again, so the clone is whole or absent. The remotes line is written last, through suit remote's own code, so the address passes the same check. suit tend with no name lists the wardrobes folder and calls the one-wardrobe tend for each, because a timer should not need to know the names. The failing-sync count is one tiny file per wardrobe rather than a list file, so a parse error concerns one wardrobe and the rewrite is a whole-file replace of a few bytes. Exit 20 is new, for a name already taken.

2026-11-13: two timers, not one timer with a detached hourly child

suit install sets up two timers: every minute suit-run, every hour suit tend. The first design had one timer and the minute program starting a detached child once an hour. Two timers keep the minute run inside its speed budget (it does the compare and nothing else, with no clock check and no child to start) and make each job visible and stoppable by itself in launchd or systemd: a tend that hangs or fails shows under its own name, and it can be stopped without stopping the minute run. The text of the files comes from pure functions that build on both platforms and are unit-tested on both; only which set is written, and the loader, depends on the platform. The loader's path can be overridden by SUIT_LOADER only in the builds with fault injection, so no test can reach the real launchctl or systemctl and the release build has no such code.

2026-11-14: a failed load is left where the person will see it, and install again retries

When the loader failed, install exited 3 and left the files; a second install found them identical, said already installed and never loaded again, so the timers stayed unloaded with nothing to say so. For a tool meant to run hands-off that was wrong. Now a failed load leaves one item in the attention file (timers load: written but not loaded (LOADER exit N)), which suit status already counts and shows, and an install that finds the files identical and the item there loads again instead of saying already installed. Success, by any path, and uninstall remove the item. The item uses the attention file's own KIND NAME form, so it is replaced, not repeated, and no other item is touched. A failure to write the item is said but never hides the load failure: exit 3.

2026-11-14: how a need is judged, and what a failed attention update does

Decided while building needs, where the brief did not say:

2026-11-15: the hook dispatcher

2026-11-15: hook input is read-only

2026-11-15: suit places from every wardrobe

The sentence "Wardrobes already stack, so this adds no mechanism" in the entry of 2026-11-12 was not true of the code: placing read one fixed wardrobe, mine. Only the store side (suit clone, suit tend) was plural. Now placing takes every folder under $SUIT_HOME/store that holds a suit.conf and merges the files into one set. The rules are in conf-format.md, "More than one wardrobe". In short: one namespace for harness, outfit, need and upstream names; no order between wardrobes; the same section in two is an error; each path resolves in the store of the wardrobe whose config wrote it; a clash across wardrobes names both; an error anywhere rejects the whole set.

Rejected: one master config that names assets as wardrobe:path. It adds syntax, and the public wardrobe could not then be used alone.

The ledger needed no change: it already records the full source path, which holds the wardrobe's name. suit why names the wardrobe when more than one takes part.