Do you need undercoat when repainting?
Correspondingly, do you need to use undercoat when repainting wood?
the wood will need a decent coat of primer (or two) followed by a spirit undercoat. some of the better gloss paints are self-undercoating, however a primer is still necessary. and as it is bare wood i would undercoat as well, even if it is a self-undercoating gloss as it will help build up the opacity.
Beside above, can I just paint over old paint?
Priming is best. If you have to do two coats of paint to cover the old color, why not use a good primer or primer/sealer and one coat of a good paint? Most people will say otherwise, but primer will stick to old paint a lot better than new paint will. Use one coat of primer and one coat of paint.
If you want to update semi-gloss painted walls but don't want to sand and prime; or, if lead-based semi-gloss walls prevents you from sanding, it is possible to paint over semi-gloss walls with a satin-based paint without sanding or priming. If it's water-based, use a water-based satin paint.