Publish extracted statements with source links

Render each declared page (a folio-statement-page/v1 spec naming folio-extracted-statements/v1 lists) as Markdown: every statement extracted from a library source, verbatim, with its kind and status, linked to its library entry and to the section it came from, labelled in the source’s own unit (“Catch up schedule, slide 7”). A statement whose source does not resolve fails the run and nothing is written. --check fails when a committed page is stale.

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: l1-statement-lists.

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
inpageRepoPathyesA folio-statement-page/v1 spec (schemas/extracted-statement.ts): the statement lists to publish, the page to write, its title and introduction, the library viewer’s and the sources’ URL prefixes, and the content type’s table look. Repeat the flag for several pages. A spec, not flags, because those are free text.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 page is stale.boolean · A boolean switch — projects to a bare flag, with no value word
ininstance-rootRepoPathThe citing instance, against which a source naming no instance resolves; the repository root when absent.string · pattern ^[A-Za-z0-9._][A-Za-z0-9._/-]*$ · A path relative to the repository root. No .. segments.
outpageRepoPathA generated Markdown page, one table per list: Id, Statement, Kind, Status, Source.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 folio-assistant-core/scripts/publish-extracted-statements.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
runtimebun
networkno
when to choose it
whenSource documents were added to a folio’s working artifact (ingestion promoted an entry, or authoring took up a source) and the statements extracted from them must be readable with a link to where each came from, in the artifact and in the shared viewer.
limitsIt renders what a collector hands it; turning a folio’s own extraction format into a statement list is the collector’s job. Pages and slides resolve to a section; a page several sections start on names only the page.
costReads the lists and each entry’s structure.json; no network.

What it is made of

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/publish-extracted-statements.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/publish-extracted-statements.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": "publish-extracted-statements",
  "title": "Publish extracted statements with source links",
  "description": "Render each declared page (a `folio-statement-page/v1` spec naming `folio-extracted-statements/v1` lists) as Markdown: every statement extracted from a library source, verbatim, with its kind and status, linked to its library entry and to the section it came from, labelled in the source's own unit (\"Catch up schedule, slide 7\"). A statement whose source does not resolve fails the run and nothing is written. `--check` fails when a committed page is stale.",
  "install": {
    "none": true
  },
  "invoke": {
    "shell": "bun run folio-assistant-core/scripts/publish-extracted-statements.ts"
  },
  "io": {
    "inputs": [
      {
        "name": "page",
        "schema": "https://litlfred.github.io/folio-assistant/cat-harness/tool-types.schema.json#/$defs/RepoPath",
        "description": "A `folio-statement-page/v1` spec (`schemas/extracted-statement.ts`): the statement lists to publish, the page to write, its title and introduction, the library viewer's and the sources' URL prefixes, and the content type's table look. Repeat the flag for several pages. A spec, not flags, because those are free text.",
        "required": true,
        "arg": {
          "flag": "--page"
        }
      },
      {
        "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 page is stale.",
        "required": false,
        "arg": {
          "flag": "--check"
        }
      },
      {
        "name": "instance-root",
        "schema": "https://litlfred.github.io/folio-assistant/cat-harness/tool-types.schema.json#/$defs/RepoPath",
        "description": "The citing instance, against which a source naming no instance resolves; the repository root when absent.",
        "required": false,
        "arg": {
          "flag": "--instance-root"
        }
      }
    ],
    "outputs": [
      {
        "name": "page",
        "schema": "https://litlfred.github.io/folio-assistant/cat-harness/tool-types.schema.json#/$defs/RepoPath",
        "description": "A generated Markdown page, one table per list: Id, Statement, Kind, Status, Source."
      }
    ]
  },
  "satisfies": [
    "publish-extracted-statements"
  ],
  "requirements": {
    "runtime": [
      "bun"
    ],
    "network": false
  },
  "selection": {
    "when": "Source documents were added to a folio's working artifact (ingestion promoted an entry, or authoring took up a source) and the statements extracted from them must be readable with a link to where each came from, in the artifact and in the shared viewer.",
    "limits": "It renders what a collector hands it; turning a folio's own extraction format into a statement list is the collector's job. Pages and slides resolve to a section; a page several sections start on names only the page.",
    "cost": "Reads the lists and each entry's structure.json; 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