When should quality planning be performed?