October 26, 2026
Framework with Generative AI to Increase the Accuracy of Agile Estimates via Pull Requests
Mayk Henrique dos Santos Moreira; Daniele Aparecida Cicillini Pimenta
DOI: 10.22167/2675-6528-202601224
Article prepared by the ResumeAI tool, an artificial intelligence solution developed by the Pecege Institute focused on synthesis and writing.
Summary
The imprecision in effort estimations in agile methodologies, especially in backend projects, constitutes a persistent challenge, as traditional metrics often fail to capture technical complexity. With the objective of identifying technical complexity patterns specific to the development context, a methodological framework for analyzing pull requests with the support of generative artificial intelligence (AI) was developed and validated. The research, of an applied nature and with an exploratory-descriptive mixed approach, collected 100 pull requests from the Spring Framework repository via the GitHub GraphQL API. The data were organized and analyzed quantitatively by descriptive statistics and percentiles, and qualitatively with structured prompts in a large language model. The generated report was submitted for evaluation by agile development professionals through a structured questionnaire, which assessed clarity, practical utility, and intention to use. The results indicated a positive evaluation by the specialists, with the majority positioning the recommendation in the range of 7 to 8, suggesting that contextual analysis of historical repository data, combined with generative AI, can offer useful indicators to support planning decisions. However, sample and scope limitations recommended caution in generalizing the findings.
Keywords: Technical Complexity; Software Estimation; Project Management; Agile methodologies; Large Language Models.
1. Introduction
The adoption of agile methodologies represented a significant transformation in software project management, promoting a more flexible and adaptive approach compared to traditional waterfall models. As highlighted by Sutherland (2014), agility emphasizes collaboration, incremental value delivery, and responsiveness to change, fundamental principles for dynamic development environments. However, the transition to such methodologies implies not only the adoption of new tools but a profound organizational change management, as addressed by Cordeiro (2014), where cultural adaptation is as crucial as process implementation.
Despite the advances, one of the persistent challenges in this context is the imprecision in effort estimates for development tasks, particularly in backend projects. In these projects, technical complexity is often not fully captured by traditional metrics, such as “story points” and “velocity”. As discussed by Cohn (2006), although “Planning Poker” and other relative estimation techniques are useful, they still depend substantially on individual intuition and experience, potentially neglecting hidden technical variables. This limitation generates a cascade of problems, including unrealistic deadlines, team overload, and stakeholder dissatisfaction, compromising the effectiveness of the agile process.
In this scenario, the analysis of the “Pull Requests” (PRs) history emerges as a valuable source of objective data on the real development dynamics. Works such as those by Bosse (2019) and Ribeiro Neto (2023) have already shown that code metrics and collaboration patterns in repositories can reveal insights into project health and team productivity. However, extracting actionable indicators from this data traditionally requires expertise in software mining or statistical analysis, creating a barrier to access for most teams. The rise of natural language models, such as “Large Language Models” (LLMs), offers an opportunity to democratize this analysis, allowing teams to conduct complex contextual investigations in an accessible way.
This work therefore proposes the development and validation of a methodological framework that allows agile teams to analyze their own PR history through generative Artificial Intelligence (AI), identifying technical complexity patterns specific to their context. The method aims to translate raw metrics, such as number of files changed, time to “merge”, and volume of reviews, into understandable managerial indicators, without the need for training “machine learning” models.
The central motivation of the research lies in filling a practical gap: the lack of lightweight tools that integrate historical development data into the agile planning cycle, supporting project management that is more evidence-based and less vulnerable to cognitive biases. The research has academic relevance by exploring the application of generative AI for the analysis of software repositories in a methodologically guided manner. In the professional sphere, it offers managers a practical instrument to increase the predictability and reliability of planning.
The problem investigated is: how can agile teams use generative AI to analyze their PR history and, based on this, generate indicators that improve the accuracy of complexity estimates? Therefore, the present study aimed to develop and validate a methodological framework for analyzing pull requests with the support of generative AI, aiming to identify technical complexity patterns specific to the development context.
2. Material and Methods
The research was applied in nature, with a mixed methodological approach that integrated qualitative and quantitative elements. Regarding the objectives, the study was classified as exploratory-descriptive, aiming at the development of a methodological framework and the description of its practical application in agile development contexts. A multiple case study strategy was adopted, according to Yin’s (2015) guidelines, to analyze the framework’s behavior in different contexts and confer robustness to the findings through replication.
The unit of analysis consisted of three open-source repositories representative of the “backend” ecosystem: Spring-Framework, Elasticsearch, and Kubernetes. Each repository was treated as a case unit. The criteria for selecting these repositories included the presence of at least fifty integrated pull requests (PRs) in the last twenty-four months, diversity in task types (such as “bugfix”, “feature”, “refactor”, and documentation), and continuous development activity, with at least five PRs per month. Additionally, widely accepted open-source licenses such as MIT, BSD, Apache 2.0, and GNU General Public License version 3 (GPLv3) were considered.
The data collection involved two main sources of evidence. Firstly, documentary data were extracted directly from repositories via the GitHub API, covering information on pull requests, commits, and reviews. Secondly, questionnaires were applied to professionals with experience in agile development, who assessed the clarity, relevance, and perceived usefulness of the reports generated by the framework. This triangulation of sources was employed to increase the validity and reliability of the study, following the recommendations of Yin (2015).
The data collection protocol was standardized and executed in two stages. The first stage consisted of defining the repositories to be analyzed, according to the established criteria. The second stage involved the automated collection of pull requests. The GitHub programmatic interfaces, specifically the Representational State Transfer (REST) type Application Programming Interface (API) and the GraphQL API, were the main tools used for the systematic extraction of metadata from the repositories.
To operationalize and automate the flow of requests to the GitHub APIs, a hybrid approach was employed. In the prototyping and validation phase, the Insomnia API client was used to facilitate the creation, sending, and debugging of HTTP calls (REST/GraphQL). For automated and scaled execution of data collection, the validated queries were implemented in a custom Python script, which managed API pagination and request rate, persisting data in a structured manner and implementing error handling, ensuring efficiency and accuracy.
The execution of the collection script was manual and interactive. The user initiated the script via command line, providing as input an API authentication token, the repository owner’s name (e.g., spring-projects), the repository name (e.g., spring-framework), and the desired quantity of pull requests to be collected, with a default of one hundred. The script then automatically initiated the collection sequence, which occurred on January 24, 2026, covering one hundred merged pull requests per repository.
The raw data, initially in JSON format, were structured into Comma-Separated Values (.csv) files and converted to tabular format using Google Sheets spreadsheets. Each CSV file unified by repository contained the PR identification (number, title, dates), quantitative metrics, and qualitative context. Quantitative metrics included the unique PR identifier, creation date, merge date, time to merge (in hours), number of files changed, lines of code added, lines of code removed, total lines changed, total comments, and total reviews received, in addition to a change request indicator.
The technical and qualitative context of the pull requests was captured through variables such as the PR title, the full PR description, the main module, related modules, the list of labels (e.g., “type: bug”, “status: blocked”), the inferred task type, and the grouping of messages from all commits. This information was organized to provide a comprehensive empirical basis for subsequent analyses, both quantitative and qualitative.
The quantitative analysis of the data was automated through a self-authored Python script, named `convert_to_csv.py`, developed specifically for this work. This script utilized native Python libraries, such as `math` for mathematical calculations, `json` and `csv` for data manipulation, and `datetime` and `time` for processing time intervals and managing API request limits. This automation ensured the reproducibility, consistency, and accuracy of the calculations.
The quantitative analysis was conducted based on descriptive statistics, following Triola’s (2024) approach. Initially, the arithmetic mean was calculated to identify the central value of the analyzed variables (time to merge, changed files, and modified lines). To quantify dispersion, the sample standard deviation was used. Aiming for a robust understanding of variability, the interquartile range (IQR) was calculated. Based on the IQR, Tukey’s (1977) criterion was applied to identify outliers. The classification of pull request complexity was performed using Hyndman and Fan’s (1996) percentiles.
For the qualitative analysis of the data, Large Language Models (LLMs) were employed. ChatGPT (GPT-4), developed by OpenAI (2023), was used for its capabilities in contextual understanding and complex reasoning. DeepSeek AI (DeepSeek AI, 2024) was applied as an open-source alternative. Both models were employed to allow for a systematic comparison of their outputs and the cross-referencing of perspectives, enriching the interpretation.
In this analysis stage, structured prompts were applied, organized into sections such as repository contextualization, quantitative data presentation, technical complexity pattern classification, and actionable recommendation generation. This approach aimed to create a methodology accessible to managers without the need for in-depth technical expertise, extracting complexity patterns from historical data through a sequential roadmap that simulated specialized analysis.
The framework’s validation was carried out by evaluating the perception of professionals with experience in software development regarding the generated reports. Participants were invited through convenience sampling on professional networks, with the aim of obtaining between fifteen and twenty respondents with profiles aligned with the study’s objective. A self-administered structured questionnaire, developed on the Google Forms platform, was used to measure the framework’s clarity, practical utility, and intention to use.
The questionnaire was organized into three sections: participant profile (role, seniority, experience duration, participation in agile projects, and involvement in review and planning processes), a quick assessment with mandatory questions on the overall clarity of the report, intention for practical use, and framework recommendation, and an optional detailed assessment. Participants received the generated report via electronic message, along with the link to the questionnaire. Quantitative data were treated by descriptive statistics, and open-ended responses were submitted to content analysis.
From an ethical point of view, the guidelines of Resolution CNS No. 510/2016 were observed. Responsible use of public data, anonymization of contributors, and respect for the software licenses involved were ensured. The confidentiality of any non-open-source organizations and repositories that might be directly or indirectly related to the framework validation stage was preserved, maintaining due attribution to the public repositories and APIs used during the research.
3. Results and Discussion
The application of the developed methodological framework revealed crucial insights into the analysis of technical complexity in software projects, demonstrating the viability of a hybrid approach that combines controlled algorithmic processing with contextual interpretation provided by generative artificial intelligence. Initially, it was observed that the attempt to employ large language models directly for the collection, calculation, and statistical analysis of pull requests resulted in significant inconsistencies, imprecise calculations, and a notable lack of standardization. This limitation underscored the inadequacy of general-purpose LLMs for tasks requiring mathematical rigor and scientific reproducibility, highlighting the need for a more structured pipeline to ensure data reliability.
In response to this finding, the research implemented a two-stage distinct analytical pipeline. The first phase involved the development of a Python script dedicated to the standardized collection of pull request data, utilizing the GitHub GraphQL API. The second stage consisted of another Python script, responsible for the rigorous statistical processing of the data, applying established formulas such as mean, standard deviation, interquartile range, Tukey’s criterion for outlier identification, and Hyndman and Fan’s (1996) percentile classification. The successful application of this pipeline to three large-scale open-source repositories — Elasticsearch, Spring Framework, and Kubernetes — generated a consolidated and reliable dataset, validating the superiority of a controlled algorithmic approach for the quantitative phase of the analysis.
The quantitative data collection and processing was executed entirely, covering the extraction of 100 merged pull requests from each repository. This procedure, automated by a custom Python script, overcame the inconsistencies previously identified with the direct use of LLMs. For each of the analyzed repositories, the script produced a standardized and comprehensive set of analyses, focusing on three main metrics: Time to Merge, Changed Files, and Lines Modified. This organization allowed for a detailed view of each metric’s behavior, essential for understanding the technical complexity inherent in each project.
For each of the central metrics, five sequential and complementary blocks of information were generated, providing a multifaceted understanding of the data. These included basic descriptive statistics, such as the number of observations, minimum, maximum, mean, and median values, offering an initial grasp of the distribution. Subsequently, dispersion measures were calculated, including standard deviation, variance, coefficient of variation, and interquartile range, to quantify data variability. The identification of quartiles and percentiles established important benchmarks in the distribution, while Tukey’s criterion (1977) was applied to flag atypical cases or outliers requiring specific attention.
Finally, percentile classification, according to the methodology by Hyndman and Fan (1996), translated the data into understandable qualitative categories, such as “Very Low”, “Low”, “Medium”, “High”, and “Very High”. This classification system is fundamental to the framework’s proposal, as it allows teams to understand the general behavior of metrics, identify exceptions, and classify new events based on their own development history. The essence of the approach lies in the ability to transform raw metrics into intuitive and actionable categories, facilitating managerial decision-making.
The analysis of quantitative data revealed a significant disparity in complexity classification thresholds among different repositories, which underscores the need for contextualized metrics. For instance, it was observed that a pull request altering 10 files would be classified as “Medium” complexity in the Elasticsearch repository, where the range for this category was 2 to 11.74 files. However, the same pull request would be considered “Very High” complexity in the Spring Framework, where the range for this category started at 5 files or more. This drastic variation demonstrates that universal complexity thresholds applicable to all projects do not exist.
Similarly, a pull request involving the modification of 200 lines of code would be categorized as “Very High” for the Spring Framework project, but only as “Medium” for the Kubernetes project. This discrepancy in classification thresholds reflects the unique development profiles and contribution patterns of each ecosystem. Such a finding is crucial, as it allows a manager, in the context of the Spring Framework, for example, to establish a data-driven policy, such as “pull requests classified as ‘Very High’ in lines (≥104) require prior review by an architect.” The framework, therefore, provides a factual and specific basis for team planning decisions.
Regarding qualitative processing, large language models (LLMs), such as ChatGPT (GPT-4) and DeepSeek, were employed to interpret the data and generate contextual reports. The prompt elaboration for the LLM followed a careful process, starting from the premise that these models are not precise calculators, but can act as organized assistants to structure thinking. The objective was to guide the LLM through a predefined analytical roadmap, asking it to act as a senior analyst, capable of transforming historical data into actionable insights for agile team management, without the need for complex calculations.
The prompt was structured to include sequential steps, starting with the contextualization of the repository, moving on to the presentation of quantitative data, classification of technical complexity patterns, and finally, the generation of actionable recommendations. To avoid digressions and ensure conciseness, a “report of maximum 2 A4 pages” was requested, with a specific format. Furthermore, to mitigate hallucinations, the prompt emphasized that the model should rely “only on the information provided”, reinforcing that it should not invent data or information. This approach aimed to produce a clear, practical, and useful output for managers.
The iterative process of testing and refining the initial prompt utilized real data from the studied repositories. The quality assessment of the generated report focused on the usefulness and coherence of the response, rather than mathematical precision. Three main questions guided the adjustments: the logical connection between observations and recommendations, the explicit use of quantitative data in the conclusions, and the practicality of the recommendations. Successive adjustments made the prompt more specific, allowing the LLM to produce more contextualized and interconnected analyses, correlating numbers with descriptive information, as exemplified by the partial report generated for the Spring Framework, which detailed types of tasks and the most impacted modules.
Although the LLM does not provide a perfect analysis, with predictions based on language and not exact calculations, prompt refinement resulted in a tool of practical value for agile development. The final prompt acts as a reasoning roadmap, complementing expert human analysis by translating raw data into an initial narrative that can accelerate screening, planning, and evidence-based decision-making. This approach highlights the importance of controlled algorithmic processing for the quantitative stage, followed by qualitative interpretation assisted by generative AI.
The need for controlled algorithmic processing, which motivated the development of original Python scripts, is supported by previous works, such as Ribeiro Neto (2023). Ribeiro Neto’s (2023) research also adopted the principle that raw data extracted from GitHub requires a dedicated business layer to be transformed into reliable metrics, such as production rate and commit rate. This convergence between studies reinforces the idea that raw data, as made available by the GitHub API, requires prior algorithmic processing to generate actionable and reliable insights.
However, this study diverges from Ribeiro Neto’s (2023) approach in a fundamental aspect. While Ribeiro Neto’s (2023) GMC platform concludes its contribution with the presentation of processed data through indicators, tables, and graphs, the results of this research demonstrate that the mere display of metrics is not sufficient. The drastic variation in classification limits between different projects highlights the need for an additional step: the contextualized interpretation of these numbers. It is precisely this function that has been delegated to the LLM in the qualitative stage of the proposed framework, positioning this work as a natural extension of research focused solely on the extraction and display of metrics.
The human dimension of metrics was a central concern that guided the development of the prompt for qualitative analysis, echoing the research of Bosse (2019). Bosse (2019) developed a tool to automate the collection of Kanban metrics, addressing users’ pain related to manual transcription of GitHub data. In an analogous way, this study addresses the frustration generated by systematically inaccurate estimates, a human problem that affects stakeholder confidence, developer stress, and the feeling of collective failure when deadlines are consistently missed.
The external validation of the framework, carried out through a structured questionnaire with agile development professionals, provided important evidence about the model’s acceptance. Although the sample was small, most respondents positioned the framework’s recommendation in the 7 to 8 range, indicating a positive assessment of perceived usefulness. Experts recognized the relevance of information on pull request flow and the relationship between time and delivery as crucial metrics for Agile methodologies. However, the criticisms received, especially regarding the presentation of quantitative indicators and the need for contextual calibration of thresholds, pointed to concrete opportunities for improvement that would not have been identified without this external validation.
In summary, the proposed and validated methodological framework offers a replicable path for agile teams to build complexity classification systems adapted to their reality, based on their own historical pull request data. The combination of robust algorithmic processing for quantitative data extraction and analysis with the contextual interpretative capacity of generative AI has proven effective in translating raw metrics into actionable managerial indicators. This approach does not replace human decision-making but informs it with concrete evidence, reducing subjectivity and variability in effort estimations, thus contributing to more grounded and predictable project management.
4. Conclusion
The present study aimed to develop and validate a methodological framework for analyzing pull requests with the support of generative artificial intelligence, seeking to identify technical complexity patterns specific to the development context. It was found that the direct application of large language models for quantitative analysis of pull requests resulted in inconsistencies and inaccuracies, highlighting the need for a structured analytical pipeline. To this end, a two-step approach was implemented: a Python script for standardized data collection via the GitHub GraphQL API and another for rigorous statistical processing, which included calculation of means, standard deviation, interquartile range, and classification by percentiles. This algorithmic methodology proved superior for the quantitative phase, generating reliable data on time to merge, files changed, and lines modified. The quantitative analysis revealed that complexity classification thresholds vary significantly across different repositories, underscoring the absence of universal patterns and the importance of contextualized metrics. In the qualitative phase, large language models were employed to interpret this data and generate contextual reports, with prompt refinement resulting in actionable insights for management. The framework’s main contribution lies in offering a replicable path for agile teams to build complexity classification systems adapted to their reality, transforming raw metrics into managerial indicators that support planning and reduce subjectivity in effort estimations.
External validation, although conducted with a small sample of professionals, indicated a positive perception of the framework’s practical utility, with most experts recommending its use. However, the study’s limitations include the restricted sample for the validation questionnaire and the absence of practical application in real teams, which restricts statistical generalization and characterizes the validation as conceptual, rather than of longitudinally measured effectiveness. As future developments, it is suggested to validate the framework in real contexts with longitudinal monitoring of teams, improve the presentation of quantitative indicators for non-technical managers, expand the metrics to include variables such as comment density and number of reviews, and investigate the variability among different large language models in the qualitative stage. The proposed framework, therefore, informs human decision-making with concrete evidence, without replacing it, contributing to more informed and predictable project management.
Bibliographic References
Bosse, J. 2019. Implementação de Métricas Ágeis Integradas à Plataforma GitHub. Trabalho de Conclusão de Curso em Ciências da Computação. Universidade Federal de Santa Catarina, Florianópolis, SC, Brasil.
Cohn, M. 2006. Agile Estimating and Planning. Prentice Hall.
Cordeiro, J.H.D. 2014. Ambidestria em Empresas Desenvolvedoras de Software: Barreiras para Adoção de Metodologias Ágeis e seu Impacto no Modelo Organizacional. Dissertação de Mestrado em Engenharia de Produção. Escola Politécnica, Universidade de São Paulo, São Paulo, SP, Brasil.
DeepSeek AI. 2024. DeepSeek-V1 Technical Report. Disponível em: <https://arxiv.org/pdf/2401.02954>. Acesso em: 27 out 2025.
Hyndman, R.J.; Fan, Y. 1996. Sample Quantiles in Statistical Packages. The American Statistician 50(4): 361-365.
OPENAI. 2023. GPT-4 Technical Report. Disponível em: <https://cdn.openai.com/papers/gpt-4.pdf>. Acesso em: 27 out 2025.
Ribeiro Neto, M.S. 2023. Plataforma para Acompanhamento de Métricas de Processo e Projeto de Software a Partir de Dados Extraídos do GitHub. Dissertação de Mestrado em Tecnologia da Informação. Instituto Federal de Educação, Ciência e Tecnologia da Paraíba, João Pessoa, PB, Brasil.
Sutherland, J. 2014. Scrum: A Arte de Fazer o Dobro do Trabalho na Metade do Tempo. Leya, São Paulo, SP, Brasil.
Triola, M. F. 2024. Introdução à Estatística. 14ed. Editora LTC, Rio de Janeiro, RJ, Brasil.
Tukey, J. W. 1977. Exploratory Data Analysis. Editora Pearson, Mass, EUA.
Yin, R.K. 2015. Estudo de Caso: Planejamento e Métodos. 5ed. Bookman, Porto Alegre, RS, Brasil.
Article originating from the Final Course Work of the Specialization in Software Engineering of the MBA USP/Esalq
To learn more about the course, click here and access the MBX Academy platform