# Integrating Interactive Detection of Code Smells into Scrum: Feasibility, Benefits, and Challenges
## 4 Approach: Integrating ID Technique into Scrum
### Scrum Adaptation  
The proposed integration of Interactive Detection (ID) into the Scrum framework necessitates modifying its roles, artifacts, and events. The following points outline the key changes in each of these components:Roles: a new role called the \"Quality Evaluator\" must be established to manage code quality maintenance and improvement actions within the development team. The Quality Evaluator should possess expertise in code smell detection and refactoring. This role is responsible for guiding team members involved in programming activities.  
The \"Quality Evaluator\" role can be both a genuinely new role and an additional function for the Scrum Master. In smaller teams, the Scrum Master may handle quality assurance, but larger organizations may benefit from a dedicated Quality Evaluator. The significance depends on the organization's size and needs for specialized quality assessment in agile software development.  
Artifacts: the Product Backlog and, consequently, the Sprint Backlog, need to be expanded to include a list of code smell occurrences. This addition ensures that the ID and NID technique data and indicators can serve as acceptance criteria for the \"definition of done\" for various team-generated artifacts.  
Code smells should be treated differently from other bugs/defects in the software development process. While bugs and defects may directly impact the software's functionality and result in incorrect or unexpected behavior, code smells represent poor coding practices or design flaws that might not necessarily manifest as functional issues immediately but can lead to deeper software quality problems over time. Treating code smells separately acknowledges their importance in ensuring long-term code maintainability and software quality.  
Events: the proposed approach primarily focuses on events directly associated with software development within the Scrum framework. In what follows, we describe the suggested changes in each Scrum event.  
Sprint Planning: a dedicated period is included in Sprint Planning to review and prioritize code smells in the project. The Quality Evaluator collaborates with the product owner and developers to determine which code smells should be addressed in the current sprint. This modification aligns with the \"adaptation\" pillar of Scrum, ensuring that code smell management is integrated into the planning process.  
Sprint: the Sprint is adjusted to promote continuous inspection of code artifacts throughout the working day, facilitated by the Interactive Detection (ID) technique. This enables early identification of code smells, enabling easier refactoring. This adjustment aligns with the \"inspection\" pillar of Scrum, emphasizing the importance of proactive code quality assessment. Since the major reason that causes smells in software systems is the poor technical skills of developers and lack of awareness towards writing high-quality code [3], using ID in a disciplined way can contribute to improving skills and awareness in smell detection.  
Daily Scrum: the Daily Scrum remains unchanged, but now developers highlight critical and severe code smells as part of their challenges in achieving the sprint goal. The Scrum Team collectively decides whether to address these code smells in the current sprint or postpone them based on the required effort. This modification ensures that code smell management becomes a regular part of the team's discussions and decision-making processes.  
Sprint Review: in the Sprint Review, a comprehensive analysis of the global list of code smells is conducted, comparing previous and current versions to understand the changes. The team discusses the most critical code smells, particularly those briefly mentioned in Daily Scrums but postponed due to their complexity. This promotes transparency within the Scrum by facilitating effective communication and awareness about various artifacts generated throughout development.