Skip to content

Diagnostics

schemap validate <map.json> --json prints one object on stdout:

{
"ok": false,
"diagnostics": [
{
"severity": "error",
"code": "refs/unknown-node",
"subject": "/edges/0/to",
"message": "no node has id \"cache\"",
"evidence": { "value": "cache", "known": ["web", "api"] },
"allowedFixes": ["use one of the known node ids", "add a node with id \"cache\"", "remove this reference"]
}
]
}
  • subject is a JSON pointer into the file: the exact place to change.
  • allowedFixes lists the repairs that are in bounds. The skill tells the agent to apply one of them at subject and nothing else.
  • Errors block deliver (exit 1). Warnings never do.
  • ok is true when there are no errors.
code severity meaning
json/syntax error the file is not valid JSON (evidence has line and column)
schema/unknown-field error a field schemap does not have (often styling or coordinates)
schema/missing-field, schema/invalid-type, schema/invalid-value, schema/too-short error shape problems
refs/duplicate-id error an id used twice in one list
refs/unknown-node, refs/unknown-edge, refs/unknown-group, refs/unknown-lane error a reference to an id that does not exist
refs/group-cycle error a group is its own ancestor
kind/node-type error a type the kind does not use
kind/lanes-required, kind/lane-required error workflow and lifecycle need lanes, and every node a lane
kind/lanes-unused, kind/lane-unused, kind/groups-unused, kind/group-unused, kind/layout-option-unused, kind/phase-shape error a field the kind does not use
lifecycle/no-start warning no initial state
sequence/return-first warning the first message is a reply
semantics/orphan-node warning a node with no edges
semantics/self-edge warning an edge to itself (allowed in sequence and lifecycle)