HMRC have been systematically removing notes regarding Brexit from this manual.
https://www.gov.uk/hmrc-internal-manuals/national-insurance-manual/updates
Related content from Claritax Books
The complex rules for National Insurance contributions are covered in depth in National Insurance Contributions, by Karen Speight.