According to the PMBOK Guide, 7th edition, one of the principles of project management is to focus on value. This means that the project manager should ensure that the project delivers the most valuable outcomes to the stakeholders, especially the customer. In an agile project, the sprint goal is a short-term objective that aligns with the customer's needs and expectations. The sprint backlog is a list of tasks that the development team commits to complete within the sprint to achieve the sprint goal. If the developers want to deviate from the sprint backlog and work on something else, the project manager should remind them of the importance of focusing and meeting the sprint goal. The project manager should also facilitate a discussion with the product owner and the development team to clarify the priority and value of the tasks in the sprint backlog and the refactoring work. The project manager should help the team to balance the trade-offs between delivering the sprint goal and improving the quality of the product. References: PMBOK Guide, 7th edition, page 9 (Principles of Project Management); page 71 (Focus on Value); page 137 (Agile Project Delivery); page 139 (Sprint Goal and Sprint Backlog)