Prune round-trip rulings of removed strings

Drop the translation-semantic-roundtrip rulings of strings the catalogues no longer hold, and renumber the rest to catalogue order. Rulings are paired with strings by the hash of their msgid, so removing strings invalidates none and needs no agent re-run; this is the upkeep that follows. It only drops or renumbers: a verdict is never changed or invented, and a ruling for a string the ref’s history never held (one recorded ahead of its PR) is kept.

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.

translation-manager

Translation lifecycle management for folio content. Covers gettext PO/POT extraction and injection, TranslationNode manifests as KG nodes, official vs unofficial translations, staleness tracking, sign-off workflow, automatic badge rendering, the poSources fallback resolution chain, and translating into several locales as a team: one extraction, a PR per locale to main, FHIR terms as CodeSystem supplements, the untainted round trip as run, and the per-locale QA report.

Source: cat-harness/library/skills/library-core/translation-manager.md.

Also satisfied by: translation-extract, translation-inject, translation-platforms, translation-roundtrip-record, translation-signoff, translation-status, translation-validate.

The skill declares no I/O contract (schemas/skills/translation-manager/{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
inwriteFlagApply the change to test/attestations/translation-qa/. Absent, it is a dry run that prints each dropped ruling and the renumbered spans.boolean · A boolean switch — projects to a bare flag, with no value word
inrefBranchWhose catalogues decide what was removed. Default origin/main: the state branch serves main and every branch, so a ruling goes only once main no longer holds its string.string · pattern ^[A-Za-z0-9][A-Za-z0-9._/-]*$ · A git branch name
outattestationsRepoPathWith –write, the rewritten test/attestations/translation-qa/<catalogue>.<locale>.attestations.json, to be pushed to cat/who-iris/attestations.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
Human Translation WorkflowIdentify content and target localeTranslation Coordinatortranslation-manager
Human Translation WorkflowAssign to qualified human translatorTranslation Coordinatortranslation-manager
Human Translation WorkflowCheck translation completenessTranslation Coordinatortranslation-manager
Human Translation WorkflowRequest completion of remaining stringsTranslation Coordinatortranslation-manager
Human Translation WorkflowReceive assignment and materialsHuman Translatortranslation-manager
Human Translation WorkflowTranslate strings in preferred toolHuman Translatortranslation-manager
Human Translation WorkflowSubmit completed .po fileHuman Translatortranslation-manager
Human Translation WorkflowReview translation for accuracySubject-Matter Expert / Reviewertranslation-manager
Human Translation WorkflowReturn for correction with annotationsSubject-Matter Expert / Reviewertranslation-manager
Human Translation WorkflowSign off translation as officialSubject-Matter Expert / Reviewertranslation-manager
Human Translation WorkflowExtract the POTAutomated Pipelinetranslation-manager
Human Translation WorkflowPrepare domain glossaryAutomated Pipelinetranslation-manager
Human Translation WorkflowInject the POAutomated Pipelinetranslation-manager
Human Translation WorkflowRound-trip translation QAAutomated Pipelinetranslation-manager
Human Translation WorkflowAppend WHO disclaimer (if DAK)Automated Pipelinetranslation-manager
Human Translation WorkflowWrite status.json (official)Automated Pipelinetranslation-manager
Multi-locale translationExtract every template onceSource-language leadtranslation-manager
Multi-locale translationMerge the one source PR to mainSource-language leadtranslation-manager
Multi-locale translationTranslate one localeLocale translator (one per locale)translation-manager
Multi-locale translationFile the source errors as one issueSource-language leadtranslation-manager
Multi-locale translationRun the deterministic gatesLocale translator (one per locale)translation-manager
Multi-locale translationCheck glossary consistencyLocale translator (one per locale)translation-manager
Multi-locale translationWrite the locale’s QA reportLocale translator (one per locale)translation-manager
Multi-locale translationOpen the locale PR to mainLocale translator (one per locale)translation-manager
Multi-locale translationFix each drift on the PRLocale translator (one per locale)translation-manager
Multi-locale translationValidate and merge in the windowSource-language leadtranslation-manager
Translation refresh (watcher)Translate new and fuzzy onlyLocale translatortranslation-manager
Translation refresh (watcher)Re-run the gatesLocale translatortranslation-manager
Translation refresh (watcher)QA report and one PR to mainLocale translatortranslation-manager
Translation round trip (untainted)Draw the sampleLocale translatortranslation-manager
Translation round trip (untainted)Record could not dispatchLocale translatortranslation-manager
Translation round trip (untainted)Pre-screen every pairRound-trip adjudicatortranslation-manager
Translation round trip (untainted)Read and rule each flagged pairRound-trip adjudicatortranslation-manager
Translation WorkflowExtract translatable strings (POT)Agent / platform (automated)translation-manager
Translation WorkflowBuild and review the locale term baseAgent / platform (automated)translation-manager
Translation WorkflowProduce translation (PO file)Agent / platform (automated)translation-manager
Translation WorkflowInject translations (PO → Markdown)Agent / platform (automated)translation-manager
Translation WorkflowRound-trip translation QA (back-translate)Agent / platform (automated)translation-manager
Translation WorkflowCheck glossary terms (translation:glossary:check)Agent / platform (automated)translation-manager
Translation WorkflowAdjudicate the flagged passage (human)Human reviewer / adjudicatortranslation-manager
Translation WorkflowEdit the flagged passage and re-injectHuman reviewer / adjudicatortranslation-manager
Translation WorkflowWrite status.json (unofficial)Agent / platform (automated)translation-manager
Translation WorkflowSign off translation (human adjudicator)Human reviewer / adjudicatortranslation-manager
Translation WorkflowWrite status.json (official)Agent / platform (automated)translation-manager
Translation WorkflowCheck staleness (source hash)Agent / platform (automated)translation-manager
Narrative reviewReview the translationNarrative reviewertranslation-manager
Ingestion subprocess — the L1 completeness gateRound-trip translation QAIngestion Engine (agent, runs unattended)translation-manager

How it is deployed and reached

  • Command line. From the repository root: bun run cat translation-qa:prune. cat translation-qa:prune runs bun run who-iris/scripts/translation-qa-prune.ts (declared in who-iris/package.json).
  • 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, git
networkno

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/who-iris/tools/translation-qa-prune.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/who-iris/who-iris.context.jsonld",
  "@id": "https://litlfred.github.io/folio-assistant/who-iris/tools/translation-qa-prune.jsonld",
  "@type": "https://litlfred.github.io/cat-harness/v0/ns/Tool",
  "partOf": "https://litlfred.github.io/folio-assistant/who-iris/who-iris.jsonld",
  "name": "translation-qa-prune",
  "title": "Prune round-trip rulings of removed strings",
  "description": "Drop the translation-semantic-roundtrip rulings of strings the catalogues no longer hold, and renumber the rest to catalogue order. Rulings are paired with strings by the hash of their msgid, so removing strings invalidates none and needs no agent re-run; this is the upkeep that follows. It only drops or renumbers: a verdict is never changed or invented, and a ruling for a string the ref's history never held (one recorded ahead of its PR) is kept.",
  "install": {
    "none": true
  },
  "invoke": {
    "shell": "bun run cat translation-qa:prune"
  },
  "io": {
    "inputs": [
      {
        "name": "write",
        "schema": "https://litlfred.github.io/folio-assistant/cat-harness/tool-types.schema.json#/$defs/Flag",
        "description": "Apply the change to test/attestations/translation-qa/. Absent, it is a dry run that prints each dropped ruling and the renumbered spans.",
        "required": false,
        "arg": {
          "flag": "--write"
        }
      },
      {
        "name": "ref",
        "schema": "https://litlfred.github.io/folio-assistant/cat-harness/tool-types.schema.json#/$defs/Branch",
        "description": "Whose catalogues decide what was removed. Default origin/main: the state branch serves main and every branch, so a ruling goes only once main no longer holds its string.",
        "required": false,
        "arg": {
          "flag": "--ref"
        }
      }
    ],
    "outputs": [
      {
        "name": "attestations",
        "schema": "https://litlfred.github.io/folio-assistant/cat-harness/tool-types.schema.json#/$defs/RepoPath",
        "description": "With --write, the rewritten `test/attestations/translation-qa/<catalogue>.<locale>.attestations.json`, to be pushed to `cat/who-iris/attestations`."
      }
    ]
  },
  "satisfies": [
    "translation-manager"
  ],
  "requirements": {
    "runtime": [
      "bun",
      "git"
    ],
    "network": false
  }
}

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