Back in time, when expert systems construction were approach by inferences, I constructed my own inferences-shell to implement them.
In general, an expert system is, in the very spirit of the logic of first order, a set of atoms, which form clauses, which form facts, which form rules. Some rules are consequences, other conclusions. All those rules are combined by logic operators like AND, OR, XOR, and so to take decisions.
My shell make possible to construct all components and run them as a expert system.
To test it, I took as reference a lecture that I took in high school: animal taxonomy, as part of the zoology class, where you needed to know and explore by microscope insect and animal organs, its shape, color, types, counting and so. In order to classify an insect, for example you used the microscope and a book called "keys" that given certain characteristics it refers to other keys and references, then, step by step you classify an animal by family an specie.
So here I set this keys and constructed my expert system, but can design your own atoms, clauses, rules and logic.
Of course, currently we use more sophisticated methods to construct experts
Code here