Skip to content
suit Curating the wardrobes
Login

Curating the wardrobes

suit curate writes one HTML page that shows every skill, agent and command of your wardrobes beside how often it is used, with a choice for each: keep it, limit it to one project, or retire it. The choices come out as a short text file. This is part two of three of the usage work: part one counts (usage.md); part three will read the choices file and change the wardrobes. This part applies nothing.

suit curate [--since DAYS] [--out FILE]

It runs a usage scan as suit usage does, gathers what follows, writes the page and prints the path of the file written. DAYS is 1 to 400 (default 30), the window the uses are counted in. The default FILE is $SUIT_HOME/curate.html; a FILE with no / in it is in the working folder. Open the page in a browser as a local file. It needs no network and no server.

suit curate changes nothing else: no wardrobe file, no config, no stamp, no ledger. The scan writes the usage files, as it always does.

Exit statuses

0 the page was written; its path is on standard output
1 a file could not be read or written, the tally is not in its form, or a bound below was passed; no page is written
2 arguments wrong, or the config cannot be used (no wardrobe, a config error)
20 another suit holds the lock

The page

The design was settled with a working mock-up and is kept: a headline that states the finding, an outcome panel (the keep, limit and retire split, and the bytes of description loaded into every session, today against after your choices), a sticky filter bar with counted filters and bulk buttons, one row for each asset and a sticky bar at the foot with the result.

Where each number comes from

For each asset of kind skill, agent or command found in the store of any wardrobe that takes part in placing (conf-format.md, "More than one wardrobe"), the same listing suit plan uses:

Shown From
name, kind, wardrobe The store: a skill's folder name, or an agent's or command's file name without .md. Two wardrobes may hold the same kind and name: there is a row for each, and each row has a small tag with its wardrobe's name (rows with a unique name have none); the details always show the wardrobe. A name that is not a name (conf-format.md: letters, digits and . _ -) cannot be written in an outfit or in the choices file, so it is left out and counted in the page's "How to read this".
description The description of the front matter of a skill's SKILL.md, or of an agent's or command's file, if it has one. Plain, quoted, folded (>) and literal (\|) values are read, with or without - or +; white space is collapsed. Only the first 16 KiB of the file is read, so a front matter that ends after that has no description. The page keeps the length in bytes and the first 300 bytes of text, cut on a character boundary. No front matter, or none with a description, is not an error. A # is not read as a comment.
size on disk The bytes of the regular files of a skill's folder (not through symlinks), or of the one file. Counted to 4096 files and 16 folders deep; beyond that the size is marked "over".
files changed The newest modification time among those files, as a date (UTC).
state See below.
origin upstream NAME when the asset is one of the top-level entries under the upstream's into in the check-in that the record upstreams/NAME names (upstreams.md, "The record"): what its last accept brought into trunk. Your own skills in the same folder are yours. An upstream with no record, a record that is not whole, or one that names no check-in of its branch (never accepted) supplies nothing. Only an into that is skills, agents or commands can supply assets. The repository is read through the same libfossil calls suit upstreams uses and no file is changed; if it cannot be read, suit curate stops with a message that names the wardrobe (exit 1) and writes no page, and never shows everything as yours.
uses The tally's events of that kind in the window. A usage name matches an asset when it is equal to its name or ends with a colon and its name (plugin:name is an invocation of name). The kinds must match.
uses in 90 days, last used From the same events. Last used is the newest of any time the tally holds (up to 400 days).
four bars The uses in each of the last four 7-day periods before now, oldest first, whatever the window. A use at the instant a period begins is in that period.
used in Every project of the window's uses with its count, most used first, then in byte order. The key is the one the tally has: the project's remote key, or its folder with the home folder written ~, or -. At most 64 are listed; the rest are summed as "other".

State: worn, attic, loose

attic is the name of an outfit, as voice or extras would be, not a new word of the vocabulary (which is frozen). An outfit named attic is never counted as wearing anything, even if a wear names it.

The suggestion

Each row starts with a suggestion and its reason, as one rule:

  1. In the attic already: retire, "already in the attic".
  2. No usage at all in the tally: keep, "no usage recorded yet". Nothing is suggested for retirement on no evidence.
  3. No uses in the window: retire, "no uses in D days", unless its newest file is younger than the window: keep, "no uses yet · files changed recently".
  4. Every use in one project: if the asset is worn only at personal scope for that project, keep, "already limited to PROJECT"; else with three or more uses, limit, "N uses · all in PROJECT". But a personal wear needs a project's remote key (conf-format.md), and the tally gives a folder (starting with ~ or /, or - for a session with no folder) for a working folder that is not in a project suit knows. Limit is then disabled, its tooltip says the folder is not a project suit knows and to add it with suit project set (projects.md), and the suggestion is keep, "N uses · all in FOLDER (not a known project)".
  5. Otherwise keep, "N uses · M projects".

A suggestion is not proof: the history is short. A harness keeps its records for a limited time, suit's tally starts at its first scan, and a skill used twice a year may have no use in the window.

What the choices will mean

Part three will read the choices file; none of this happens yet.

The choices file

The text the page makes, and the file suit-choices.txt. This format is stable.

# suit choices 1
# made 2026-11-20 from a page of 2026-11-18, window 30 days
keep agent main reviewer
retire command main bar
personal skill main alpha github.com/o/solo
retire skill main stored
keep skill side twin

Bounds

assets on a page 4096 (CURATE_ASSETS_MAX). Over it is an error that says so, and no page is written.
projects listed for an asset 64 (CURATE_PROJECTS_MAX), the rest summed as "other"
names used that match no asset, listed the ten most used
a file read for its description 16 KiB, of which 300 bytes of text are kept
files counted for a size 4096, and 16 folders deep
uses held to count 600000 (CURATE_RECS_MAX), error beyond; try a shorter --since
the page 16 MiB, error beyond. 500 assets make a page of about 250 KB (evidence.md).

The test build can lower three of them: SUIT_CURATE_LIMITS=assets=N,recs=N,page=N. The release binary has no such variable.

How the page is made

The page is a template, src/curate.html, compiled into the binary as a C array by a step of the Makefile that uses only od and awk (the release build needs nothing but a C compiler and POSIX tools). suit curate writes the template with the data, as JSON, where the marker @@DATA@@ is. Every <, >, &, U+2028 and U+2029 in the data is written as a \u escape, so no value can end the script or open a tag, and every string is valid UTF-8: a byte that is not becomes U+FFFD. The page builds each row from escaped text, and loads nothing from anywhere: no script, font, image or address, no storage, no inline handler. The test greps for that.

The file is written atomically (a temporary file beside it, synced, renamed) with mode 0600 whatever the umask. A write that fails leaves an older page whole.

Privacy

The page names your projects and the folders you work in, so it is written with mode 0600. It is a local file: nothing is sent anywhere, by suit or by the page. Descriptions are shown as text, so a description that holds an address is text and is not followed.

Tests