L1 extraction viewer: a hub and a page per instance with l1-extraction directories

For every visualiser an instance declares with renderedBy: l1-extraction-pages, write the hub at <locale>/<harness>/<id>/ and, with subgraphs: "instance", one page per instance that declares an l1-extraction directory. Each page shows, from what the files declare: the L1 statements (graph nodes with a statement, and an authored L1 source’s recommendations); the candidate work list’s counts, coverage and decisions; each graph document’s nodes by type and edges by predicate (L2 scenario candidates included); counts of curation, mapping, vocabulary, exclusions and run context; and a link from every file to its published copy (cat-harness’s library:viz), when the site has it, and to its source at the pinned commit. A declared directory not on disk is reported UNKNOWN, never zero.

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.

graph-rendering

Draw any graph in a harness (schemas, processes, a folio’s block graph and any formal relation its content type adds, a detangle partition) so the picture is derived, checkable and readable. Ten rules, which engine to lay a graph out with and why, and how each graph typology here applies them.

Source: cat-harness/skills/kg/graph-management/graph-rendering.md.

Also satisfied by: auto-docs-viewer, content-graph-uml, document-kinds-viewer, external-schemas-viewer, folio-viewer, kg-viewer, library-viewer, lsi-viewer, methodologies-viewer, node-kind-pages, openapi-pages, processes-viewer, schemas-viewer, site-viewer, staging-graph-viewer, state-viewer, theme-viewer, tools-viewer, translation-status-viewer, uploads-viewer, voices-viewer, web-app-build, archimate-from-glossary, bibliography-page, glossary-page, glossary-table, references-render, iris-pages.

The skill declares no I/O contract (schemas/skills/graph-rendering/{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
insiteRepoPathThe site being built; pages go under it (cat-harness-tools’ visualiser-writers.ts passes it). Default: the checkout’s site directory.string · pattern ^[A-Za-z0-9._][A-Za-z0-9._/-]*$ · A path relative to the repository root. No .. segments.
inrootRepoPathThe checkout whose declarations are read. Default: the checkout holding the working directory.string · pattern ^[A-Za-z0-9._][A-Za-z0-9._/-]*$ · A path relative to the repository root. No .. segments.
incheckFlagWrite nothing; exit 1 when a page is stale, missing or orphaned.boolean · A boolean switch — projects to a bare flag, with no value word
outpagesCountPages written: the hub and one per instance.integer · A non-negative count — how many of something, or how many to show. Zero is a real answer.

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 smart-base/scripts/gen-l1-extraction-pages.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
whenPublishing a site that should show what each L1 extraction holds.
limitsValidates nothing (l1-recommendation-candidates and l1-recommendation-scenarios do, on every write) and does not re-render the JSON-LD (the library viewer publishes it).
costReads each file of each declared directory once.

What it is made of

It draws the viewer for the graph typology l1-extraction.

Linked data

The Tool is published as its own JSON-LD document at its IRI, http://smart.who.int/base/tools/l1-extraction-pages.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-extraction-pages.jsonld",
  "@type": "https://litlfred.github.io/cat-harness/v0/ns/Tool",
  "partOf": "http://smart.who.int/base/smart-base.jsonld",
  "name": "l1-extraction-pages",
  "title": "L1 extraction viewer: a hub and a page per instance with `l1-extraction` directories",
  "description": "For every visualiser an instance declares with `renderedBy: l1-extraction-pages`, write the hub at `<locale>/<harness>/<id>/` and, with `subgraphs: \"instance\"`, one page per instance that declares an `l1-extraction` directory. Each page shows, from what the files declare: the L1 statements (graph nodes with a `statement`, and an authored L1 source's `recommendations`); the candidate work list's counts, coverage and decisions; each graph document's nodes by type and edges by predicate (L2 scenario candidates included); counts of curation, mapping, vocabulary, exclusions and run context; and a link from every file to its published copy (cat-harness's `library:viz`), when the site has it, and to its source at the pinned commit. A declared directory not on disk is reported UNKNOWN, never zero.",
  "install": {
    "none": true
  },
  "invoke": {
    "shell": "bun run smart-base/scripts/gen-l1-extraction-pages.ts"
  },
  "io": {
    "inputs": [
      {
        "name": "site",
        "schema": "https://litlfred.github.io/folio-assistant/cat-harness/tool-types.schema.json#/$defs/RepoPath",
        "description": "The site being built; pages go under it (cat-harness-tools' `visualiser-writers.ts` passes it). Default: the checkout's site directory.",
        "required": false,
        "arg": {
          "flag": "--site"
        }
      },
      {
        "name": "root",
        "schema": "https://litlfred.github.io/folio-assistant/cat-harness/tool-types.schema.json#/$defs/RepoPath",
        "description": "The checkout whose declarations are read. Default: the checkout holding the working directory.",
        "required": false,
        "arg": {
          "flag": "--root"
        }
      },
      {
        "name": "check",
        "schema": "https://litlfred.github.io/folio-assistant/cat-harness/tool-types.schema.json#/$defs/Flag",
        "description": "Write nothing; exit 1 when a page is stale, missing or orphaned.",
        "required": false
      }
    ],
    "outputs": [
      {
        "name": "pages",
        "schema": "https://litlfred.github.io/folio-assistant/cat-harness/tool-types.schema.json#/$defs/Count",
        "description": "Pages written: the hub and one per instance."
      }
    ]
  },
  "satisfies": [
    "graph-rendering"
  ],
  "requirements": {
    "runtime": [
      "bun"
    ],
    "network": false
  },
  "renders": [
    "l1-extraction"
  ],
  "selection": {
    "when": "Publishing a site that should show what each L1 extraction holds.",
    "limits": "Validates nothing (`l1-recommendation-candidates` and `l1-recommendation-scenarios` do, on every write) and does not re-render the JSON-LD (the library viewer publishes it).",
    "cost": "Reads each file of each declared directory once."
  }
}

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