1. A system comprising: a review tool, wherein the review tool includes: a stage configured to hold a wafer; and an image generation system configured to generate an image of the wafer; and a controller in electronic communication with the review tool, wherein the controller is configured to: request design polygons in a field of view centered at one or more defect locations of the wafer; render a binary image showing the design polygons in the field of view; extract shape primitives that define local topological and geometric properties of a design; and apply at least one rule to the shape primitives using a rule execution engine, wherein the rule execution engine searches for an occurrence of the shape primitives covered by the at least one rule, and wherein the rule corresponds to presence of a defect.