FSH dependency cone
Compute the dependency cone over an IG’s FSH graph, and the blast radius of a set of changed files. It is what lets an incremental IG build rebuild less than everything.
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.
fhir-validation
Source: fhir-harness/skills/content/fhir-ig-authoring/fhir-validation.md.
Also satisfied by: check-translation-supplements.
input — fhir-harness/schemas/skills/fhir-validation/input.schema.json
| field | type | required | description |
|---|---|---|---|
igRoot | string | yes | Path to the IG repository root. |
validationLevel | sushi-only \| publisher-qa \| full | Level of validation to perform. | |
targetProfiles | string[] | Specific CRMI profiles to validate against (Shareable, Publishable, Computable, Executable). |
output — fhir-harness/schemas/skills/fhir-validation/output.schema.json
| field | type | required | description |
|---|---|---|---|
overallStatus | pass \| warnings \| errors | yes | |
sushiResult | object | ||
publisherResult | object | ||
conformanceResults | object[] |
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 | igRoot | RepoPath | yes | The IG root holding the FSH sources. Absent, the command exits 2 with its usage — could-not-determine, not an empty cone. | string · pattern ^[A-Za-z0-9._][A-Za-z0-9._/-]*$ · A path relative to the repository root. No .. segments. |
| in | csv | RepoPath | Write the report as CSV to this path instead of printing it. | string · pattern ^[A-Za-z0-9._][A-Za-z0-9._/-]*$ · A path relative to the repository root. No .. segments. | |
| in | top | Count | Show only the N largest cones; 0 shows none. | integer · A non-negative count — how many of something, or how many to show. Zero is a real answer. | |
| in | history | Count | Report the blast radius over the last N commits instead of a static cone. | integer · A non-negative count — how many of something, or how many to show. Zero is a real answer. | |
| in | fileUsers | RepoPath | Also write fsh-file-users/v1: for each FSH file, the files that use what it declares. The IG AST’s incremental plan reads it (AstPlanCli -fsh-users) so a changed RuleSet- or Alias-only file reaches its users rather than forcing a full build. | string · pattern ^[A-Za-z0-9._][A-Za-z0-9._/-]*$ · A path relative to the repository root. No .. segments. | |
| out | cone | Text | The cone, or the impact of --changed. With --csv it goes to that path instead. | string · A short single-line human string. Not admissible as a command-line argument. |
Processes and tasks
Steps this Tool can carry out, because each names a skill it satisfies:
| process | step | lane | via skill |
|---|---|---|---|
| Incremental IG build | Validate the cone (fhir_validate) | Publisher + validator services (JVM) | fhir-validation |
| L3 FHIR IG pipeline | Validate against profiles | Build pipeline — SUSHI · validator · IG Publisher | fhir-validation |
How it is deployed and reached
- Command line. From the repository root:
bun run fhir-harness/scripts/fsh-cone.ts. - 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 | fhir-harness/tools/fsh-cone/fsh-cone.ts | |
| script | fhir-harness/scripts/fsh-cone.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/fsh-cone.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/fsh-cone.jsonld",
"@type": "https://litlfred.github.io/cat-harness/v0/ns/Tool",
"partOf": "https://litlfred.github.io/folio-assistant/fhir-harness/fhir-harness.jsonld",
"name": "fsh-cone",
"title": "FSH dependency cone",
"description": "Compute the dependency cone over an IG's FSH graph, and the blast radius of a set of changed files. It is what lets an incremental IG build rebuild less than everything.",
"install": {
"none": true
},
"invoke": {
"shell": "bun run fhir-harness/scripts/fsh-cone.ts"
},
"io": {
"inputs": [
{
"name": "igRoot",
"schema": "https://litlfred.github.io/folio-assistant/cat-harness/tool-types.schema.json#/$defs/RepoPath",
"description": "The IG root holding the FSH sources. Absent, the command exits 2 with its usage — could-not-determine, not an empty cone.",
"required": true,
"arg": {
"positional": 0
}
},
{
"name": "csv",
"schema": "https://litlfred.github.io/folio-assistant/cat-harness/tool-types.schema.json#/$defs/RepoPath",
"description": "Write the report as CSV to this path instead of printing it.",
"required": false,
"arg": {
"flag": "--csv"
}
},
{
"name": "top",
"schema": "https://litlfred.github.io/folio-assistant/cat-harness/tool-types.schema.json#/$defs/Count",
"description": "Show only the N largest cones; `0` shows none.",
"required": false,
"arg": {
"flag": "--top"
}
},
{
"name": "history",
"schema": "https://litlfred.github.io/folio-assistant/cat-harness/tool-types.schema.json#/$defs/Count",
"description": "Report the blast radius over the last N commits instead of a static cone.",
"required": false,
"arg": {
"flag": "--history"
}
},
{
"name": "fileUsers",
"schema": "https://litlfred.github.io/folio-assistant/cat-harness/tool-types.schema.json#/$defs/RepoPath",
"description": "Also write `fsh-file-users/v1`: for each FSH file, the files that use what it declares. The IG AST's incremental plan reads it (`AstPlanCli -fsh-users`) so a changed RuleSet- or Alias-only file reaches its users rather than forcing a full build.",
"required": false,
"arg": {
"flag": "--file-users"
}
}
],
"outputs": [
{
"name": "cone",
"schema": "https://litlfred.github.io/folio-assistant/cat-harness/tool-types.schema.json#/$defs/Text",
"description": "The cone, or the impact of `--changed`. With `--csv` it goes to that path instead."
}
]
},
"satisfies": [
"fhir-validation"
],
"requirements": {
"runtime": [
"bun"
],
"network": false
}
}