Snapshot a published IG’s terminology at its pinned version
Read every CodeSystem concept out of a FHIR IG clone checked out at its pinned tag and write a folio-pinned-terminology/v1 snapshot: the offline, version-fixed answer check:term-mapping resolves its fhir target against. Which IG, which pin record and which snapshot path are the caller’s (--pin, --out, --source); this layer names none.
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.
vocabulary-authority
One vocabulary is authoritative for one kind of fact, and every other is a derived rendering reached by a declared mapping. Which vocabulary owns what here, the pros and cons behind each ruling, how DC and SKOS overlap and what stops them drifting, and the normalisation-first rule for any modelling or mapping exercise.
Source: cat-harness/skills/kg/kg-core/vocabulary-authority.md.
Also satisfied by: pin-spdx-license-list, vocab-map.
The skill declares no I/O contract (schemas/skills/vocabulary-authority/{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 | from | FilesystemPath | yes | A clone of the IG checked out at the PINNED tag, passed as --from. The script refuses unless that clone’s sushi-config.yaml version equals the pin’s, so a newer clone cannot silently become the snapshot. | string · A filesystem path, possibly outside the repository. Not admissible as a command-line argument. |
| out | snapshot | RepoPath | The --out path, folio-pinned-terminology/v1: the version, the source, and every system#code with its display, sorted. | string · pattern ^[A-Za-z0-9._][A-Za-z0-9._/-]*$ · A path relative to the repository root. No .. segments. |
Processes and tasks
No process step names a skill this Tool satisfies.
How it is deployed and reached
- Command line. From the repository root:
bun run fhir-harness/scripts/pin-ig-terminology.ts --from <clone> --pin <pin record> --out <snapshot> --source <repository URL>. - 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, git |
| network | no |
| when to choose it | |
|---|---|
| when | The authority a term is checked against must be a fixed artefact a reader can name and re-fetch — a published IG at a version. Also the only option where the vocabulary’s host is unreachable. |
| limits | The version comes from the --pin record and NEVER from this script, so refreshing means moving the pin first and re-running; re-running against a newer clone is refused rather than silently accepted. It answers only for what the IG publishes at that version — a code added after it, or curated in a collection rather than published, is absent, and check:term-mapping reports that as unmapped (a checked miss) and not as undetermined. Nothing here dereferences a code system IRI. |
| cost | One shallow clone at the tag (~120 KB of FSH at v1.0.0) and a few seconds. The snapshot is committed, so no run at check time. |
What it is made of
| role | file | |
|---|---|---|
| definition | fhir-harness/tools/pin-ig-terminology/pin-ig-terminology.ts | |
| script | fhir-harness/scripts/pin-ig-terminology.ts |
Linked data
The Tool is published as its own JSON-LD document at its IRI, https://litlfred.github.io/folio-assistant/fhir-harness/tools/pin-ig-terminology.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/fhir-harness/fhir-harness.context.jsonld",
"@id": "https://litlfred.github.io/folio-assistant/fhir-harness/tools/pin-ig-terminology.jsonld",
"@type": "https://litlfred.github.io/cat-harness/v0/ns/Tool",
"partOf": "https://litlfred.github.io/folio-assistant/fhir-harness/fhir-harness.jsonld",
"name": "pin-ig-terminology",
"title": "Snapshot a published IG's terminology at its pinned version",
"description": "Read every CodeSystem concept out of a FHIR IG clone checked out at its pinned tag and write a `folio-pinned-terminology/v1` snapshot: the offline, version-fixed answer `check:term-mapping` resolves its `fhir` target against. Which IG, which pin record and which snapshot path are the caller's (`--pin`, `--out`, `--source`); this layer names none.",
"install": {
"none": true
},
"invoke": {
"shell": "bun run fhir-harness/scripts/pin-ig-terminology.ts --from <clone> --pin <pin record> --out <snapshot> --source <repository URL>"
},
"io": {
"inputs": [
{
"name": "from",
"schema": "https://litlfred.github.io/folio-assistant/cat-harness/tool-types.schema.json#/$defs/FilesystemPath",
"description": "A clone of the IG checked out at the PINNED tag, passed as `--from`. The script refuses unless that clone's `sushi-config.yaml` version equals the pin's, so a newer clone cannot silently become the snapshot.",
"required": true
}
],
"outputs": [
{
"name": "snapshot",
"schema": "https://litlfred.github.io/folio-assistant/cat-harness/tool-types.schema.json#/$defs/RepoPath",
"description": "The `--out` path, `folio-pinned-terminology/v1`: the version, the source, and every `system#code` with its display, sorted."
}
]
},
"satisfies": [
"vocabulary-authority"
],
"requirements": {
"runtime": [
"bun",
"git"
],
"network": false
},
"selection": {
"when": "The authority a term is checked against must be a fixed artefact a reader can name and re-fetch — a published IG at a version. Also the only option where the vocabulary's host is unreachable.",
"limits": "The version comes from the `--pin` record and NEVER from this script, so refreshing means moving the pin first and re-running; re-running against a newer clone is refused rather than silently accepted. It answers only for what the IG publishes at that version — a code added after it, or curated in a collection rather than published, is absent, and `check:term-mapping` reports that as `unmapped` (a checked miss) and not as `undetermined`. Nothing here dereferences a code system IRI.",
"cost": "One shallow clone at the tag (~120 KB of FSH at v1.0.0) and a few seconds. The snapshot is committed, so no run at check time."
}
}