AIM: This study explores whether personality-based role assignments (Pilot, Navigator, Solo) can raise intrinsic motivation in pair programming, focusing on designing a framework and process extension for the resource-constrained environment of very small entities (VSEs). METHOD: We employed a mixed-methods design across three quasi-experimental datasets (n = 73 participants), applying linear mixed-effects (LME) modeling to assess motivational outcomes and thematically analyzing (n = 25) interviews for socio-psychological insights. FINDINGS: Openness strongly correlates with Pilot roles; Extraversion & Agreeableness favor Navigator roles; and Neuroticism aligns more comfortably with Solo roles-each yielding substantial boosts in intrinsic motivation (up to 60-65%). Twelve qualitative themes underscore the influence of mentorship, pairing constellations, and flow disruptions on developer experiences. IMPLICATIONS: Building on these results, we propose the role-optimization motivation alignment (ROMA) framework, mapped to the ISO/IEC 29110 Software Basic Profile and Agile Guidelines, with practical tasks (T1-T7) to facilitate systematic role-trait alignments in small agile teams. Although our data primarily involve Gen-Z undergraduates, the recurring patterns suggest broader applicability, further supported by a separately published application for ongoing generalizability. CONCLUSION: Personality-driven role optimization may significantly enhance collaboration and developer satisfaction in VSEs, though further studies in professional settings and investigations into AI-assisted or distributed pair programming are warranted.