{"id":"precedence-levels-check","version":"1.0.0","description":"Check whether claimed node levels exactly equal the earliest levels induced by a caller-supplied DAG.","supported_operations":["check claimed earliest dependency levels","verify minimum-depth level partition","audit longest-predecessor ranks","find first incorrect DAG level","validate canonical precedence layers","check earliest-start stage assignment"],"unsupported_operations":["compute or repair a claimed result","infer dependencies from prose","accept cyclic dependency graphs"],"semantics":["nodes and identifiers use exact Unicode scalar-value string equality; no normalization or trimming; null is never an identifier.","nodes must be unique, every edge endpoint must be declared, self-edges and cyclic graphs are invalid_input.","A well-typed claim is valid only if it contains every source node exactly once and satisfies the tool-specific precedence rule.","Claims are never repaired; the first issue is reported by claim index, then source node order, then source edge order.","Duplicate edges are allowed and have identical semantics to one edge.","The exact level of a node is 0 for a source, otherwise one plus the maximum level of its immediate predecessors; groups and members retain caller order but every group is nonempty.","Every output names reference_version Kahn-1962-topological-order-and-poset-linear-extension."],"limits":{"max_nodes":5000,"max_edges":20000,"max_id_bytes":128,"max_input_bytes":1000000},"pricing":{"status":"unpriced","charge_usd":null},"input_schema":{"type":"object","additionalProperties":false,"required":["nodes","edges","levels"],"properties":{"nodes":{"type":"array","maxItems":5000,"uniqueItems":true,"items":{"type":"string","minLength":1,"maxLength":128}},"edges":{"type":"array","maxItems":20000,"items":{"type":"array","minItems":2,"maxItems":2,"items":{"type":"string","minLength":1,"maxLength":128}}},"levels":{"type":"array","maxItems":5000,"items":{"type":"array","minItems":1,"maxItems":5000,"items":{"type":"string","minLength":1,"maxLength":128}}}}},"output_schema":{"type":"object","additionalProperties":false,"required":["valid","reference_version"],"properties":{"valid":{"type":"boolean"},"reason":{"type":"string"},"discrepancy":{"type":"object","additionalProperties":false,"required":["path","reason"],"properties":{"path":{"type":"string"},"reason":{"type":"string"},"expected":{},"actual":{}}},"reference_version":{"type":"string","const":"Kahn-1962-topological-order-and-poset-linear-extension"}}},"examples":[{"input":{"nodes":["a","b","c"],"edges":[["a","c"],["b","c"]],"levels":[["b","a"],["c"]]},"output":{"valid":true,"reference_version":"Kahn-1962-topological-order-and-poset-linear-extension"}},{"input":{"nodes":["a","b"],"edges":[["a","b"]],"levels":[["a","b"]]},"output":{"valid":false,"reason":"wrong_level","discrepancy":{"path":"levels[0][1]","reason":"wrong_level","expected":1,"actual":0},"reference_version":"Kahn-1962-topological-order-and-poset-linear-extension"}}],"execute_url":"/v1/tools/precedence-levels-check/versions/1.0.0/execute"}