Similar foliation patterns are observed in faults in poorly lithified sediments, fault gouge and cataclasite, and greenschist to granulite facies shear zones. We suggest that this similarity in form reflects similar controls on development. We propose that these patterns are a fundamental consequence of deformation of heterogeneous media, in which material heterogeneity is manifest as competency contrast. Strain incompatibilities along competence domain boundaries can produce mechanical instabilities, resulting in the nucleation of shear bands and/or C-surfaces. Mechanical segregation of incompetent material into these foliations produces compositional bands. Competency contrast promotes strain partitioning between compositional bands, accommodated in part by domain-boundary sliding. In three-dimensional general shear, incompetent domains and domain boundaries will preferentially accommodate the non-coaxial component of flow, and strain rates will be higher than in competent domains. Consequently, lineations in incompetent domains are different from, and may be orthogonal to, those in competent domains. Lineations that record tectonic transport will form preferentially in incompetent domains; lineations in more competent domains may (if not steady-state) approximate the long axis of the finite strain ellipsoid of the competent domains. The number and orientations of foliations and lineations, and microstructures that record strain rate, thus document both the flow field and the magnitude of competency contrast.