  We define and study invariants which can be uniformly constructed for any
gauge system. By a gauge system we understand an (anti-)Poisson supermanifold
provided with an odd Hamiltonian self-commuting vector field called a
homological vector field. This definition encompasses all the cases usually
included into the notion of a gauge theory in physics as well as some other
similar (but different) structures like Lie or Courant algebroids. For
Lagrangian gauge theories or Hamiltonian first class constrained systems, the
homological vector field is identified with the classical BRST transformation
operator. We define characteristic classes of a gauge system as universal
cohomology classes of the homological vector field, which are uniformly
constructed in terms of this vector field itself. Not striving to exhaustively
classify all the characteristic classes in this work, we compute those
invariants which are built up in terms of the first derivatives of the
homological vector field. We also consider the cohomological operations in the
space of all the characteristic classes. In particular, we show that the
(anti-)Poisson bracket becomes trivial when applied to the space of all the
characteristic classes, instead the latter space can be endowed with another
Lie bracket operation. Making use of this Lie bracket one can generate new
characteristic classes involving higher derivatives of the homological vector
field. The simplest characteristic classes are illustrated by the examples
relating them to anomalies in the traditional BV or BFV-BRST theory and to
characteristic classes of (singular) foliations.
