Ectropy open standard
JSON Schemas (draft-07) for construction project data: voxels and voxel groups, project decisions, inspections and participants, resource status and pose, jobsite material, equipment, robot and labour-time intake, logistic units, waste streams, carbon reports, and the payroll edge.
- Served: every schema at its
$idunderhttps://schemas.ectropy.ai/.index.jsonlists them. - Packaged:
npm install @ectropy/schemasinstalls the schemas and TypeScript types generated from them, published from this repository with npm provenance.
This repository is the only source of both.
Scope
Interchange shapes only: how a record is structured for storage and exchange. A schema is here only when it has been named public. Algorithms, scoring and routing logic are not in this repository.
Schemas
Identifiers. Records name themselves and each other with one URN form, defined once in _definitions/urn.schema.json: urn:luhtech:{issuer}:{type}:{id}.
Jobsite flow intake. Each intake profile narrows GS1 EPCIS 2.0. Every intake event must also validate against GS1's EPCIS 2.0.1 JSON Schema; the repository vendors that schema as a test fixture and does not republish it.
Using the package
import Ajv from 'ajv';
import addFormats from 'ajv-formats';
import { schemas, VoxelVoxelV3 } from '@ectropy/schemas';
const ajv = new Ajv({ strict: false });
addFormats(ajv);
Object.values(schemas).forEach((s) => ajv.addSchema(s));
const validate = ajv.getSchema('https://schemas.ectropy.ai/voxel/voxel-v3.schema.json')!;
const voxel: VoxelVoxelV3.VoxelSchema = JSON.parse(input);
if (!validate(voxel)) throw new Error(ajv.errorsText(validate.errors));
A single schema file is also importable: @ectropy/schemas/voxel/voxel-v3.schema.json.
Versioning
- Each schema carries a semver
version. - A change that can reject a previously valid instance, or that moves a schema's
$id, is breaking. It bumps that schema's major version (minor below 1.0.0) and the package's major version. - CHANGELOG.md records every release.
Changing the standard
npm run check is the gate, run in CI on every pull request and before every publish. It checks that:
- every file is in canonical form;
- every
$idequals its served URL; - no
$refleavesschemas.ectropy.ai; - every schema compiles;
- every example in
examples/validates; - public text describes shapes and fields only.
npm run build generates the types; npm run site stages what Pages serves.
A release is a tag v<version> matching package.json. The release workflow runs the gate, builds, and publishes with npm provenance through trusted publishing.