Reading check:import, and repairing what it says

bun run check:import reports/ltp/<slug>/<slug>.ltp.yaml

Exit codes, and they mean different things:

exitmeaningwhat to do
0the file would importread any warnings, then hand over
1the file would not import as it standsrepair, re-run
2the check could not run at allfix the path or the YAML syntax; do not touch the reasoning

--strict also fails on the advisory findings (incoherent roles, judgment calls). --json prints the whole analysis and nothing else.

Repair rules

  • At most five iterations. If the same code survives three, stop and put the specific ambiguity to the person. A sixth attempt on the same code is guessing.
  • A repair may change an identifier, a role, a view assignment, or drop a relationship, an assumption or an assessment.
  • A repair may never invent a proposition. If a reference dangles, either the document contains the missing proposition and you add it with its own provenance, or it does not and you drop the unit that referred to it and record the omission.
  • A repair may never delete real content to go green. Dropping a claim the document makes, to make a count come out, is the one failure that cannot be seen in the output.

Fatal: nothing could be planned

Reported as an issue rather than an exclusion. Nothing else in the output means anything until it is fixed.

what you seecauserepair
UNREADABLE_DOCUMENT at ltp.schema_version โ€” "Expected string, received number"schema_version: 1.0 unquoted is a YAML floatschema_version: "1.0"
UNREADABLE_DOCUMENT at ltp โ€” "not the interchange format"no top-level ltp: blockwrap everything under ltp:
UNREADABLE_DOCUMENT naming a fielda value the schema refuses โ€” a view name, a role, a kindcheck it against references/vocabulary.md; ยง19.2 of the spec is wrong about view names
UNSUPPORTED_SCHEMAschema_version is not a 1.x string; the app reads "1.0" and "1.1" (SUPPORTED_SCHEMA_VERSIONS in src/domain/ltp-document.ts)write "1.0", as the example does; "1.1" is what an export emits and is only for a file that carries coverage or history. A later 1.x minor is read with a notice; another major is refused
exit 2, "not valid YAML or JSON"a syntax error; the message names the linefix the syntax; a statement containing : must be quoted

Per-unit: refused, while the rest of the file imports

Each of these is an exclusion. The file is otherwise fine and the units named are dropped, which is why a partly-refused file is more dangerous than a broken one โ€” it imports, quietly incomplete.

codecauserepair
DUPLICATE_IDone identifier used twice. The namespace is flat across entities, designations, relationships, assumptions and assessmentsgive the second use its own identifier; the <view>-<kind>-<slug> scheme prevents this
UNKNOWN_REFERENCEa reference to an identifier the file never definesdefine the proposition the document actually contains, or drop the referring unit and record the omission
UNSUPPORTED_CAUSAL_GROUPfrom_entity_ids holds more than one identifier, or logic.mode is compound_and / alternative_orone source per relationship. A joint cause cannot be expressed โ€” pick the dominant one or drop the link, and record the joint claim
CROSS_TREE_RELATIONSHIPfrom, to and the relationship's own tree are not all the same viewthere is no fix inside the file. Drop the relationship and record it as a cross-view link the importer refuses
SELF_RELATIONSHIPa proposition leads to itselfusually two extractions of the same sentence. Merge them, then re-point the link
HARD_DEPENDENCY_CYCLEunits waiting on each other, typically a parent_designation_id loopthe message names the path. Break it: goal โ† critical_success_factor โ† necessary_condition, and cloud_objective โ† cloud_requirement โ† cloud_prerequisite
PREREQUISITE_EXCLUDEDthis unit only failed because something it names failednot a separate problem. Fix the cause above it and this goes away

Advisory: it imports, and the reasoning does not read

Incoherent role. The role is not one the view holds. The file contract permits this and everything downstream refuses it, so it is worth fixing even though it does not block an import. Either move the proposition to the view whose role you meant โ€” the message names it โ€” or use a role the current view holds. observation is always available.

Judgment calls. Questions the importer refuses to answer for a team. On a fresh conversion these are rare, because Create mode compares against nothing. Copy each into the report's "Judgment calls" section verbatim.

Nothing would import

Nothing in this file would import. The file is schema-valid and holds no propositions โ€” usually a document that turned out to be a price list, a form or a narrative with no system in it. Do not pad it. Say what the document is and that it does not carry reasoning.

Built with LogoFlowershow