Psychological Safety, Leadership and Non-Technical Debt in Large-Scale Agile Software Development

Psychological safety has been hypothesised as an important antecedent of the success of agile software development (ASD) teams. However, there is a lack of investigation on psychological safety in large-scale agile (LSA) software development teams. This study explored the antecedents and effects of psychological safety on LSA teams. We conducted semi-structured interviews with software professionals working on LSA project in a Scandinavian technology company. The results suggest that building a psychologically safe environment is a multi-dimensional factor that requires proactive leadership approach, open communication and constructive feedback. The focus should be on designing teams for learning, remuneration safety, and a well-prepared onboarding process for new team members. A psychologically safe environment contributes to effective teamwork, work satisfaction, and promotion of learning. Absence of such an environment leads to brain drain, highlighting the consequences of neglecting this essential aspect of organisational culture. Future research directions are proposed in this paper.


I. INTRODUCTION
GILE methods help software companies improve the quality of their products while maximising customer value.It also helps to have an efficient response to defects, improved communication, and effectiveness of coordination [2]- [5].Nonetheless, it presents various management challenges, some of which originate from inadequacies in the ongoing and closely-knit communication necessary for the effectiveness of Agile methods.According to Boehm and Turner [35], agile brings various challenges such as development process conflicts, business process conflicts, ratings), and people conflicts.The foundation of the Agile approach rests on collaborative relationships and the interconnectedness among team members.It is of utmost importance that any questions teammates may have about the possible ramifications of expressing their opinions -whether it pertains to identifying gaps in others' work or struggles within their own tasks -do not hinder the overall performance.To enhance productivity in software development, it is important to understand the factors that influence individual and team performance.Additionally, it is important the team members feel safe and to "offer ideas, admit mistakes, ask for help, or provide feedback in hierarchies" [34].

A
Psychological safety is an important factor for teams working in agile environments and performing knowledgeintensive software tasks [1]- [3].Psychological safety is "a shared belief held by members of a team that the team is safe for interpersonal risk-taking" [6].
ASD methods have been designed for small-scale projects, but their potential positive outcomes have made them attractive to LSA software development projects.Kalenda et al. [5] and Dikert et al. [4] reported LSA success factors (i.e., management support, executive sponsorship and teamwork support) and challenges (i.e., difficulty in implementing agile methods, coordination challenges in a multiteam environment, mid-level managers' unclear role in ASD, too much pressure and workload, and lack of knowledge, coaching and training [4,5].Another concept that significantly affects software development is "non-technical debt" (NTD).NTD covers non-technical or social aspects of software development [2].Several factors contribute to social, process and people's debts in software engineering (i.e., lack of knowledge; lack of communication, collaboration and coordination; inadequate management decision; low developer morale; lack of psychological safety, etc.) [2], [4], [5].
To be successful in an agile environment and be able to handle the aforementioned challenges, teams must engage in more open communication and close collaborative relationships among their members.To do so, psychological safety is an important condition of the agile team environment.Psychological safety has been extensively studied in social science [3], [7][8][9] and has played an important role in organisational research, as reported in the Google Aristotle project [3], [10].Psychological safety has positive effects on team performance, job satisfaction and team reflexivity .In the context of ASD, limited research has been conducted on psychological safety [33], specifically in LSA projects.To fill this knowledge gap, we need a holistic understanding of what it takes to work effectively in LSA teams.Thus, in the present study, we seek to answer this research question:

RQ: What are the antecedents and effects of psychological safety on LSA teams?
To answer the RQ, we report the qualitative findings from a survey of eight software professionals working on an LSA project in a Scandinavian technology company.
In Section II, we explain the LSA and psychological safety concepts.The research method that we used is presented in Section III, followed by the results in Section IV.The study's limitations and threats to validity are reported in Section V. We end this paper with the discussion and conclusion in Section VI.

II. BACKGROUND
ASD is a set of iterative and incremental methods captured in the Agile Manifesto.The latter focuses on team interaction, working software, customers' requirements and promptness to change [12].Such methods are used in both small-scale and large-scale ASD projects [4], [5].There is a growing body of research on scaling ASD.Dikert [4] listed a range of LSA definitions and concluded that large-scale denote software development organizations with 50 or more people or at least six teams.There is a wide range of frameworks such as LeSS, SAFe, DAD, Spotify, Nexus and Scrum-at-Scale.
LSA teams face various challenges (i.e., managing complexities and interdependencies, diverse teams, roles and personalities, sub-optimal processes, conflicting agendas between teams, and complex and ambiguous goals) [4], [5], [13], which lead to NTD (i.e., social, process and people's debt) [8], [14].The causes of social debt are gender biases; lack of communication and collaboration; power distance; organisational silos and lack of kindness [2].Process debt mostly occurs when organisations ignore process competence development, process divergence and uncontrolled external dependencies [2].People's debt is caused mostly by priggish members, demotivation of non-senior members, inadequate management decision and lack of psychosocial safety [2].Most of these issues are either people-oriented or environment-related concerns.Enhancing psychological safety has a moderating effect on communication deficiencies and collaboration issues, whereas the intensity of taskrelated collaboration exhibits both promoting and mitigating effects [2].
There is a positive correlation between managers' openness and transformational leadership, on one hand, and psychological safety, on the other hand [15].Leader's inclusiveness important.It encompasses verbal and behavioural actions of leaders aimed at signalling an invitation for open comments and feedback that are respected and valued, plays a pivotal role in cultivating an environment characterized by psychological safety [36].Nonetheless, the process of feedback should always be approached with a mindful consideration of the potential conflicts it might elicit.It is important to recognize that not all forms of conflict are disadvantageous.Task-related conflicts, emerging from differing viewpoints concerning a specific task, might not yield as many adverse effects as relationship conflicts, which stem from interpersonal frictions, like harbouring negative sentiments towards an individual [37].Further, psychological safety is important for successful collaboration, open communication, knowledge and information sharing, and learning from failures and performance [6], [16][17][18][19].Inter-team coordination has no positive relation to team performance, but psychological safety has a significantly high positive correlation to team performance [7].Social agile practices (e.g., daily scrums, retrospectives or pair programming) positively influence psychological safety, transparency, communication and ultimately, productivity [20].
To create a psychologically safe environment, it is vital to establish collective responsibility for team performance [21], [22].Safdar et al. [11] quantitatively investigated knowledge sourcing in new product development teams through a psychological safety lens.Their study's results show that psychological safety plays a significant role in a software engineer's knowledge source selection.A software engineer who feels a high level of psychological safety is inclined to consult team members, whereas a software engineer with a low level of psychological safety tends to choose external sources [11].In the ASD context, to institutionalise psychological safety, individuals, teams and the leadership should combine their efforts to implement strategies for no-blame, open and collective decision-making in the team and proactively supporting a psychologically safe environment [33].
Thorgren and Caiman [38] investigated the role of psychological safety in implementing agile methods across cultures.Their results show that psychological safety is essential for the successful implementation of agile methods in cross-cultural teams.Further, their investigation indicated that by cultivating psychological safety within a team, the possible conflicts and tensions that may arise from the intersection of agile practices, values, and the work environment culture can be reduced [38].
Hennel and Rosenkranz [20] conducted three case studies in two large insurance companies and one software development company.The goal was to investigate the effects of psychological safety and agile practices on team performance.Their results suggest that social agile practices (e.g., daily stand-ups, retrospectives, and Sprint planning) influence psychological safety, transparency, communication, and ultimately productivity [20].

III. RESEARCH SETTINGS
The grounded theory (GT) approach involves a set of steps for data collection, analysis, formulation of theory parameters and reporting [23].The GT helps researchers to identify common patterns across interview transcripts by constantly comparing data at different levels of abstraction [24].This approach does not rely on a preconceived hypothesis rather aims to uncover the interviewees concerns in the process.In this study, the focus was on the experience in LSA development project, working environment challenges and strategies in real-world settings.
We conducted semi-structured interviews with seven agile practitioners from a Scandinavian technology company.The selected case company is a partner in the NODLA project and uses various agile methods in their large-scale projects and product development.NODLA project aiming to investigate large-scale ASD and non-technical debt, funds by the Knowledge Foundation in Sweden.
The interviews were recorded via the Zoom application, each lasting 1-2 hours.These interviewees performed different roles and some have multiple responsibilities.Table 1 shows that interviewees were from diverse roles, including software developers, project managers, Scrum masters, and business analyst.
Out of seven participants, four participants have more than five years of experience, whereas remaining three inter-viewees have 1 -3 years of working experience.All of the study participants had practical agile methods experiences.The interview questions were based on four broad areas: professional background; agile way of working in their team; communication, collaboration and knowledge-sharing practices; and teamwork environment.Each transcript was meticulously analysed by means of line-by-line reading to identify key points.Each identified point was recorded as an open code, which went through an iterative process of comparison throughout the analysis.Such techniques help researchers to check and compare a new code against the previously identified ones [23].

IV. RESULTS
The results of this study are presented in four sub-sections.First, the significance of leaders' behaviour as a key antecedent of fostering psychological safety is emphasised.Second, the importance of leaders' formation of teams with a focus on learning is highlighted.Third, the need to cultivate trusting and respectful interpersonal relation-ships, both inside and outside ASD teams, is noted.Lastly, the findings reveal that a lack of psychological safety within a company contributes to brain drain, highlighting the con-sequences of neglecting this essential aspect of organisational culture.The  Fig. 1 shows leadership role to enable psychological safety environment, whereas Fig. 2 shows its effects in LSA software development projects context.

A. Leader behaviour
The leaders' role is critical for preparing a good work environment where all team members feel comfortable in expressing their thoughts and ideas without fear of criticism or retribution.An interviewee said that paying attention to both customer and employee satisfaction should be the focus: "Our top focus is to be a great place to work and to have happy employees and at the same time, be a customercentric organisation.That's where the agility mindset comes into play because if we have happy customers, then we normally deliver good value to our other stakeholders" (EL5).
Establishing a psychologically safe environment is important as it gives individuals the confidence to speak up if they are unhappy about something.
"I haven't felt at least that people are afraid to speak their minds because people do speak their minds if they are unhappy with something" (EL2).
In such a safe environment, team members can engage in enjoyable activities outside of work, which can foster stronger relationships and promote team cohesion.An interviewee expressed the scenario as follows: "We do a lot of things together, like [when we're] off works and stuff.So, it's fun" (EL1).
However, establishing such a safe environment comes with its challenges.An interviewee highlighted the hidden fear of openly admitting their team's mistakes or underperformance of activities: "

B. Trusting and respectful interpersonal relationships
When the work environment is respectful and trustworthy, the results are always positive despite strict time constraints or deadlines.This is very important in software development as it is a knowledge-intensive activity with many discussions around customers' demands.A psychologically safe environment enables difficult conversations without the need to tiptoe around the truth.In the case company, the team members were supportive and helpful towards one another, and they often worked collaboratively: "If I have a problem, I'm never alone.If I do not act alone, I need to ask someone.If I do that, they will always help me.We do a lot of funny things together.I do not think that we have had any conflicts.It is a really good team, and we are really supporting and lifting up each other.So, I think that everyone can see that our team is very friendly" (EL4).It can also be a sign of team cohesiveness when everyone works towards the same goal.It is noteworthy that being friendly does not mean that professional activities are overlooked.Listening to each team member's opinions is essential to avoid conflicts, as an interviewee explained: "…friendly team is something that we do not have to be too much friends with.We question each other and listen to each other's opinions.I think that one of the reasons why we do not have this conflict.We are very friendly and we don't want to fire our voices if that can lead to a conflict" (EL4).Furthermore, it is important that meetings and discussions at the workplace should not be only work-related.It should also offer an opportunity for team members to connect and engage with one another on a social level.
"Suppose there are problems, how people tell if they're satisfied and if they're ill or something.So it's just like a social meeting as well, not just work" (EL3).

C. Brain drain
Brain drain occurs when employees feel that the work conditions are too demanding or feel a lack of intrinsic motivation or stimulation from their work and a lack of remuneration safety.Attraction and retention of skilled employees require competitive remuneration packages, a safe environment and a collaborative corporate culture.It is reasonable to assume that when employees feel safe psychologically and remuneratively, they are more likely to stay with the company.When a good employee leaves, it has an immediate effect on the team members and their work.An interviewee highlighted such skills gap: "He was a really good programmer, and we miss him a bit" (EL6)."To be brutally honest, I know that some people left last year because they thought that they weren't getting paid enough" (EL2).However, employees' resignation from the company is not just due to the salary; it is a multidimensional factor, for example, caused by the nature of work, the place of work and some personal reasons.A senior team member expressed his observation: "One of the reasons that I've heard is that it's about the

salary. That is important, and [the income] can differ if we live here [a Scandinavian country's capital] permanently as well. [The reasons for quitting] can depend on a lot of things. Some of my closest colleagues and I discuss. Sometimes, it feels like [employees] leave [after just a short time]. They understand things differently than what has actually happened to them" (EL4).
When developers have no internal drive or interest in their work, it can be challenging to retain these less satisfied employees.Intrinsic motivation comes from activities that an individual finds enjoyable or stimulating, even without external rewards.Multiple interviewees highlighted such lack of exciting work, for example: "A risk or a factor that people want to live.It is not fun to have too much [work] to do and not fun [activities] to do; actually [it is] always tricky" (EL1).

"The most common reason is that they get another job offer on something they really want to work with. It has nothing to do with our company. It's more like they're going to work with something they appreciate more" (EL7).
According to another interviewee, individuals leave their jobs because they feel that the work conditions are unsatisfactory and their work is too demanding.
"They think that the conditions are not good enough.
[They] are addicted to having projects; maybe like some months, they have much to do.And then for half a year, it's hard to get projects that they're used to, so they don't have much to do, and they feel under-stimulated and like, 'I want a new job so I can have more tasks to do'" (EL1).

D. Designing a team for learning
Organisations need to develop the idea of designing teams for learning, which involves multiple factors such as an efficient onboarding process, creating a culture of continuous learning and knowledge sharing, reflection and feedback and so on.The starting point for designing a team for learning is to identify the competence development gap and then a good onboarding process for new employees.A point of caution in the onboarding process is whom to involve and when to be involved.When the process includes only senior members of the company, it becomes stressful for them.An interviewee expressed this situation as follows: "We have found that in the management team with the overall responsibility for competence development, that kind of role is sort of missing at the moment.We were working with scale agile.We had to fill in who would be responsible for each role, and we saw that overall competence development was lacking.We have an operation manager who is leading operations but maybe not clearly responsible for competence development" (EL5)."Onboarding is a big issue that we have to work with and maybe not just talk about it.We have to take care of the people who are here and remain with a nice spirit.I think that it is important because if we get bigger and bigger, it puts a lot of pressure on senior consultants, and we have to be careful of them" (EL3).Software development is a knowledge-intensive activity, where knowledge sharing is an important element.An interviewee expressed positive experiences about their safe environment for sharing knowledge: "We have quite recently started knowledge-sharing sessions.One person in our team is responsible for administering these meetings and setting up the agenda.So, we are starting to work with it as it is in our spring planning to have knowledge sharing and talk about how we can do things better.It's an initiative from me or my colleagues who are the value-stream managers" (EL3).
Along with the work practices, another aim was to establish good enterprise social media platforms (e.g., Slack, Microsoft Teams, etc.) for internal communication and social interaction within the company.

V. LIMITATIONS AND THREATS TO VALIDITY
We collected the data from interviews with software professionals from a Scandinavian software company.All the codes and concepts were directly obtained from the interviews.Our findings are sufficiently grounded in the substantive data [23] but cannot be generalised on a large scale due to the limited number of participants.Therefore, caution should be taken when applying these results to other software companies.The inherent limitation of the GT is that it is only based on a particular investigative context [25].
James and Busher [26] highlighted the risk regarding the authenticity of the participants in digital interviews.We were confident that all the participants were interviewed with the permission of the company representative and with a signed NDA.In this way, such risks are mitigated in this study.The GT approach used in this study involved subjective interpretation of the data.The findings and the emerging concepts presented in this study are based on the researchers' interpretation of the data, which may differ from other researchers' interpretations.Despite these limitations, this study's findings offer valuable insights into psychological safety, leadership and NTD in LSA development.The concepts are sufficiently supported with quotations from the participants' interviews, and the findings are discussed in detail and characterised by some existing concepts.

VI. DISCUSSION AND
In this study, we explored the antecedents and effects of psychological safety on LSA teams.The results suggest that building a psychologically safe environment is a multidimensional factor that requires a proactive leadership approach, a competent team design that focuses on learning, open communication and feedback, remuneration safety, and a well-prepared onboarding process for new team members.These factors contribute to effective teamwork, work satisfaction and learning, as well as promote a safe and collaborative learning environment.
Our results show that a psychologically safe environment can be enabled through enjoyable activities outside of work that also foster stronger relationships and promote team cohesion that is less prone to conflicts.In a software development project, team cohesion magnifies the impact of psychological safety on knowledge sharing [27].Psychological safety directly contributes to effective [28].The lack of psychological safety contributes to social and people's debts [8], [14], whereas a high level of psychological safety has significant positive correlations to LSA team performance [7] and the success of process innovations [17], mitigating effects of the lack of both communication and collaboration [8].
To create a more psychologically safe environment, leaders and the management should show appreciation for employees [19] and provide opportunities for their involvement in projects so that they can learn from their mistakes and failures.Detert and Burris [39] revealed a positive correlation between the managers' openness and transformational leadership with psychosocial safety.The management needs to identify competence gaps and design teams for learning.It is also evident that providing room for reflection and open feedback is important; otherwise, individuals or teams will hide their real troublesome situations.High-quality interpersonal relationships among the team members enhance their psychological security, leading to positive and effective learning [16,32] and sharing behaviours [29].Trust and organisational support are enablers of psychological safety at work [16].Our results show that trusting and respectful interpersonal relationships in LSA teams help avoid conflicts and prepare a breeding ground for a safe and collaborative learning environment.Dreesen et al [14] and Ahmad et al [2] reported that lack of psychological safety in software development contributes to social debt.
A key manifestation of high-quality relationships is relational coordination, along with shared goals, shared knowledge and mutual respect [30], [31].Relational coordination is ''a mutually reinforcing process of interaction between communication and relationships carried out for the purpose of task integration'' [30](p.301).This is more important in software development as this knowledgeintensive activity requires creativity in solving a particular problem and completing a task.This recommendation would enable double-loop learning instead of a single loop in teams.
Agile teams strive for continuous improvement through recurrent feedback and introspection [40].Psychological safety cultivates an environment wherein team constituents are enabled to provide and accept valuable feedback and facilitate learning [34].While multiple studies in the realm of social sciences demonstrate that PS cultivates learningoriented actions like soliciting feedback, experimentation, and deliberation of mistakes [6], [9], its pivotal role in LSA has not been recognised.The nature of ASD entails intricate knowledge that is collectively shared among multifaceted teams and evolves swiftly.
Edmondson highlighted psychosocial safety importance and its impact on learning within team and performance [6].It is also important to design teams for learning and have a well-prepared onboarding process for new employees.It is vital to know whom to involve and when to involve senior members of a team or a project because it builds pressure on senior consultants and creates the need to take care of existing teams while remaining focused on company growth.It is interesting to note that despite the psychologically safe environment, the company noticed a brain drain due to the lack of both remuneration safety and intrinsic motivation and an office location far from the employees' families and friends.These findings highlight the importance of providing remuneration safety and addressing the factors that may lead to employee turnover.More research is needed to explore these issues in greater depth and develop strategies for solving them.
Future research should prioritise investigating the relations among organisational culture, employee diversity and psychological safety, as well as their impacts on team building, job satisfaction and performance.This includes addressing the reasons why knowledgeable team members leave the company.Another important area of study involves identifying competence gaps and designing teams that prioritise learning, including effective methods for assessing individual and team competencies, strategies for fostering continuous learning, proactive leadership and the significance of providing opportunities for reflection and open feedback.Additionally, exploring the influence of social activities on team cohesion and conflict prevention can provide insights into fostering strong relationships.It is also essential to investigate factors beyond psychological safety, such as remote work, intrinsic motivation and office location proximity to family and friends, in order to mitigate their impacts, prevent brain drain and enhance employee satisfaction and loyalty while creating inclusive and supportive environments for LSA teams and projects.
In conclusion, this study offers the above-mentioned recommendations.Overall, a psychologically safe environment can foster increased confidence, collaboration, communication, motivation and job satisfaction of individuals and teams.Finally, exploring both task and social cohesion regarding learning and performance in LSA teams and projects would be of interest.We posit that future research has the potential to delve into the impacts and advantages of psychological safety on the intricacies of agile teams and their effectiveness to develop and deliver software products.In light of this, we intend to expand upon the present study by examining the influence of psychological safety on software quality, individual and team learning.

Fig 1 .
Fig 1. Leadership role to enable psychological safety environment for LSA Software Development

Fig 2 .
Fig 2. Psychological safety environment and its effects for LSA software development 332PROCEEDINGS OF THE FEDCSIS.WARSAW, POLAND, 2023

TABLE I .
INTERVIEWEES BACKGROUND MUHAMMAD OVAIS AHMAD: PSYCHOLOGICAL SAFETY, LEADERSHIP AND NON-TECHNICAL DEBT IN LARGE SCALE AGILE 329 It's very helpful to reflect and always keep in mind whatwe can do better and change next time.It is a problem to tell the truth if [there is] something that you think did not go as well as you wanted to.Maybe I can be a little bit scared to tell the whole truth.I think that could be a problem" (EL1).