Figure coverage and computability
For every figure a source publication declares, report whether the folio built from it has a block and how computable it is: missing, excluded (signed off), picture (a PNG crop), linked (a picture linked to a model view), computable (a diagram, a table or a figure rebuilt by ArchiMate, BPMN, DMN, Mermaid, a class diagram or a generator), or cited (a picture kept on purpose, signed off). Exits non-zero when any declared figure is missing; --require-computable also fails on pictures, linked or not.
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.
figure-rebuild
Turn a figure into a computable diagram: every figure of a source publication when a folio is built from its L1 entry, and any hand-drawn figure in a folio, an IG or a demonstrator that is redrawn from a source. Every declared figure gets a block, and each one is rebuilt in the form its type calls for: an ArchiMate view, BPMN, DMN, a FHIR logical model, or an SVG generated from data, always from one schema-backed source. The PDF crop stays beside the rebuild as the cited source, and the rebuild keeps the original’s layout. The figure-coverage check counts what is missing and what is still only a picture.
Source: folio-assistant-core/skills/library/ingestion/figure-rebuild.md.
Also satisfied by: diig-phases-svg, smart-approach-svg.
The skill declares no I/O contract (schemas/skills/figure-rebuild/{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 | entry | RepoPath | yes | The L1 library entry directory; its sections/*.md give the declared figures, read with cat-harness-tools declaredFigureCaptions. | string · pattern ^[A-Za-z0-9._][A-Za-z0-9._/-]*$ · A path relative to the repository root. No .. segments. |
| in | folio | RepoPath | yes | The folio’s document directory; every figure, diagram and table block naming a figure is read. | string · pattern ^[A-Za-z0-9._][A-Za-z0-9._/-]*$ · A path relative to the repository root. No .. segments. |
| in | exclusions | RepoPath | JSON [{figure, scope: block\|rebuild, reason, signedOffBy?, signedOffAt?}]. Without signedOffBy an exclusion is a proposal and does not count. | 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 | A figure-coverage-report/v1 JSON report: declared count, counts per state, one row per figure with its blocks, blocks naming undeclared figures, and problems. A per-figure 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
No process step names a skill this Tool satisfies.
How it is deployed and reached
- Command line. From the repository root:
bun run folio-assistant-core/scripts/figure-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 | A folio has been seeded from an L1 library entry (for example a Digital Transformation Handbook), and somebody needs to know that every figure the publication declares has a block, and which are still only pictures. |
| limits | Figure numbers come from block captions and the first line of each block’s Markdown. Whether a rebuild is faithful is a person’s review, not this check. |
| cost | Reads an entry’s sections and a folio’s blocks; no network. |
What it is made of
| role | file | |
|---|---|---|
| definition | folio-assistant-core/tools/figure-coverage/figure-coverage.ts | |
| script | folio-assistant-core/scripts/figure-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/figure-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/figure-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": "figure-coverage",
"title": "Figure coverage and computability",
"description": "For every figure a source publication declares, report whether the folio built from it has a block and how computable it is: missing, excluded (signed off), picture (a PNG crop), linked (a picture linked to a model view), computable (a diagram, a table or a figure rebuilt by ArchiMate, BPMN, DMN, Mermaid, a class diagram or a generator), or cited (a picture kept on purpose, signed off). Exits non-zero when any declared figure is missing; `--require-computable` also fails on pictures, linked or not.",
"install": {
"none": true
},
"invoke": {
"shell": "bun run folio-assistant-core/scripts/figure-coverage.ts"
},
"io": {
"inputs": [
{
"name": "entry",
"schema": "https://litlfred.github.io/folio-assistant/cat-harness/tool-types.schema.json#/$defs/RepoPath",
"description": "The L1 library entry directory; its `sections/*.md` give the declared figures, read with cat-harness-tools `declaredFigureCaptions`.",
"required": true,
"arg": {
"flag": "--entry"
}
},
{
"name": "folio",
"schema": "https://litlfred.github.io/folio-assistant/cat-harness/tool-types.schema.json#/$defs/RepoPath",
"description": "The folio's document directory; every figure, diagram and table block naming a figure is read.",
"required": true,
"arg": {
"flag": "--folio"
}
},
{
"name": "exclusions",
"schema": "https://litlfred.github.io/folio-assistant/cat-harness/tool-types.schema.json#/$defs/RepoPath",
"description": "JSON `[{figure, scope: block|rebuild, reason, signedOffBy?, signedOffAt?}]`. Without `signedOffBy` an exclusion is a proposal and does not count.",
"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": "A `figure-coverage-report/v1` JSON report: declared count, counts per state, one row per figure with its blocks, blocks naming undeclared figures, and problems. A per-figure table goes to stderr."
}
]
},
"satisfies": [
"figure-rebuild"
],
"requirements": {
"runtime": [
"bun"
],
"network": false
},
"selection": {
"when": "A folio has been seeded from an L1 library entry (for example a Digital Transformation Handbook), and somebody needs to know that every figure the publication declares has a block, and which are still only pictures.",
"limits": "Figure numbers come from block captions and the first line of each block's Markdown. Whether a rebuild is faithful is a person's review, not this check.",
"cost": "Reads an entry's sections and a folio's blocks; no network."
}
}