Artifact 763e0cb80574c9df7d210311d13a08f450dc8ea4c54870e4aeb599f0c3670ed5:
- File
test/fixtures/everything.dump
— part of check-in
[38c2e6220a]
at
2026-11-16 21:25:35
on branch trunk
— Suit counts how often each skill, agent and command is used
The counts come from the records a harness already keeps of its own work, read afterwards. What those records look like is data in the wardrobe's harness section: where the files are, where a record's time and folder are, and rules that say what an invocation looks like. No harness is named in suit's code. docs/harnesses.md has the rules for the first harness, checked against real records.
A streaming reader walks each JSON line against the rules in 64 KiB chunks, keeps at most the first 512 bytes of any string and stops at 64 levels, so a line of any length cannot grow its memory. It has its own fuzz target.
Suit keeps its own tally per machine under usage/ in its home folder, outside any wardrobe: one line per invocation with time, harness, kind, name, project and call id. A call copied into a resumed or forked record is counted once, by its id. The tally outlives the harness's own clean-up and drops what is older than 400 days.
suit usage scan reads what is new; a first scan reads files changed in the last 45 days and later scans read only new bytes. suit usage prints the table for a window, default 30 days, and --tsv gives the same rows for other tools. suit tend with no name runs the scan after tending; a failed scan is reported and changes nothing else. suit-run is untouched and the speed budget passes as before.
Measured: a generated tree of 200 files and 200 MiB scans in about half a second and a second scan opens no record file. On a real tree of 2547 files, read-only into a scratch home: 3756 invocations in 60 seconds, 10 MiB at peak.
A new suite, test/usage.sh, with 236 cases, is part of the gate.
2855 unit checks (was 1473), 620 shell cases, 1153 store cases, 846 placement cases, 378 project cases and 236 usage cases, under clang, under gcc 16, with no user name set, and under a strict umask, in one run of make gate (41 minutes). 100% coverage in all 28 source files. One existing unit line changed: a table of fault points gained entries. (user: dmestas, size: 2522) [annotate] [blame] [check-ins using]
harness h1 harness h1 agents.enterprise = /etc/h1/agents harness h1 agents.personal = .h1/agents.local harness h1 agents.shared = .h1/agents harness h1 agents.user = ~/.h1/agents harness h1 commands.enterprise = /etc/h1/commands harness h1 commands.personal = .h1/commands.local harness h1 commands.shared = .h1/commands harness h1 commands.user = ~/.h1/commands harness h1 event Stop = Stop harness h1 event SubagentStop = subagent_stop harness h1 instructions.enterprise = /etc/h1/AGENTS.md harness h1 instructions.personal = AGENTS.local.md harness h1 instructions.shared = AGENTS.md harness h1 instructions.user = ~/.h1/AGENTS.md harness h1 record = ~/.h1/settings.json harness h1 record = ~/.h1/state.json harness h1 session project = cwd harness h1 session time = timestamp harness h1 sessions = ~/.h1/projects/*/*.jsonl harness h1 sessions = ~/.h1/projects/*/*/subagents/*.jsonl harness h1 skills.enterprise = /etc/h1/skills harness h1 skills.personal = .h1/skills.local harness h1 skills.shared = .h1/skills harness h1 skills.user = ~/.h1/skills harness h1 use agent = message.content[] where type=tool_use name=Agent name input.subagent_type id id harness h1 use agent = message.content[] where type=tool_use name=Task name input.subagent_type id id harness h1 use command = . where type=user name message.content between <command-name>/ </command-name> harness h1 use skill = message.content[] where type=tool_use name=Skill name input.skill id id harness h2 outfit a outfit a agents = ag-* outfit a commands = cmd.1 outfit a file ~/.h1/x.json = files/x.json outfit a file ~/.h1/y.json = files/y.json outfit a include = b c outfit a instructions = i/a.md outfit a only = h1 outfit a skills = one t*o outfit a slot hook/Stop = files/stop.sh outfit a slot statusline = files/s.sh outfit b outfit b include = c outfit c wear enterprise wear enterprise outfits = a wear personal github.com/o/n wear personal github.com/o/n outfits = a wear personal github.com/o/n machine=m1 wear personal github.com/o/n machine=m1 outfits = c wear shared github.com/o/n wear shared github.com/o/n outfits = b wear shared github.com/o/n publish = yes wear user wear user outfits = a b wear user machine=m1 wear user machine=m1 outfits = c need h1 n1 need h1 n1 done = ~/.h1/settings.json exists need h1 n1 prompt = needs/n1.md need h2 n2 need h2 n2 done = ~/f contains "a b" upstream u1 upstream u1 into = vendor/u1 upstream u1 path = skills upstream u1 pin = abc123 upstream u1 trust = auto upstream u1 url = https://example.com/u1