Reference validator for the Open Coaching Format. Checks an OCF document against the JSON Schema and the semantic rules the schema cannot express (ball-possession consistency, branch-target integrity, reference integrity), serving both authoring tools (LLM / editor) and the rendering gate.
packages/ts— TypeScript library +ocf-validateCLI (reference impl).packages/py— Python mirror (same conformance suite).shared/— language-neutral contract: model schema, error-code registry, named-position catalog, conformance fixtures.
npm install @opencoachingformat/validator
npx ocf-validate path/to/play.ocf.jsonimport { validate } from "@opencoachingformat/validator";
const result = validate(doc);
if (!result.valid) console.error(result.errors);Building from source instead (this repo, not the published package):
cd packages/ts && npm install && npm run build
node dist/cli.js path/to/play.ocf.jsonSee the design doc for the full rule set and result format.