A generalization of criticality – called secondary criticality – is introduced and applied to finite-amplitude Stokes waves. The theory shows that secondary criticality signals a bifurcation to a class of steady dark solitary waves which are biasymptotic to a Stokes wave with a phase jump in between, and synchronized with the Stokes wave. We find the that the bifurcation to these new solitary waves – from Stokes gravity waves in shallow water – is pervasive, even at low amplitude. The theory proceeds by generalizing concepts from hydraulics: three additional functionals are introduced which represent non-uniformity and extend the familiar mass flux, total head and flow force, the most important of which is the wave action flux. The theory works because the hydraulic quantities can be related to the governing equations in a precise way using the multi-symplectic Hamiltonian formulation of water waves. In this setting, uniform flows and Stokes waves coupled to a uniform flow are relative equilibria which have an attendant geometric theory using symmetry and conservation laws. A flow is then ‘critical’ if the relative equilibrium representation is degenerate. By characterizing successively non-uniform flows and unsteady flows as relative equilibria, a generalization of criticality is immediate. Recent results on the local nonlinear behaviour near a degenerate relative equilibrium are used to predict all the qualitative properties of the bifurcating dark solitary waves, including the phase shift. The theory of secondary criticality provides new insight into unsteady waves in shallow water as well. A new interpretation of the Benjamin–Feir instability from the viewpoint of hydraulics, and the connection with the creation of unsteady dark solitary waves, is given in Part 2.