Paper deep dive
From Helpful to Trustworthy: LLM Agents for Pair Programming
Ragib Shahariar Ayon
Intelligence
Status: succeeded | Model: google/gemini-3.1-flash-lite-preview | Prompt: intel-v1 | Confidence: 95%
Last extracted: 4/14/2026, 2:09:14 AM
Summary
This doctoral research proposes a multi-agent LLM pair-programming framework (driver-navigator) designed to improve the trustworthiness and auditability of AI-generated code. By utilizing formal specifications, automated verifiers, and solver-backed counterexamples, the research aims to shift trust from model outputs to externally verifiable evidence, supporting tasks like code generation, maintenance, and documentation.
Entities (5)
Relation Signals (3)
Ragib Shahariar Ayon → developed → AutoReSpec
confidence 100% · In our initial study on formal specification generation, we introduced AutoReSpec
Ragib Shahariar Ayon → developed → AutoJML
confidence 100% · Building on these results, we developed AutoJML to study the impact of ReAct-based LLM agents
Multi-Agent System → utilizes → Formal Verification
confidence 90% · We address this by constraining the navigator to produce machine-checkable contracts and formal specifications
Cypher Suggestions (0)
No Cypher suggestions yet.
Abstract
Abstract:LLM-based coding agents are increasingly used to generate code, tests, and documentation. Still, their outputs can be plausible yet misaligned with developer intent and provide limited evidence for review in evolving projects. This limits our understanding of how to structure LLM pair-programming workflows so that artifacts remain reliable, auditable, and maintainable over time. To address this gap, this doctoral research proposes a systematic study of multi-agent LLM pair programming that externalizes intent and uses development tools for iterative validation. The plan includes three studies: translating informal problem statements into standards aligned requirements and formal specifications; refining tests and implementations using automated feedback, such as solver-backed counterexamples; and supporting maintenance tasks, including refactoring, API migrations, and documentation updates, while preserving validated behavior. The expected outcome is a clearer understanding of when multi-agent workflows increase trust, along with practical guidance for building reliable programming assistants for real-world development.
Tags
Links
- Source: https://arxiv.org/abs/2604.10300v1
- Canonical: https://arxiv.org/abs/2604.10300v1
Trouble viewing inline? Open PDF directly →
Full Text
14,073 characters extracted from source content.
Expand or collapse full text
From Helpful to Trustworthy: LLM Agents for Pair Programming Ragib Shahariar Ayon ∗ Texas State University San Marcos, TX, USA ipd21@txstate.edu Abstract LLM-based coding agents are increasingly used to generate code, tests, and documentation. Still, their outputs can be plausible yet misaligned with developer intent and provide limited evidence for review in evolving projects. This limits our understanding of how to structure LLM pair-programming workflows so that artifacts remain reliable, auditable, and maintainable over time. To address this gap, this doctoral research proposes a systematic study of multi- agent LLM pair programming that externalizes intent and uses development tools for iterative validation. The plan includes three studies: translating informal problem statements into standards- aligned requirements and formal specifications; refining tests and implementations using automated feedback, such as solver-backed counterexamples; and supporting maintenance tasks, including refactoring, API migrations, and documentation updates, while preserving validated behavior. The expected outcome is a clearer understanding of when multi-agent workflows increase trust, along with practical guidance for building reliable programming assistants for real-world development. CCS Concepts • Software and its engineering→Formal software verifica- tion. Keywords Agentic AI, Large Language Model, Pair Programming ACM Reference Format: Ragib Shahariar Ayon. 2026. From Helpful to Trustworthy: LLM Agents for Pair Programming . In 34th ACM Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering (FSE Companion ’26), July 5–9, 2026, Montreal, QC, Canada. ACM, New York, NY, USA, 2 pages. https://doi.org/10.1145/3803437.3804875 1 Introduction LLM-based coding agents are increasingly used for code genera- tion, repair, and interactive assistance. Despite strong empirical performance, developers may still be cautious about relying on these tools as fully autonomous collaborators in realistic projects, since their outputs can appear plausible while remaining misaligned with developer intent and therefore still require human scrutiny [7, 10, 13, 15]. Improving trust in LLM-assisted development requires ∗ Advisor: Shibbir Ahmed, Assistant Professor, Texas State University, TX, USA. This work is licensed under a Creative Commons Attribution 4.0 International License. FSE Companion ’26, Montreal, QC, Canada © 2026 Copyright held by the owner/author(s). ACM ISBN 979-8-4007-2636-1/26/07 https://doi.org/10.1145/3803437.3804875 workflows that make intent explicit, enable systematic validation, and produce evolution-ready artifacts [9]. We study a multi-agent system (MAS) in which a driver agent proposes artifacts and a navigator agent critiques them, each operat- ing through role-specific prompts and separate interaction histories while sharing a persistent project context. Both roles are occupied by LLM agents, instantiated either as the same base model under different prompts or as models specialized for generation and re- view. We choose this driver-navigator design over a single-agent setup because it provides a minimal and interpretable separation between proposal and critique, and prior work suggests that such role specialization can improve code quality through structured, iterative feedback [14]. A natural concern with this setup is that, if the navigator is itself an LLM, the developer may simply be trading one auditability problem for another [7,13]. We address this by constraining the navigator to produce machine-checkable contracts and formal specifications rather than free-form judgments, which are then validated by deterministic verifiers that return proofs or counterexamples [3–5,8]. Trust thus shifts away from one model’s assessment of another and toward externally verifiable evidence, leaving the developer with one concrete responsibility: confirming that the specification captures their intent. Initial results show that verifier-guided LLM-based specifica- tion synthesis, through iterative feedback, improves correctness and completeness. Building on this, we plan to investigate pair- programming LLM agents as an end-to-end, evidence-driven work- flow that translates intent into standards-aligned requirements and formal specifications, refines code and tests via automated feedback (e.g., SMT-based counterexamples), and sustains artifacts across software evolution. 2 Background and Related Work Requirements and context generation: ArchCode extracts func- tional and non-functional requirements to guide code and test gen- eration [6], and SpecGen and AutoReSpec generate and refine veri- fiable specifications using verifier feedback [3,8]. These tools, how- ever, target specification generation in isolation rather than embed- ding requirement elicitation within a pair-programming workflow. Our preliminary work begins to address this [2,3], but how a driver- navigator pair can co-produce standards-aligned requirements and formal specifications remains an open question. Code and test generation with automated feedback: Au- toCodeRover and SpecRover couple iterative code search with patch generation and specification inference [10,15], Tian et al. improve equivalent mutant detection via code embeddings [11]. These ef- forts operate in single-agent or single-stage settings and do not expose solver-backed counterexamples as auditable artifacts within a driver–navigator loop. Our proposed TDD study will examine arXiv:2604.10300v1 [cs.SE] 11 Apr 2026 FSE Companion ’26, July 5–9, 2026, Montreal, QC, CanadaRagib Shahariar Ayon whether such a setup improves consistency with requirements and produces more trustworthy, reproducible feedback. Maintenance and repository-scale evolution: Tufano et al. translate natural-language review comments into code transforma- tions [12], and Abreu et al. predict risky diffs to support stability- preserving gating at scale [1]. Neither uses pre-existing specifi- cations and test suites as behavioral constraints to confirm that changes preserve validated behavior. Our proposed maintenance study will investigate whether anchoring refactoring, dependency upgrades, and documentation updates to such constraints reduces regressions and keeps generated artifacts trustworthy. 3 Research progress and plan Research Progress. In our initial study on formal specification generation, we introduced AutoReSpec, a verifier-guided collabo- rative LLM framework for JML synthesis that classifies programs by structural complexity, selects a pair of primary and fallback LLM pair, and iteratively refines specifications using verifier feed- back; when the primary model fails, a collaborative fallback model receives the last failed candidate and verifier errors for focused recovery [3]. On a 72-program benchmark, AutoReSpec verified 67 programs, achieving a 58.2% success probability and 69.2% complete- ness, while reducing the average evaluation time by 26.89% over prior methods. Building on these results, we developed AutoJML to study the impact of ReAct-based LLM agents on specification generation. AutoJML automates JML specification synthesis via iterative verification and mutation-driven completeness feedback, and additionally leverages web-based context retrieval [2]. On a 120- program benchmark, AutoJML verified 109 programs, achieving an average completeness of 79.3%, with significant improvements over state-of-the-art baselines on challenging control-flow patterns, including multi-path loops (81.48%) and nested loops (85.71%). Future Plan. We want to investigate workflows in a pair pro- gramming, multi-agent setting, where driver and navigator LLMs use requirements and specifications to iteratively refine tests, im- plementations, and maintenance updates. Refinement is guided by automated feedback signals, including SMT-based counterexamples, while tests and specifications constrain changes to preserve vali- dated behavior across refactoring, documentation, and upgrades. We study the following research question: How effective is the workflow at producing tests and implementations that are consis- tent with requirements and specifications? How do solver-backed counterexamples and automated feedback influence refinement behavior, and which types of programs benefit most? How does feedback affect trustworthiness, measured by pass rates, inconclu- sive outcomes, and reproducibility of failures? How well can agents perform maintenance tasks while preserving existing behavior? How effective are test and specification constraints at preventing regressions during iterative maintenance and migration? How ac- curate and useful are the generated documentation artifacts, and do they introduce misleading or biased statements? 4 Conclusion This doctoral research aims to shift multi-agent LLM pair program- ming from helpful assistance to trustworthy support in real-world software development. We will study a driver-and-navigator setup to quantify when multi-agent collaboration improves reliability and trust signals relative to single-agent baselines. It will investigate how agents can externalize intent as requirements, use tests and solver-backed feedback as auditable evidence during iteration, and maintain artifacts through refactoring, documentation, and evolv- ing features at scale. The goal is to develop a practical workflow that produces reliable artifacts and trust signals to support safer adoption. in software engineering research and practice. References [1] Rui Abreu, Vijayaraghavan Murali, Peter C Rigby, Chandra Maddila, Weiyan Sun, Jun Ge, Kaavya Chinniah, Audris Mockus, Megh Mehta, and Nachiappan Nagappan. 2025. Moving Faster and Reducing Risk: Using LLMs in Release Deployment. In 2025 IEEE/ACM 47th International Conference on Software Engi- neering: Software Engineering in Practice (ICSE-SEIP). 448–457. doi:10.1109/ICSE- SEIP66354.2025.00045 [2]Ragib Shahariar Ayon. 2026. AutoJML: Generation and Verification of JML Specifications using LLM Agents. IEEE Pulse 17, 1. doi:10.1109/MPULS.2026. 3659250 Manuscript Number: department-Ayon-01-27-2026. [3] Ragib Shahariar Ayon and Shibbir Ahmed. 2026. AutoReSpec: A Framework for Generating Specification using Large Language Models. In Proceedings of the 2026 IEEE/ACM Third International Conference on AI Foundation Models and Software Engineering (FORGE ’26) (Rio de Janeiro, Brazil) (FORGE ’26). doi:10. 1145/3793655.3793731 April 12–13, 2026. [4] Ragib Shahariar Ayon and Shibbir Ahmed. 2026. SpecPylot: Python Specification Generation with Large Language Models. In Proceedings of the 31st ACM Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering Companion (FSE Companion ’26) (Montreal, QC, Canada). ACM. doi:10.1145/3803437.3806427 [5] Madeline Endres, Sarah Fakhoury, Saikat Chakraborty, and Shuvendu K Lahiri. 2024. Can large language models transform natural language intent into formal method postconditions? Proceedings of the ACM on Software Engineering 1, FSE (2024), 1889–1912. [6] Hojae Han, Jaejin Kim, Jaeseok Yoo, Youngwon Lee, and Seung-won Hwang. 2024. ArchCode: Incorporating Software Requirements in Code Generation with Large Language Models. In Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), Lun-Wei Ku, Andre Martins, and Vivek Srikumar (Eds.). Association for Computational Linguistics, Bangkok, Thailand, 13520–13552. doi:10.18653/v1/2024.acl-long.730 [7]Juyong Jiang, Fan Wang, Jiasi Shen, Sungju Kim, and Sunghun Kim. 2026. A Survey on Large Language Models for Code Generation. ACM Trans. Softw. Eng. Methodol. 35, 2, Article 58 (Jan. 2026), 72 pages. doi:10.1145/3747588 [8]Lezhi Ma, Shangqing Liu, Yi Li, Xiaofei Xie, and Lei Bu. 2025. SpecGen: Automated Generation of Formal Program Specifications via Large Language Models. IEEE Press, 16–28. https://doi.org/10.1109/ICSE55347.2025.00129 [9]Abhik Roychoudhury, Corina Pasareanu, Michael Pradel, and Baishakhi Ray. 2025. Agentic ai software engineer: Programming with trust. arXiv preprint arXiv:2502.13767 (2025). [10] Haifeng Ruan, Yuntong Zhang, and Abhik Roychoudhury. 2025. SpecRover: Code Intent Extraction via LLMs. In Proceedings of the IEEE/ACM 47th International Conference on Software Engineering (Ottawa, Ontario, Canada) (ICSE ’25). IEEE Press, 963–974. doi:10.1109/ICSE55347.2025.00080 [11] Zhao Tian, Junjie Chen, and Xiangyu Zhang. 2025. Fixing Large Language Models’ Specification Misunderstanding for Better Code Generation. In Proceedings of the IEEE/ACM 47th International Conference on Software Engineering (Ottawa, Ontario, Canada) (ICSE ’25). IEEE Press, 1514–1526. doi:10.1109/ICSE55347.2025.00108 [12]Rosalia Tufano, Luca Pascarella, Michele Tufano, Denys Poshyvanyk, and Gabriele Bavota. 2021. Towards Automating Code Review Activities. In 2021 IEEE/ACM 43rd International Conference on Software Engineering (ICSE). 163–174. doi:10.1109/ICSE43902.2021.00027 [13] John Yang, Carlos E. Jimenez, Alexander Wettig, Kilian Lieret, Shunyu Yao, Karthik Narasimhan, and Ofir Press. 2024. SWE-agent: agent-computer interfaces enable automated software engineering. In Proceedings of the 38th International Conference on Neural Information Processing Systems (Vancouver, BC, Canada) (NIPS ’24). Curran Associates Inc., Red Hook, NY, USA, Article 1601, 125 pages. [14]Huan Zhang, Wei Cheng, Yuhan Wu, and Wei Hu. 2024. A pair programming framework for code generation via multi-plan exploration and feedback-driven refinement. In Proceedings of the 39th IEEE/ACM International Conference on Automated Software Engineering. 1319–1331. [15]Yuntong Zhang, Haifeng Ruan, Zhiyu Fan, and Abhik Roychoudhury. 2024. Au- toCodeRover: Autonomous Program Improvement. In Proceedings of the 33rd ACM SIGSOFT International Symposium on Software Testing and Analysis (Vienna, Austria) (ISSTA 2024). Association for Computing Machinery, New York, NY, USA, 1592–1604. doi:10.1145/3650212.3680384