fitness-functions

Installation
SKILL.md

EventCatalog Fitness Functions

Fitness functions are architecture rules written as code. Each one is a TypeScript file that reads the catalog through a read-only SDK and returns the violations it finds. eventcatalog fitness check runs them all, prints the results, writes a JSON report and exits non-zero when a rule fails, so the rules can gate pull requests.

The team decides what a healthy architecture looks like; EventCatalog runs the rules and reports the results.

Fitness functions check the architecture the catalog documents, not the running systems. A rule is only as good as the catalog data it reads.

Requirements (check these FIRST)

  1. Version — @eventcatalog/core 5.3.0 or later (check the catalog's package.json). Alternatively @eventcatalog/cli 1.4.0 or later runs the same check without core (npx @eventcatalog/cli fitness check). Node.js 20 or later.
  2. Editor types (optional) — fitness functions run without installing anything else, but for types and autocomplete install @eventcatalog/fitness as a dev dependency. Catalogs created with create-eventcatalog 4.5.0 or later already have it, plus two starter functions in fitness/ and an npm run fitness script.

Fitness function, linter or governance?

Pick the right tool before writing code:

Installs
85
GitHub Stars
16
First Seen
Oct 19, 2026