Layer declaration schema
The zod definition of <name>.json — what a layer may declare about itself — and the published JSON Schema generated from it.
Skills it satisfies
A skill states the capability; this Tool is one way to exercise it. Each skill’s declared input and output contract follows, where it has one.
kg-export
Serialize a layer’s knowledge graph to one JSON document, for publication and inspection. Read when asked to visualize, audit or share the KG, before adding a node type to the export, and before minting or authoring any subject IRI — subjects are <doc dir>/<kind>/<id>, never #fragments.
Source: cat-harness/skills/kg/kg-core/kg-export.md.
Also satisfied by: ci-publish-context, content-context, context-prefixes, kg-graph-export, ns-vocabulary, pages-publish, slice-sqlite, tool-schema, tool-types-schema.
The skill declares no I/O contract (schemas/skills/kg-export/{input,output}.schema.json).
Inputs and outputs
Each port names a shared type by IRI, so two Tools for one skill can be checked for interchangeability.
| port | type | required | description | constraint | |
|---|---|---|---|---|---|
| in | baseUrl | Url | Publication base; a preview passes its own. | string · format uri · An absolute http(s) URL | |
| out | schema | RepoPath | The written JSON Schema. | string · pattern ^[A-Za-z0-9._][A-Za-z0-9._/-]*$ · A path relative to the repository root. No .. segments. |
Processes and tasks
Steps this Tool can carry out, because each names a skill it satisfies:
| process | step | lane | via skill |
|---|---|---|---|
| KG to public portal | Serialize to JSON-LD | Build pipeline | kg-export |
| Build and publish a per-slice SQLite file | Write the slice definition | Platform authoring agent | kg-export |
| Build and publish a per-slice SQLite file | Build it locally and measure the file | Platform authoring agent | kg-export |
| Build and publish a per-slice SQLite file | Report the measurement; ship nothing | Platform authoring agent | kg-export |
| Build and publish a per-slice SQLite file | Wire it: gate, deploy line, search, tests | Platform authoring agent | kg-export |
| Build and publish a per-slice SQLite file | Gate every slice: slice:sqlite:check | CI/CD Pipeline | kg-export |
| Build and publish a per-slice SQLite file | Build each slice into _site at deploy | CI/CD Pipeline | kg-export |
How it is deployed and reached
- Command line. From the repository root:
bun run cat kg:schema.cat kg:schemarunsbun run cat-harness-tools/scripts/harness-schema-export.ts(declared incat-harness-tools/package.json). - GitHub Actions. 2 workflow line(s) run its command:
| workflow | line | |
|---|---|---|
.github/workflows/docs-site.yml | 727 | bun run cat-harness-tools/scripts/harness-schema-export.ts --out-dir ./_site |
.github/workflows/feature-staging.yml | 1693 | bun run cat-harness-tools/scripts/harness-schema-export.ts --base-url "$BASE" --out-dir ./_site |
As an API: its operation in the OpenAPI document and the MCP tool list of its layer.
| install | none |
What it is made of
| role | file | |
|---|---|---|
| definition | cat-harness/tools/cat-harness-schema/cat-harness-schema.json | |
| script | cat-harness-tools/scripts/harness-schema-export.ts | |
| maintained source | cat-harness/schemas/kg/cat-harness.ts | not in this checkout |
It is authoritative for:
| artefact | from |
|---|---|
cat-harness/cat-harness.schema.json | schemas/kg/cat-harness.ts |
Linked data
The Tool is published as its own JSON-LD document at its IRI, https://litlfred.github.io/folio-assistant/cat-harness/tools/cat-harness-schema.jsonld, partOf its layer’s document. The node below is the definition this page was drawn from, and is embedded in the page as application/ld+json.
{
"@context": "https://litlfred.github.io/folio-assistant/cat-harness/cat-harness.context.jsonld",
"@id": "https://litlfred.github.io/folio-assistant/cat-harness/tools/cat-harness-schema.jsonld",
"@type": "https://litlfred.github.io/cat-harness/v0/ns/Tool",
"partOf": "https://litlfred.github.io/folio-assistant/cat-harness/cat-harness.jsonld",
"name": "cat-harness-schema",
"title": "Layer declaration schema",
"description": "The zod definition of `<name>.json` — what a layer may declare about itself — and the published JSON Schema generated from it.",
"install": {
"none": true
},
"invoke": {
"shell": "bun run cat kg:schema"
},
"io": {
"inputs": [
{
"name": "baseUrl",
"schema": "https://litlfred.github.io/folio-assistant/cat-harness/tool-types.schema.json#/$defs/Url",
"description": "Publication base; a preview passes its own.",
"required": false,
"arg": {
"flag": "--base-url"
}
}
],
"outputs": [
{
"name": "schema",
"schema": "https://litlfred.github.io/folio-assistant/cat-harness/tool-types.schema.json#/$defs/RepoPath",
"description": "The written JSON Schema."
}
]
},
"satisfies": [
"kg-export"
],
"maintains": [
{
"source": "schemas/kg/cat-harness.ts",
"artefact": "cat-harness/cat-harness.schema.json",
"format": "json-schema"
}
]
}