We develop a general framework to describe the cubically nonlinear interaction of a unidirectional degenerate quartet of deep-water gravity waves. Starting from the discretised Zakharov equation, and thus without restriction on spectral bandwidth, we derive a planar Hamiltonian system in terms of the dynamic phase and a modal amplitude. This is characterised by two free parameters: the wave action and the mode separation between the carrier and the side-bands. The mode separation serves as a bifurcation parameter, which allows us to fully classify the dynamics. Centres of our system correspond to non-trivial, steady-state nearly-resonant degenerate quartets. The existence of saddle-points is connected to the instability of uniform and bichromatic wave trains, generalising the classical picture of the Benjamin-Feir instability. Moreover, heteroclinic orbits are found to correspond to primitive, three-mode breather solutions, including an analogue of the famed Akhmediev breather solution of the nonlinear Schr\"odinger equation.