Statutory basis for closing an investigation: interest determinations and penalty proceedings: when to make a penalty determination
Whenever possible, formal penalty action should be taken at the same time as formal assessing action to ensure that appeals against both can be heard together.
EM5207 and EM5207a explain when you should consider formal penalty action, and the steps you should have taken first.
It is important that you avoid delay wherever possible, and that you have explained your proposed penalties - including your view of the evidence - to the taxpayer and sought their agreement before you make a formal penalty assessment.
SIOG9200 contains guidance about penalties in the context of settlement by agreement. Note that much of this also applies to cases settled formally.