Skip to content

About

The files every CheerLights library and app test against: the palette and the sentences that name a color.

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Repository files navigation

CheerLights spec

The files every CheerLights library and app test against, so that a color reads the same in every language, and the facts that agent resources are built from.

CheerLights is a network of lights around the world that all show the same color, and anyone can set it. Its libraries for Rust, Python, MATLAB, and JavaScript, the CheerLights app, and the Bluesky bridge each keep a copy of these files in their tests and check that copy against this repository. cheerlights.com/llms.txt, the CheerLights skill for coding agents, and the guides the hosted MCP server returns are generated here too. A change here is a change to all of them.

The files

The sentence rule

A sentence names a palette color when the color's name appears as a whole word, in any case. "Old lace" may be written with spaces or hyphens between the words, or none. A letter, digit, or underscore next to a name joins it to the word; hyphens, #, punctuation, emoji, and separate accent marks do not. What counts as a letter follows Python's re module with Unicode 16.0 (Python 3.14), because the reference rule is a Python regular expression. The sentence rule guide has the details and an algorithm for other languages.

Agent resources

Generated from cheerlights.json, colors.json, and the Markdown in agents/ by uv run tools/agent_resources.py:

The skill is a Claude Code plugin that also connects the hosted MCP server:

/plugin install cheerlights --marketplace cheerlights/cheerlights-spec

Other agents can copy plugins/cheerlights/skills/cheerlights/ into their skills folder.

Use it

Copy the files into a library's tests, read them there, and add a CI step that fails when the copy differs from this repository:

curl -fsS https://raw.githubusercontent.com/cheerlights/cheerlights-spec/main/colors.json | cmp - tests/data/colors.json

Change it

  1. Change the file: a fact in cheerlights.json, a guide in agents/guides/, or the rule in tools/message_vectors.py.
  2. Regenerate what depends on it: uv run tools/message_vectors.py for the rule, uv run tools/agent_resources.py for anything agents read.
  3. Commit the generated files with the change. CI runs every generator with --check and fails when an output is stale.
  4. Upload agents/llms.txt and agents/llms-full.txt to cheerlights.com, and update every library and the app in the same week, so none of them falls behind.

Every Monday, tools/freshness.py checks that the versions in cheerlights.json match each registry, every link answers, the copies on cheerlights.com match agents/, the MCP server lists the tools and guides named here and passes the 20 shared vectors, and ThingSpeak and every MQTT topic give a palette color.

License

MIT, see LICENSE.

About

The files every CheerLights library and app test against: the palette and the sentences that name a color.

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages