Keep bone constraints from custom bones in Rigify metarig? (Not entirely SFW)
When you add bones to the metarig, and don't set their "rigify_type" property, the script just adds those bones to the last layer with prefix "ORG-". It also keeps any constraints intact. But none of such bones are deforming ones. Of course, you can assign their Deform property after the generation is done, but that's not we want. :-) So, if you want some bones to be deforming ones, you need to find the first bones of each bone chain, what supposed to be deforming, and set for these bones rigify_type = basic.copy (or basic.copy-chain), and set the "Deform" option of that type. In that case you will have all your bones in the resulting rig with "ORG-" prefix, with all the constraints in last layer. Also you will have all the Deform bones copied to "DEF-" ones in third to last layer, all parented to their "ORG-" equivalents. Hope, it will help.
See "Extensions:2.6/Py/Scripts/Rigging/Rigify" for details on rigify types.