It is your duty to deliver code that complies with this policy. It is your responsibility to deliver code that is well tested and has been refactored in line with the ‘boy scout rule’. If you are pressured to deliver code early that is not in line with this policy then you must resist that pressure.

You are deemed to have engineering judgement. Use that judgement.

When trying to balance these needs bear in mind the advice in Large refactoring, and avoid large refactorings. Instead try for Surgical Refactoring.