The architecture manual for CLIPS 5.1 is available here: http://clipsrules.sourceforge.net/documentation/other/arch5-1.pdf. It's not for the most recent version of the code, but a great deal of the information is still relevant, particularly for descriptions of the source code files.
For constructing the rete network, the more important files are analysis.c, factbld.c, factgen.c, generate.c, reorder.c, and rulebld.c.
For execution, the more important files are drive.c, engine.c, factmch.c, factrete.c, incrrset.c, reteutil.c, and retract.c.