Skip to content
suit Artifact [3b74692009]
Login

Artifact [3b74692009]

Artifact 3b746920098c476387488e07ab16a8993738f4beeabbae52a646a91971671c04:

Wiki page [index] by dmestas on 2026-11-24 11:15:23.
D 2026-11-24T11:15:23.143
L index
N text/x-markdown
U dmestas
W 9030
# suit

Suit keeps the skills, agents, commands, instructions and hooks of your AI
coding harnesses (Claude Code, Codex, pic and others) in version-controlled
repositories called wardrobes, and links them into the folders each harness
reads. One C23 program with nothing to install beside it: it runs on a timer,
and it holds no code for any particular harness.

## How it works

```
 wardrobes (Fossil repositories, synced with a remote)
   mine    public
     \      /
      store: one working copy each, merged into one set
        |
        |  outfits group assets; wears say where an outfit applies
        v
 links:  ~/.claude/skills/NAME   ~/.pic/skills/NAME   ~/.codex/skills/NAME
         PROJECT/.claude/skills/NAME   ...
```

- A **wardrobe** is a Fossil repository of config. You can have several, for
  example a private one and a public one; suit merges them into one set.
- An **outfit** is a named list of assets. A **wear** says which outfits a
  scope wears: every session (User), or only inside one project (Project
  personal), optionally only on one machine or for one harness.
- A **harness** is described as data in `suit.conf`: where it keeps skills,
  commands, agents and instructions. Adding a harness needs no code.
- Suit places each asset as a symbolic link into the wardrobe, so you can edit
  a skill where you find it. It never replaces or removes anything it did not
  make; a real file in the way is reported as a clash and left alone.

Two timers keep it in step with no command run. Every minute, `suit-run`
compares a stamp and exits in a few milliseconds when nothing changed;
otherwise it applies the change. Every hour, `suit tend` lints and checks in
your edits, syncs each wardrobe with its remote, takes updates from local
upstreams, and counts how often each asset is used.

The exact words are in [docs/vocabulary.md](docs/vocabulary.md): fourteen,
each with one meaning.

## Quick start

```
make install                                         # build/release into ~/.local/bin (BINDIR=...)

suit clone mine https://example.org/r/you/wardrobe   # a wardrobe from its remote
suit login mine you                                  # the secret on standard input
suit plan                                            # what would be linked; changes nothing
suit apply                                           # link it
suit install                                         # the minute and hourly timers
suit status                                          # what is worn, clashes, what needs you
```

A wardrobe's `suit.conf` says what to wear. A small one:

```
[harness claude]
skills.user     = ~/.claude/skills
skills.personal = .claude/skills
skills.call     = disable-model-invocation: true

[outfit everyday]
skills = tdd diagnose artifact-design

[wear user]
outfits = everyday
```

The full format is in [docs/conf-format.md](docs/conf-format.md), and the
harness sections in [docs/harnesses.md](docs/harnesses.md).

## Everyday use

| You want to | Run |
|---|---|
| See what is worn, clashes, and anything waiting for you | `suit status` (`suit status --line` for a status bar) |
| See what a change to `suit.conf` would do | `suit plan` |
| Know where one skill comes from in this folder | `suit why NAME` |
| Check in an edit now instead of within the hour | `suit commit NAME -m TEXT` |
| See which skills, agents and commands you use | `suit usage` |
| Keep, limit to projects, make call-only, or retire assets | `suit curate`, then `suit curate apply FILE` |
| Review an upstream's update before it reaches you | `suit upstream NAME diff`, then `accept` (or `undo`) |
| Remove every link suit made | `suit off` |

Every skill a harness can pick by itself puts its description into every
session. `suit curate` shows what each one costs beside how often it is used.
A skill can be limited to the projects that use it, or made call-only: it then
loads only when you type its name, in every harness whose `[harness]` section
declares `skills.call`. See [docs/curate.md](docs/curate.md).

## Commands

| Command | Does |
|---|---|
| `suit plan`, `suit apply` | Show, then make, the links every wear asks for, and record them in the ledger |
| `suit status [--line]` | Store version, links per scope and project, clashes, skipped and missing links, timers |
| `suit why NAME` | Every place that supplies one asset here, and which one is in effect |
| `suit off` | Remove every link suit owns and empty the ledger |
| `suit run` | Apply when the stamp says something changed (what the minute timer starts) |
| `suit compare`, `suit stamp PATH...` | The no-change compare (exit 10 when something differs), and the stamp it reads |
| `suit check [FILE]` | Parse and check a config |
| `suit machine [NAME]` | Show or set this machine's name, for machine-limited wears |
| `suit roots [add\|rm FOLDER]`, `suit projects [scan]`, `suit project set FOLDER KEY\|unset FOLDER` | Find your projects and give each its key ([docs/projects.md](docs/projects.md)) |
| `suit store open\|status\|update\|repair NAME` | A wardrobe's working copy ([docs/store.md](docs/store.md)) |
| `suit lint NAME`, `suit commit NAME -m TEXT` | The lint that guards every check-in, and a check-in by hand |
| `suit tend [NAME]` | The hourly pass, for one wardrobe or all |
| `suit back NAME` | Undo the last update of a wardrobe |
| `suit clone NAME URL`, `suit remote NAME [URL\|--none]`, `suit login`, `suit logout`, `suit sync NAME` | Remotes and syncing, over `file://`, `http://` and `https://` |
| `suit upstream NAME take\|diff\|accept\|undo`, `suit upstreams` | Assets someone else maintains, reviewed before they merge ([docs/upstreams.md](docs/upstreams.md)) |
| `suit usage [scan]` | How often each asset was invoked, from the harnesses' session records ([docs/usage.md](docs/usage.md)) |
| `suit curate [apply FILE [--yes]]` | A page of every asset beside its use, and applying the choices made on it ([docs/curate.md](docs/curate.md)) |
| `suit needs`, `suit need HARNESS NAME` | Things a harness must do itself, as prompts its agent follows ([docs/needs.md](docs/needs.md)) |
| `suit hooks`, `suit hook EVENT` (`suit-run hook EVENT`) | Hook programs linked into slots, and the dispatcher a harness calls ([docs/hooks.md](docs/hooks.md)) |
| `suit install [--print]`, `suit uninstall` | The two timers, as launchd agents or systemd user units ([docs/install.md](docs/install.md)) |
| `suit bench` | The speed test behind the minute run's budget |

## Status

In daily use on macOS since the cut-over on 2026-11-19; the same tests pass on
Linux under gcc with ASan and UBSan, and under Fil-C, on every push.

Built: the User and Project personal scopes with machine and harness limits;
several wardrobes merged into one set; the store, the lint, the hourly
check-in and sync over `file://`, `http://` and `https://`; the timers; needs
and hook slots; upstreams taken from a folder, including local upstreams
re-taken by the hourly pass; usage counts; curate, with call-only skills.

Not built: the Enterprise and Project shared scopes; the copy and record
placements; fetching an upstream over the network; an upgrade command.
[docs/decisions.md](docs/decisions.md) holds what is settled and why, and
[docs/evidence.md](docs/evidence.md) the measurements behind it.

## Build

C23 and the C library only; the platform calls are all in `src/platform.c`.
GCC 13 or Clang 18, or newer. SQLite, libfossil, zlib and BearSSL are vendored
in `vendor/` and compiled in. Output goes in `build/`; the gates and what each
proves are in [docs/quality.md](docs/quality.md).

```
make suit          # dev build: build/dev/suit, ASan, UBSan, fault injection (the default)
make release       # build/release/suit and suit-run: -O2 -flto, stripped, no test code
make install       # make release, then copy both into ~/.local/bin (BINDIR=...), where the timers start them
make check         # unit and shell tests and fuzz replay, under ASan and UBSan
make cover         # fails unless src/ is 100% covered
make analyze       # clang static analyzer, fails on any report
make check-budget  # the speed test on suit-run, quiet then loaded
make fuzz          # every fuzz target, 30 seconds each
make filc          # tests under Fil-C (Linux; tools/filc-docker.sh on macOS)
make ci            # what the Linux runner runs
make quick SUITE=NAME   # one suite, three ways; the other targets (all, corpus, live) are in docs/quality.md
make gate          # the full local gate, run before every check-in
make clean         # remove build/
```

`make check-budget` needs `~/.claude/bin/loadgen` for the loaded run.
`make cover`, `analyze` and `fuzz` use clang from `/opt/homebrew/opt/llvm`
when it is there, and from `PATH` otherwise.

## License

BSD 2-Clause; see [LICENSE](LICENSE). The vendored code keeps its own terms:
libfossil is BSD 2-Clause, SQLite is public domain, zlib is under the zlib
license and BearSSL under the MIT license. Their license files and origins are
in [vendor/README.md](vendor/README.md).

Z 637f4c46691532c67e72c2f6d54c5ad0