Hi,
I am reading CLIPS code at the moment for a project. Here are some of my suggestions to begin with, hope they can help.
1) You need to have a basic understanding of the underline algorithm of the CLIPS inference engine, that is the Rete algorithm. I find Doorenbos' Production Matching for Large Learning Systems to be a good starter reading for understanding Rete, whose chapter 2 contains a detailed description and pseudo code of Rete's basic operations. Here is the link for that paper:
As alternatives, you can also read Charles Forgy's self-introductory paper on Rete A Fast Algorithm for the Many Pattern/Many Object Pattern Match Problem or his PhD thesis On the efficient implementation of production systems, which is long and detailed.
2) CLIPS‘ implementation of the inference engine can be broken into several modules. You need to have a general understanding of these modules to have a grasp of the whole picture. To begin with, I denote some of the modules I consider essential:
A) Module for building the Rete topology from rules, and for updating the contents of the nodes when facts are updated. This is the core of the inference engine, and you need to have a basic understanding of Rete to understand this module.
B) Module for parsing defrules and expressions, and for evaluating expressions.
C) Module for parsing deftemplates, and for parsing fact assertion & retraction.
D) Module for agenda management and rule firing.
These modules constitute the very basics of an inference engine. Other modules like memory management, I/O rerouters, are support modules for efficiency issues and code encapsulation, and at the first read you only need to know their general purposes. Yet other modules like the class module, defglobal, etc. are modules adding more features to CLIPS, you can start to understand them one by one after you have understood the core.
CLIPS comes with an architecture manual briefly explaining each module, which can be a good reference, though some information is not consistent with the newest 6.3 version. You can also check out the CLIPS' bundled Advanced Programming Guide, which has some helpful information for your understanding of the code.
Good luck!
Rocky Liu