dak.json + FSH tree → L2 DAK component graph
Extract the DAK component layer (L2) from a smart-base-shaped IG (smart-base/L2/schemas/extract-dak.ts, ported from WHO smart-kg tools/extract-dak.mjs): a dak node from dak.json, a persona node per ActorDefinition, a functional/non-functional-requirement node per requirement instance with its requirement-statements, the hasComponent/hasStatement edges, and the fulfilledBy edges that resolve each requirement’s actor = Canonical(...) against a persona’s instance id. Coverage is reported across all nine DAK components, including the empty ones, and files present with no component declaring them are listed. Distinct from the existing extract-dak tool (WHO’s spreadsheet extractor).
| Tool | kg-extract-dak |
| IRI | http://smart.who.int/base/tools/kg-extract-dak.jsonld |
| part of | http://smart.who.int/base/smart-base.jsonld |
| type | https://litlfred.github.io/cat-harness/v0/ns/Tool |
| declared by | smart-base |
| invoked | shell |
| qa | qa-reports |
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.
smart-base-tools
Source: smart-base/skills/content/authoring-who-smart-guidelines/smart-base-tools.md.
Also satisfied by: extract-dak, bpmn-graphviz-layout, bpmn-to-fsh, bpmn-validate, kg-extract-bpmn, kg-extract-citations, kg-extract-dmn, kg-extract-l3.
The skill declares no I/O contract (schemas/skills/smart-base-tools/{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 | dak | RepoPath | yes | The dak.json with the kit’s metadata (canonicalUrl, title, version). | string · pattern ^[A-Za-z0-9._][A-Za-z0-9._/-]*$ · A path relative to the repository root. No .. segments. |
| in | fsh | RepoPath | yes | The FSH instance tree (e.g. input/fsh). | string · pattern ^[A-Za-z0-9._][A-Za-z0-9._/-]*$ · A path relative to the repository root. No .. segments. |
| in | bpmnDir | RepoPath | A BPMN directory; its files are listed as business-process orphans when no component declares them. | string · pattern ^[A-Za-z0-9._][A-Za-z0-9._/-]*$ · A path relative to the repository root. No .. segments. | |
| in | dmnDir | RepoPath | A DMN directory; its files are listed as decision-logic orphans when no component declares them. | string · pattern ^[A-Za-z0-9._][A-Za-z0-9._/-]*$ · A path relative to the repository root. No .. segments. | |
| in | out | RepoPath | Where the graph document goes; stdout when absent. | string · pattern ^[A-Za-z0-9._][A-Za-z0-9._/-]*$ · A path relative to the repository root. No .. segments. | |
| out | graph | RepoPath | The L2 DAK component graph document, with coverage across all nine components on stderr. | 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 |
|---|---|---|---|
| SMART Guideline end to end | 3 · Choose L2 dependencies (WHO / jurisdiction DAKs) | Authoring agent | smart-base-tools |
| SMART Guideline end to end | 4 · Create / adapt L2 DAK assets | Authoring agent | smart-base-tools |
| SMART Guideline end to end | 5 · Choose L3 dependencies (WHO / jurisdiction IGs) | Authoring agent | smart-base-tools |
| SMART Guideline end to end | 6 · Produce L3 assets | Authoring agent | smart-base-tools |
How it is deployed and reached
- Command line. From the repository root:
npx --prefix smart-base/L1/schemas tsx smart-base/L2/schemas/extract-dak.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 |
| when to choose it | |
|---|---|
| when | A DAK’s component layer is to be read into the knowledge graph from dak.json and the committed FSH instances, with the gaps (components with no instance, files no component declares) made visible. |
| limits | Reads the FSH instance tree, not the DAK spreadsheets; it covers personas and requirements, the components the estate commits as instances. Kit membership is inferred from presence in the input tree, since dak.json declares no component arrays. The fulfilledBy join resolves by canonical reference and does not depend on a display title. |
| cost | Seconds, no network. |
What it is made of
| role | file | |
|---|---|---|
| script | smart-base/L2/schemas/extract-dak.ts |
Linked data
The Tool is published as its own JSON-LD document at its IRI, http://smart.who.int/base/tools/kg-extract-dak.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": "http://smart.who.int/base/smart-base.context.jsonld",
"@id": "http://smart.who.int/base/tools/kg-extract-dak.jsonld",
"@type": "https://litlfred.github.io/cat-harness/v0/ns/Tool",
"partOf": "http://smart.who.int/base/smart-base.jsonld",
"name": "kg-extract-dak",
"title": "dak.json + FSH tree → L2 DAK component graph",
"description": "Extract the DAK component layer (L2) from a smart-base-shaped IG (`smart-base/L2/schemas/extract-dak.ts`, ported from WHO smart-kg `tools/extract-dak.mjs`): a `dak` node from dak.json, a `persona` node per ActorDefinition, a `functional`/`non-functional-requirement` node per requirement instance with its `requirement-statement`s, the `hasComponent`/`hasStatement` edges, and the `fulfilledBy` edges that resolve each requirement's `actor = Canonical(...)` against a persona's instance id. Coverage is reported across all nine DAK components, including the empty ones, and files present with no component declaring them are listed. Distinct from the existing `extract-dak` tool (WHO's spreadsheet extractor).",
"install": {
"none": true
},
"invoke": {
"shell": "npx --prefix smart-base/L1/schemas tsx smart-base/L2/schemas/extract-dak.ts"
},
"io": {
"inputs": [
{
"name": "dak",
"schema": "https://litlfred.github.io/folio-assistant/cat-harness/tool-types.schema.json#/$defs/RepoPath",
"description": "The dak.json with the kit's metadata (canonicalUrl, title, version).",
"required": true,
"arg": {
"flag": "--dak"
}
},
{
"name": "fsh",
"schema": "https://litlfred.github.io/folio-assistant/cat-harness/tool-types.schema.json#/$defs/RepoPath",
"description": "The FSH instance tree (e.g. `input/fsh`).",
"required": true,
"arg": {
"flag": "--fsh"
}
},
{
"name": "bpmnDir",
"schema": "https://litlfred.github.io/folio-assistant/cat-harness/tool-types.schema.json#/$defs/RepoPath",
"description": "A BPMN directory; its files are listed as business-process orphans when no component declares them.",
"required": false,
"arg": {
"flag": "--bpmn-dir"
}
},
{
"name": "dmnDir",
"schema": "https://litlfred.github.io/folio-assistant/cat-harness/tool-types.schema.json#/$defs/RepoPath",
"description": "A DMN directory; its files are listed as decision-logic orphans when no component declares them.",
"required": false,
"arg": {
"flag": "--dmn-dir"
}
},
{
"name": "out",
"schema": "https://litlfred.github.io/folio-assistant/cat-harness/tool-types.schema.json#/$defs/RepoPath",
"description": "Where the graph document goes; stdout when absent.",
"required": false,
"arg": {
"flag": "--out"
}
}
],
"outputs": [
{
"name": "graph",
"schema": "https://litlfred.github.io/folio-assistant/cat-harness/tool-types.schema.json#/$defs/RepoPath",
"description": "The L2 DAK component graph document, with coverage across all nine components on stderr."
}
]
},
"satisfies": [
"smart-base-tools"
],
"selection": {
"when": "A DAK's component layer is to be read into the knowledge graph from dak.json and the committed FSH instances, with the gaps (components with no instance, files no component declares) made visible.",
"limits": "Reads the FSH instance tree, not the DAK spreadsheets; it covers personas and requirements, the components the estate commits as instances. Kit membership is inferred from presence in the input tree, since dak.json declares no component arrays. The `fulfilledBy` join resolves by canonical reference and does not depend on a display title.",
"cost": "Seconds, no network."
}
}