Ok so I have found a bunch of local extrema using the method of Lagrange multipliers. Now, what is the method to classify them as minimum or maximum?
I cant apply the second derivative test out-of-the-box because its not a single function - it is a collection of functions along with various constraints.
Is there a universal algorithm that can solve this or is it necessary to rely on individual human judgement for each specific case?
There is a second derivative test for constrained extrema. Here's the statement for the case of one constraint $g(x)=c$. Suppose $a$ is a constrained critical point of $f$ on the constraint set $g(x)=c$. Then we have $\nabla f(a)=\lambda\nabla g(a)$ for some scalar $\lambda$. Consider the Hessian matrix $H$ (matrix of second partial derivatives) of $f(x)-\lambda g(x)$, evaluated at $a$. Then if $v^\top Hv>0$ for all $v$ tangent to the constraint hypersurface at $a$, we conclude that $a$ is a constrained local minimum; if $v^\top Hv<0$ for all $v$ tangent to the constraint hypersurface at $a$, we conclude that $a$ is a constrained local maximum. [Interestingly, it does not work with the Hessian of $f$ alone.]
(One proves this by taking a parametrization $\phi$ of the constraint hypersurface near $a$ (say, with $\phi(0)=a$) and realizing that the function $f\circ\phi$ has a standard critical point at $0$, which can be characterized by looking at the Hessian of $f\circ\phi$ at $0$.)