Skip to content

Schema

Every function a build can call, and every column of every data file, is published as machine-readable JSON. The files are generated from the Harnice code, so they always match it. This site describes ideas. The schema is the exact list of calls and columns.

The schema lives in the command-line repository, harnice-cli, in src/harnice/schema/. That folder is the source of truth for people and for AI models.

Which version

  • The newest release is on the main branch of harnice-cli. That branch only moves when a release is published.
  • Each release keeps its own copy at https://raw.githubusercontent.com/harnice/harnice-cli/<tag>/src/harnice/schema/. Each file there has a version field naming that release and an $id with that same address.
  • Your install has the copy that matches it. harnice --schema prints the folder.

What is published

File What it holds
index.json Every file below, with a title and description. Start here.
api/<module>.json The public functions a build.py calls as <module>.<function>(...): summary, parameters with type, default and description, return value, and errors. One file per module, for example api/instances.json.
data/<list>.schema.json The columns of one data file, for example data/instances.schema.json and data/signals_list.schema.json.
project_layout.json The files in a revision folder for each project type, with the key you pass to fileio.path() or fileio.dirpath().

Function parameters and data files use JSON Schema (draft 2020-12), so editors, validators, and AI models read them without anything Harnice-specific. Data files allow extra columns.

harnice mcp serves the installed copy to an AI app. See Building with AI.

What is public

A function in the schema is public: a build may call it, and a change to it is listed in the build API change log in the skills. Anything else in the Harnice source is internal and may change without notice.