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.
| port | type | required | description | constraint | |
|---|---|---|---|---|---|
| in | out | RepoPath | yes | The 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. |
| in | id | Slug | The scheme id, for a new file. | string · pattern ^[a-z0-9][a-z0-9-]*$ · A folio slug, e.g. quantum-observable-universe | |
| in | title | Text | The 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. | |
| in | from | RepoPath | A 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. | |
| in | terms | RepoPath | A 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. | |
| in | abbreviations | RepoPath | A 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. | |
| in | check | Flag | Fail if the scheme is stale, instead of writing. | boolean · A boolean switch — projects to a bare flag, with no value word | |
| out | scheme | RepoPath | The 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:
| process | step | lane | via skill |
|---|---|---|---|
| Ingestion subprocess — build the L1 knowledge graph | Read glossary into candidate terms | Ingestion Engine (agent, runs unattended) | glossary-terms |
| Classify and code content | Run reuse-first lookup and record candidates | Authoring agent | glossary-terms |
| Classify and code content | Adjudicate slot codings and glossary candidates | Terminologist / 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-sourcerunsbun run folio-assistant-core/scripts/glossary-from-source.ts(declared infolio-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.
| install | none |
| runtime | bun |
| network | no |
What it is made of
| role | file | |
|---|---|---|
| definition | folio-assistant-core/tools/glossary-from-source/glossary-from-source.ts | |
| script | folio-assistant-core/scripts/glossary-from-source.ts |
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
}
}