This path is for the developer who has never installed an OCG package and wants to see a readiness report quickly.
The package names below are the intended public npm surfaces. The live site and
/demo runtime already run the release-candidate code; npm publishing happens after the final repo cleanup pass.Prerequisites once packages are public: Node 24 or newer and pnpm 10.x, npm 10.x, or yarn 4.x.
Install after public package publish
pnpm add @realworldcommerce/ocg-schema @realworldcommerce/known-business-validatorrecord.json
{
"schemaVersion": "3.0.0-draft",
"recordId": "kb_acme-llc_acme-flagship_a1b2c3d4",
"recordType": "known_business",
"lifecycleStatus": "draft",
"identity": { "displayName": "Acme LLC" },
"locations": [{ "id": "loc-1", "type": "service_area" }],
"categories": [{ "id": "cat-1", "taxonomy": "custom", "code": "general", "label": "General" }],
"services": [{ "id": "svc-1", "name": "Consulting" }],
"proof": [],
"metadata": {
"createdAt": "2026-05-25T00:00:00.000Z",
"updatedAt": "2026-05-25T00:00:00.000Z",
"source": "manual"
}
}validate.mjs
import { parseKnownBusinessRecord } from '@realworldcommerce/ocg-schema/zod';
import { normalizeKnownBusinessRecord } from '@realworldcommerce/ocg-schema/normalize';
import { validateKnownBusinessRecord } from '@realworldcommerce/known-business-validator/validation';
import { formatReport } from '@realworldcommerce/known-business-validator/formatters';
import { readFile } from 'node:fs/promises';
const raw = await readFile('./record.json', 'utf8');
const parsed = parseKnownBusinessRecord(JSON.parse(raw));
if (!parsed.ok) process.exit(1);
const normalized = normalizeKnownBusinessRecord(parsed.value);
if (!normalized.ok) process.exit(1);
const report = validateKnownBusinessRecord(normalized.value);
console.log(formatReport(report, 'text'));Run node validate.mjs. The output reports overall score, per-signal scores, lifecycle status, computed status, effective status, and sorted issues.
In-browser validator
This widget imports the OSS
@realworldcommerce/ocg-schema and @realworldcommerce/known-business-validator code directly from the release repo. Paste a record or load a fixture; parsing, normalization, scoring, formatting, and content hashing all run in your browser.0
Waiting for input
- Parse
- not_run
- Normalize
- not_run