app-api-compatibility
Skill83 starsChanged 11 days agoMITView on GitHub
Keep every supported Headroom for Mac release working with every supported server. Use before changing the Mac app API (`packages/view-model/src/app-feed.ts`, `apps/server/src/routes/app.ts`, `scripts/app-contract.ts`), Mac code that reads a server, the minimum server version, or the oldest supported Mac release.
In this repository6 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- pr-ciSkill
- provider-connectorSkill
- pr-showcaseSkill
- verify-webSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 2 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 17
Add fields and endpoints. Keep every field a released Mac requires, at its type and as always sent.
- Very specific: line 20
Run mise run mac:contract and commit apps/macos/Contract/openapi.json.
- Distinctive: line 24
Read a new field as optional, and leave the feature out when it is absent.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
App API compatibility
A server and a Mac app ship separately, so any pairing of a supported server and a supported Mac release must work. The rules hold in two directions:
- Old Macs, new server. Each
macos-vX.Y.Ztag holds the contract that release decodes with.mise run mac:compatchecks today's server against every tagged release fromoldestSupportedMacinapps/macos/Contract/compatibility.jsononward. - New Mac, old server.
ServerCompatibility.minimumServerin HeadroomKit names the oldest server this build reads.Tests/HeadroomKitTests/Fixtures/Servers/<minimum>.jsonis that server's feed, frozen.
The app never refuses a server by its version number. A server built from main reports the last release while it already has newer endpoints. The app decides from what the server answers and uses versions only in messages: a missing endpoint or a missing field asks for a server update, and a value or type it does not know asks for an app update. The decision record is D47.
Server change: keep /api/app/v1 additive
- Add fields and endpoints. Keep every field a released Mac requires, at its type and as always sent. Keep every request a released Mac makes accepted.
- For a field whose values grow with the server, such as providers, list it in
openEnumFieldsinscripts/app-contract.ts. Then the app decodes it as a plain string and shows an unknown value plainly. Values added to a closed enum break each Mac release that knows the old list. The check flags them. - For a change that cannot be additive, add
/api/app/v2beside v1. Keep v1 untiloldestSupportedMacpasses every release that reads it. - Run
mise run mac:contractand commitapps/macos/Contract/openapi.json.
Mac change: read what the minimum server sends
- Read a new field as optional, and leave the feature out when it is absent. Treat a 404 from a new endpoint the same way. The rest of the source keeps reading.
- When a feature cannot work without the new field or endpoint, raise
ServerCompatibility.minimumServerto the first server release that has it. That server release ships first. Replace the frozen feed inFixtures/Servers/with one from that release. A feed regenerated from today's server would hide a broken older one. - Say "Needs server X.Y.Z or later" in the Mac release notes when the minimum rises.
Dropping old Macs
Raise oldestSupportedMac in apps/macos/Contract/compatibility.json only when the owner agrees to stop supporting those releases.
Done when
mise run checkpasses. It includesmac:contract:checkandmac:compat.mise run mac:testpasses, including the frozen feed test.- The minimum server and the oldest supported Mac match in three places:
ServerCompatibility,compatibility.json, and the tables in the Mac app architecture and the install guide.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

