In order to unify the methods which have been applied to various topics such
as BRST theory of constraints, Poisson brackets of local functionals, and
certain developments in deformation theory, we formulate a new concept which we
call the {\it chain extension} of a $D$-algebra. We develop those aspects of
this new idea which are central to applications to algebra and physics. Chain
extensions may be regarded as generalizations of ordinary algebraic extensions
of Lie algebras. Applications of our theory provide a new constructive approach
to BRST theories which only contains three terms; in particular, this provides
a new point of view concerning consistent deformations. Finally, we show how
Lie algebra deformations are encoded into the structure maps of an sh-Lie
algebra with three terms.