Valence-bond (VB) theory is formulated in a general form, to be applied to states of any multiplicity, with inclusion of both spin and orbital degeneracy. Structures are related to products of spin functions, the leading terms, and a one-to-one correspondence is established between these products and extended Rumer diagrams. A relationship is also found with genealogical spin functions. The leading terms can be directly used in the calculation of energy eigenvalues and eigenvectors. Applications to simple hydrocarbon systems are shown, and the results are compared with experimental data.