Glossary candidates from a source

Read a source’s glossary and abbreviations sections (an L1 entry’s sections/, or a folio block) into candidate terms of a folio-glossary/v1 scheme, verbatim, each with source: <file>#L<line>. Acronyms fold into the term they expand as notation. The scheme is merged: terms a person owns are never changed. --check writes nothing and fails when the scheme would change.

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.

glossary-terms

Add terms to a layer’s glossary: local SKOS terms (folio-glossary/v1) with a definition, a code and links to external SKOS concepts, and references to whole external schemes. Rendered on the glossary/ page; gated by check:glossary. Authored terms go to gettext (.pot) for translation; a paper’s glossary is one more scheme.

Source: folio-assistant-core/skills/library/cataloguing/glossary-terms.md.

Also satisfied by: c-value-terms.

The skill declares no I/O contract (schemas/skills/glossary-terms/{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
inoutRepoPathyesThe scheme file to write or merge into: glossary/<scheme>.glossary.json.string · pattern ^[A-Za-z0-9._][A-Za-z0-9._/-]*$ · A path relative to the repository root. No .. segments.
inidSlugThe scheme id, for a new file.string · pattern ^[a-z0-9][a-z0-9-]*$ · A folio slug, e.g. quantum-observable-universe
intitleTextThe scheme title, for a new file: free text, so it goes on stdin.string · A short single-line human string. Not admissible as a command-line argument.
infromRepoPathA directory whose glossary and abbreviations sections are read: an L1 entry’s sections/.string · pattern ^[A-Za-z0-9._][A-Za-z0-9._/-]*$ · A path relative to the repository root. No .. segments.
intermsRepoPathA Markdown file read as term and definition rows.string · pattern ^[A-Za-z0-9._][A-Za-z0-9._/-]*$ · A path relative to the repository root. No .. segments.
inabbreviationsRepoPathA Markdown file read as acronym and expansion rows.string · pattern ^[A-Za-z0-9._][A-Za-z0-9._/-]*$ · A path relative to the repository root. No .. segments.
incheckFlagFail if the scheme is stale, instead of writing.boolean · A boolean switch — projects to a bare flag, with no value word
outschemeRepoPathThe merged folio-glossary/v1 scheme.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
Ingestion subprocess — build the L1 knowledge graphRead glossary into candidate termsIngestion Engine (agent, runs unattended)glossary-terms
Classify and code contentRun reuse-first lookup and record candidatesAuthoring agentglossary-terms
Classify and code contentAdjudicate slot codings and glossary candidatesTerminologist / ontologist reviewer (person)glossary-terms

How it is deployed and reached

  • Command line. From the repository root: bun run cat glossary:from-source. cat glossary:from-source runs bun run folio-assistant-core/scripts/glossary-from-source.ts (declared in folio-assistant-core/package.json).
  • GitHub Actions. No workflow in this checkout runs its command.

As an API: its operation in the OpenAPI document and the MCP tool list of its layer.

installnone
runtimebun
networkno

What it is made of

Linked data

The Tool is published as its own JSON-LD document at its IRI, https://litlfred.github.io/folio-assistant/folio-assistant-core/tools/glossary-from-source.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/folio-assistant-core/folio-assistant-core.context.jsonld",
  "@id": "https://litlfred.github.io/folio-assistant/folio-assistant-core/tools/glossary-from-source.jsonld",
  "@type": "https://litlfred.github.io/cat-harness/v0/ns/Tool",
  "partOf": "https://litlfred.github.io/folio-assistant/folio-assistant-core/folio-assistant-core.jsonld",
  "name": "glossary-from-source",
  "title": "Glossary candidates from a source",
  "description": "Read a source's glossary and abbreviations sections (an L1 entry's sections/, or a folio block) into `candidate` terms of a folio-glossary/v1 scheme, verbatim, each with `source: <file>#L<line>`. Acronyms fold into the term they expand as `notation`. The scheme is merged: terms a person owns are never changed. `--check` writes nothing and fails when the scheme would change.",
  "install": {
    "none": true
  },
  "invoke": {
    "shell": "bun run cat glossary:from-source"
  },
  "io": {
    "inputs": [
      {
        "name": "out",
        "schema": "https://litlfred.github.io/folio-assistant/cat-harness/tool-types.schema.json#/$defs/RepoPath",
        "description": "The scheme file to write or merge into: `glossary/<scheme>.glossary.json`.",
        "required": true,
        "arg": {
          "flag": "--out"
        }
      },
      {
        "name": "id",
        "schema": "https://litlfred.github.io/folio-assistant/cat-harness/tool-types.schema.json#/$defs/Slug",
        "description": "The scheme id, for a new file.",
        "required": false,
        "arg": {
          "flag": "--id"
        }
      },
      {
        "name": "title",
        "schema": "https://litlfred.github.io/folio-assistant/cat-harness/tool-types.schema.json#/$defs/Text",
        "description": "The scheme title, for a new file: free text, so it goes on stdin.",
        "required": false,
        "arg": {
          "stdin": true
        }
      },
      {
        "name": "from",
        "schema": "https://litlfred.github.io/folio-assistant/cat-harness/tool-types.schema.json#/$defs/RepoPath",
        "description": "A directory whose glossary and abbreviations sections are read: an L1 entry's `sections/`.",
        "required": false,
        "arg": {
          "flag": "--from"
        }
      },
      {
        "name": "terms",
        "schema": "https://litlfred.github.io/folio-assistant/cat-harness/tool-types.schema.json#/$defs/RepoPath",
        "description": "A Markdown file read as term and definition rows.",
        "required": false,
        "arg": {
          "flag": "--terms"
        }
      },
      {
        "name": "abbreviations",
        "schema": "https://litlfred.github.io/folio-assistant/cat-harness/tool-types.schema.json#/$defs/RepoPath",
        "description": "A Markdown file read as acronym and expansion rows.",
        "required": false,
        "arg": {
          "flag": "--abbreviations"
        }
      },
      {
        "name": "check",
        "schema": "https://litlfred.github.io/folio-assistant/cat-harness/tool-types.schema.json#/$defs/Flag",
        "description": "Fail if the scheme is stale, instead of writing.",
        "required": false,
        "arg": {
          "flag": "--check"
        }
      }
    ],
    "outputs": [
      {
        "name": "scheme",
        "schema": "https://litlfred.github.io/folio-assistant/cat-harness/tool-types.schema.json#/$defs/RepoPath",
        "description": "The merged folio-glossary/v1 scheme."
      }
    ]
  },
  "satisfies": [
    "glossary-terms"
  ],
  "requirements": {
    "runtime": [
      "bun"
    ],
    "network": false
  }
}

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