chadtmiller.com/knotless
git that lives in your Atmosphere account
The pages, the harness and the docs site are formatted by oxfmt
MergedThis adds oxfmt for web/, harness/ and docs-site/, with the settings in .oxfmtrc.json. It adds a format step to the web check, widens that check's paths, and adds just fmt and a lint step. It also adds a Claude Code PostToolUse hook that formats files after Edit, MultiEdit and Write.
I read the config, workflow, Justfile, hook and settings and found nothing that blocks the merge. I did not read the mechanical reformat of the other files. The format step runs oxfmt --check on the same three directories that just fmt formats, so the gate and the fixer agree. The widened paths cover the newly checked directories. The hook exits quietly when oxfmt is missing or fails, as the body says.
One small thing, not worth holding the pull: the comment above on: in web.yml now has a line over 100 columns ("docs site, the format's settings or this file. A pull changing none passes at once…"). I'd rewrap it.
The remaining risks are the ones the body already names: the experimental Svelte support, and shots, test and e2e showing whether the reformat moved anything. Those checks will catch them.
Carried forward: the change this pull makes at ff40888fe06c122141db3765f15f1a2ca16d4884 is the one reviewed at 49866ba30d326bc8264c176de7cc82ae62b5f9d1, so that review stands. What is new comes from its base.
8 passed, 2 skipped
What changes
A formatter for the JavaScript side. oxfmt 0.76 formats
web/,harness/anddocs-site/(Svelte, TypeScript, JavaScript, CSS, JSON), set in.oxfmtrc.json. Each keeps the style most of its code already had:web/tabs, semicolons and no trailing commas;harness/anddocs-site/two spaces, no semicolons and trailing commas. All use single quotes and 100 columns. Everything under those three is reformatted once here, so most of the diff is mechanical.A gate. The
webcheck runsoxfmt --checkfirst, and now also runs when a pull changesharness/,docs-site/or.oxfmtrc.json.just lintchecks it too.just fmtrunscargo fmtand oxfmt together.A Claude Code hook.
.claude/settings.jsonruns.claude/hooks/format.mjsafter each Edit or Write, formatting the file asjust fmtwould, so an agent's code is formatted before it is committed.Why
Rust's format was gated, but the web pages and the harness had no formatter, so their style drifted. oxfmt is a fast binary meant to give Prettier's output, and it formats
.sveltefiles, where Biome's support is still partial.Two styles rather than one because moving everything to a single style (spaces and semicolons were measured) would about double the diff, at about 46,000 changed lines rather than 22,000.
How it was checked
oxfmt --checkpasses after the reformat,harness/layers.mjsandharness/contrast.mjspass, andnode --checkpasses on every harness and docs site script..mjsfile and formatted it.theme.rsincludestokens.css,contrast.jsonandtheme.ts, andharness/pds.mjsis in the stored runs' key, so every test binary runs again), the docs site's build, e2e, andshots, which shows whether the reformat moved any page.Shortcomings
just fmt, then mergemainand take its own side of the formatting.ignorePatterns.web/node_modules, sojust fmtand the hook needjust setupfirst. The hook does nothing when oxfmt is not installed.docs-site/reference.mjschanged on a second run, sojust fmtmay occasionally need running twice.web/staticare left as they are.Review
A quick look. Start at
.oxfmtrc.json,.knotless/workflows/web.ymland.claude/hooks/format.mjs, and skim the reformatted files.🤖 Generated with Claude Code