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.

porttyperequireddescriptionconstraint
inbaseUrlUrlPublication base; a preview passes its own.string · format uri · An absolute http(s) URL
outschemaRepoPathThe 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:

processsteplanevia skill
KG to public portalSerialize to JSON-LDBuild pipelinekg-export
Build and publish a per-slice SQLite fileWrite the slice definitionPlatform authoring agentkg-export
Build and publish a per-slice SQLite fileBuild it locally and measure the filePlatform authoring agentkg-export
Build and publish a per-slice SQLite fileReport the measurement; ship nothingPlatform authoring agentkg-export
Build and publish a per-slice SQLite fileWire it: gate, deploy line, search, testsPlatform authoring agentkg-export
Build and publish a per-slice SQLite fileGate every slice: slice:sqlite:checkCI/CD Pipelinekg-export
Build and publish a per-slice SQLite fileBuild each slice into _site at deployCI/CD Pipelinekg-export

How it is deployed and reached

  • Command line. From the repository root: bun run cat kg:schema. cat kg:schema runs bun run cat-harness-tools/scripts/harness-schema-export.ts (declared in cat-harness-tools/package.json).
  • GitHub Actions. 2 workflow line(s) run its command:
workflowline
.github/workflows/docs-site.yml727bun run cat-harness-tools/scripts/harness-schema-export.ts --out-dir ./_site
.github/workflows/feature-staging.yml1693bun 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.

installnone

What it is made of

It is authoritative for:

artefactfrom
cat-harness/cat-harness.schema.jsonschemas/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"
    }
  ]
}

folio-assistant — code under the Apache License 2.0, documentation under CC BY 3.0. Generated schema and API references are rebuilt from source on every push to main.

deployed dev