L1 extraction → statement lists

The smart-base collector for core’s publish-extracted-statements step: an l1-extraction directory’s authored L1 sources (recommendations: rows) and scenario-candidate graphs (user-scenario nodes whose evidence.location names a row), written as folio-extracted-statements/v1 lists, each statement with the library entry its L1 source names and the page it was read from. Core’s statements:pages then renders them with links to the entry and section.

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.

publish-extracted-statements

The standard step of adding source documents to a folio’s working artifact: every statement extracted from a library source is published readably in the artifact’s own pages AND in the shared extraction viewer, each with a link to its library entry and to the section it came from, and CI fails when the generated pages are stale. Generic across content types; each type’s adapter says only how its pages look. Executable form: processes/library/publish-extracted-statements.bpmn.

Source: folio-assistant-core/skills/library/ingestion/publish-extracted-statements.md.

Also satisfied by: publish-extracted-statements.

The skill declares no I/O contract (schemas/skills/publish-extracted-statements/{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
indirRepoPathyesAn l1-extraction directory.string · pattern ^[A-Za-z0-9._][A-Za-z0-9._/-]*$ · A path relative to the repository root. No .. segments.
inoutRepoPathyesWhere the lists go.string · pattern ^[A-Za-z0-9._][A-Za-z0-9._/-]*$ · A path relative to the repository root. No .. segments.
ininstance-rootRepoPathThe instance the evidence locations are relative to; the working directory when absent.string · pattern ^[A-Za-z0-9._][A-Za-z0-9._/-]*$ · A path relative to the repository root. No .. segments.
incheckFlagCompare instead of writing: exit 1 when a list is stale.boolean · A boolean switch — projects to a bare flag, with no value word
outlistsRepoPath<stem>.recommendations.json per L1 source and <stem>.scenarios.json per scenario graph.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
L3 FHIR IG pipelinePublish extracted statementsBuild pipeline — SUSHI · validator · IG Publisherpublish-extracted-statements
Authoring a documentPublish extracted statementsBuild pipelinepublish-extracted-statements
L1 document ingestion — a document to the L1 source knowledge graphPublish the extracted statementsIngestion Engine (agent, runs unattended)publish-extracted-statements
Publish extracted statements with source linksCollect each statement with its source sectionIngestion Engine (agent, runs unattended)publish-extracted-statements
Publish extracted statements with source linksRender them in the artifact’s own pagesIngestion Engine (agent, runs unattended)publish-extracted-statements
Publish extracted statements with source linksPublish them in the shared viewerIngestion Engine (agent, runs unattended)publish-extracted-statements
Publish extracted statements with source linksCheck pages are current, links resolveIngestion Engine (agent, runs unattended)publish-extracted-statements
Authoring a paperPublish extracted statementsBuild pipelinepublish-extracted-statements
DTH authoringPublish extracted statementsBusiness analystpublish-extracted-statements
L2 DAK authoringPublish extracted statementsBusiness analystpublish-extracted-statements

How it is deployed and reached

  • Command line. From the repository root: bun run smart-base/scripts/l1-statement-lists.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.

installnone
when to choose it
whenAn L1 extraction’s statements are to be published, with links to their sources, in the folio’s own pages and the shared viewer.
limitsAn L1 source that names no library entry is refused. A row’s page is its first page. A node citing a file that is not an L1 source (a persona citing the mapping) is not a statement and is skipped.
costSeconds, no network.

What it is made of

Linked data

The Tool is published as its own JSON-LD document at its IRI, http://smart.who.int/base/tools/l1-statement-lists.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/l1-statement-lists.jsonld",
  "@type": "https://litlfred.github.io/cat-harness/v0/ns/Tool",
  "partOf": "http://smart.who.int/base/smart-base.jsonld",
  "name": "l1-statement-lists",
  "title": "L1 extraction → statement lists",
  "description": "The smart-base collector for core's `publish-extracted-statements` step: an `l1-extraction` directory's authored L1 sources (`recommendations:` rows) and scenario-candidate graphs (`user-scenario` nodes whose `evidence.location` names a row), written as `folio-extracted-statements/v1` lists, each statement with the library entry its L1 source names and the page it was read from. Core's `statements:pages` then renders them with links to the entry and section.",
  "install": {
    "none": true
  },
  "invoke": {
    "shell": "bun run smart-base/scripts/l1-statement-lists.ts"
  },
  "io": {
    "inputs": [
      {
        "name": "dir",
        "schema": "https://litlfred.github.io/folio-assistant/cat-harness/tool-types.schema.json#/$defs/RepoPath",
        "description": "An `l1-extraction` directory.",
        "required": true,
        "arg": {
          "flag": "--dir"
        }
      },
      {
        "name": "out",
        "schema": "https://litlfred.github.io/folio-assistant/cat-harness/tool-types.schema.json#/$defs/RepoPath",
        "description": "Where the lists go.",
        "required": true,
        "arg": {
          "flag": "--out"
        }
      },
      {
        "name": "instance-root",
        "schema": "https://litlfred.github.io/folio-assistant/cat-harness/tool-types.schema.json#/$defs/RepoPath",
        "description": "The instance the evidence locations are relative to; the working directory when absent.",
        "required": false,
        "arg": {
          "flag": "--instance-root"
        }
      },
      {
        "name": "check",
        "schema": "https://litlfred.github.io/folio-assistant/cat-harness/tool-types.schema.json#/$defs/Flag",
        "description": "Compare instead of writing: exit 1 when a list is stale.",
        "required": false,
        "arg": {
          "flag": "--check"
        }
      }
    ],
    "outputs": [
      {
        "name": "lists",
        "schema": "https://litlfred.github.io/folio-assistant/cat-harness/tool-types.schema.json#/$defs/RepoPath",
        "description": "`<stem>.recommendations.json` per L1 source and `<stem>.scenarios.json` per scenario graph."
      }
    ]
  },
  "satisfies": [
    "publish-extracted-statements"
  ],
  "selection": {
    "when": "An L1 extraction's statements are to be published, with links to their sources, in the folio's own pages and the shared viewer.",
    "limits": "An L1 source that names no library entry is refused. A row's page is its first page. A node citing a file that is not an L1 source (a persona citing the mapping) is not a statement and is skipped.",
    "cost": "Seconds, no network."
  }
}

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