L1 extraction coverage
Of the normative sentences in a publication (the closed marker list of the methodology l1-coverage §1), count how many an L1 extraction CAPTURED, how many are EXCLUDED for a fixed-list reason a person signed off, and how many are UNACCOUNTED — per page and in total. Writes the contract’s §4 report and exits non-zero below 100% accounted-for.
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.
l1-coverage
Check that an L1 extraction accounted for every normative sentence in its source publication — captured as a node, or excluded for a fixed-list reason a person signed off. Per-page counts, captured %, accounted-for %, and a non-zero exit below 100 % accounted-for. Generic: three input files, nothing folio-specific. Implements the methodology l1-coverage, the report contract.
Source: folio-assistant-core/skills/library/ingestion/l1-coverage.md.
The skill declares no I/O contract (schemas/skills/l1-coverage/{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 | text | RepoPath | yes | The publication’s body text, page-tagged: {"pages":[{"page":n,"text":"…"}]} JSON, or plain text with a form feed between pages (what pdftotext writes). Headers, references and tables of contents are stripped by the caller. | string · pattern ^[A-Za-z0-9._][A-Za-z0-9._/-]*$ · A path relative to the repository root. No .. segments. |
| in | captured | RepoPath | yes | JSON [{"id","text"}]: every statement the extraction captured, verbatim. | string · pattern ^[A-Za-z0-9._][A-Za-z0-9._/-]*$ · A path relative to the repository root. No .. segments. |
| in | exclusions | RepoPath | JSON [{location\|text, reason, signedOffBy?, signedOffAt?}]. An exclusion without signedOffBy is a proposal and leaves its sentence unaccounted. | string · pattern ^[A-Za-z0-9._][A-Za-z0-9._/-]*$ · A path relative to the repository root. No .. segments. | |
| in | out | RepoPath | Where to write the report; stdout when absent. | string · pattern ^[A-Za-z0-9._][A-Za-z0-9._/-]*$ · A path relative to the repository root. No .. segments. | |
| out | report | RepoPath | An l1-coverage-report/v1 JSON report: definitionVersion, matchMethod, source and graph sha256, totals, pages[] and sentences[]. A per-page table goes to 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 |
|---|---|---|---|
| DTH authoring | Account for every normative sentence | Librarian | l1-coverage |
How it is deployed and reached
- Command line. From the repository root:
bun run folio-assistant-core/scripts/l1-coverage.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 |
| when to choose it | |
|---|---|
| when | An L1 extraction of a publication (recommendations, remarks, schedule entries) is about to be reviewed or promoted, and somebody needs to know — rather than assume — that no normative sentence was silently missed. |
| limits | Matching is normalised substring, so a paraphrased capture reads as unaccounted. Body-text filtering is the caller’s. The marker list is English. |
| cost | Reads three files; no network. |
What it is made of
| role | file | |
|---|---|---|
| definition | folio-assistant-core/tools/l1-coverage/l1-coverage.ts | |
| script | folio-assistant-core/scripts/l1-coverage.ts |
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/l1-coverage.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/l1-coverage.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": "l1-coverage",
"title": "L1 extraction coverage",
"description": "Of the normative sentences in a publication (the closed marker list of the methodology `l1-coverage` §1), count how many an L1 extraction CAPTURED, how many are EXCLUDED for a fixed-list reason a person signed off, and how many are UNACCOUNTED — per page and in total. Writes the contract's §4 report and exits non-zero below 100% accounted-for.",
"install": {
"none": true
},
"invoke": {
"shell": "bun run folio-assistant-core/scripts/l1-coverage.ts"
},
"io": {
"inputs": [
{
"name": "text",
"schema": "https://litlfred.github.io/folio-assistant/cat-harness/tool-types.schema.json#/$defs/RepoPath",
"description": "The publication's body text, page-tagged: `{\"pages\":[{\"page\":n,\"text\":\"…\"}]}` JSON, or plain text with a form feed between pages (what `pdftotext` writes). Headers, references and tables of contents are stripped by the caller.",
"required": true,
"arg": {
"flag": "--text"
}
},
{
"name": "captured",
"schema": "https://litlfred.github.io/folio-assistant/cat-harness/tool-types.schema.json#/$defs/RepoPath",
"description": "JSON `[{\"id\",\"text\"}]`: every statement the extraction captured, verbatim.",
"required": true,
"arg": {
"flag": "--captured"
}
},
{
"name": "exclusions",
"schema": "https://litlfred.github.io/folio-assistant/cat-harness/tool-types.schema.json#/$defs/RepoPath",
"description": "JSON `[{location|text, reason, signedOffBy?, signedOffAt?}]`. An exclusion without `signedOffBy` is a proposal and leaves its sentence unaccounted.",
"required": false,
"arg": {
"flag": "--exclusions"
}
},
{
"name": "out",
"schema": "https://litlfred.github.io/folio-assistant/cat-harness/tool-types.schema.json#/$defs/RepoPath",
"description": "Where to write the report; stdout when absent.",
"required": false,
"arg": {
"flag": "--out"
}
}
],
"outputs": [
{
"name": "report",
"schema": "https://litlfred.github.io/folio-assistant/cat-harness/tool-types.schema.json#/$defs/RepoPath",
"description": "An `l1-coverage-report/v1` JSON report: definitionVersion, matchMethod, source and graph sha256, totals, pages[] and sentences[]. A per-page table goes to stderr."
}
]
},
"satisfies": [
"l1-coverage"
],
"requirements": {
"runtime": [
"bun"
],
"network": false
},
"selection": {
"when": "An L1 extraction of a publication (recommendations, remarks, schedule entries) is about to be reviewed or promoted, and somebody needs to know — rather than assume — that no normative sentence was silently missed.",
"limits": "Matching is normalised substring, so a paraphrased capture reads as unaccounted. Body-text filtering is the caller's. The marker list is English.",
"cost": "Reads three files; no network."
}
}