Classical physics is reformulated as a constrained Hamiltonian system in the history phase space. Dynamics, i.e. the Euler-Lagrange equations, play the role of first-class constraints. This allows us to apply standard methods from the theory of constrained Hamiltonian systems, e.g. Dirac brackets and cohomological methods. In analogy with BRST quantization, we quantize in the history phase space first and impose dynamics afterwards. To obtain a truly covariant formulation, all fields must be expanded in a Taylor series around the observer's trajectory, which acquires the status of a quantized physical field. The formalism is applied to the harmonic oscillator and to the free scalar field. Standard results are recovered, but only in the approximation that the observer's trajectory is treated as a classical curve.