get_anti_pattern_violations_for
Reverse lookup: given an entity id, return the anti-pattern violations that implicate it. Use after `validate_graph` to drill into one entity's implicated patterns. Matches by node id where the detector can name nodes and by entity type otherwise; each violation carries `matched_by` saying which, so a type match can be read as the approximation it is. Underpins the Inspect approach.
Arguments
entity_idstringrequiredNode id to look up.
Returns
{ entity_id, type, violations: [...] }, each violation carrying matched_by: 'node' | 'type'.
Examples
Live call against the Notion example graph.
Input
{
"entity_id": "ec3d5479-4947-4bd9-9e77-b5ee01beb851"
}Output
{
"entity_id": "ec3d5479-4947-4bd9-9e77-b5ee01beb851",
"type": "product",
"violations": []
}Warnings
A `matched_by: 'type'` violation is an approximation: the detector is a whole-graph check that cannot name nodes, so every entity of that type shares the result. Treat those as "worth looking at", and `matched_by: 'node'` as "this entity specifically".