Basically, there are a bunch of shader "render_group" structs (mostly in graphics.h) that have manually constructed Make(WhateverShader)RenderGroup functions that initialize the structs, and then various functions to bind and run the render passes.
There's a shader_magic meta function that automates the initialization code and should be flexible enough to port at least some of those render groups to the new shader pipeline. Might be a good pair-programming exercise to learn about the metaprogramming and shader pipelines.