An important step in automatic visual inspection is verifying whether a part is good or bad, by comparing a list of inspection specifications to a list of extracted and measured defects. Our goal is to provide a general, flexible, and efficient solution to this problem. We present a solution following a rule-based approach for the case of specs for visual inspection of disk heads. However, due to the generality of our approach (within the realm of visual inspection), it is easily extendible to verification of specs in other visual inspection applications. While flexibility comes naturally with the rule-based approach, efficiency is still an issue. Therefore, we implemented two techniques to increase the efficiency of our system: one at the rule level, and one at the rule-matching level. We describe our implementation and show experimental results from applying our approach in an experimental system for automatic visual disk head inspection.