Is there a system that automatically designs a set of rules from the examples?
This is an active research topic.
Consider reading

J.Pitrat's Artificial Beings, the conscience of a conscious machine book

This Understanding machine learning book

old Lenat's papers on Eurisko.

and recent papers such as Learning Structured Embeddings of Knowledge Bases and several others in Artificial Intelligence Journal

about the MILEPOST GCC and Ctuning projects

this paper on Reconciling deep learning with symbolic artificial intelligence: representing objects and relations


My hope is to get funded so that RefPerSys could (in a few years) be able to deduce some rules and metarules.