Manuscript Offprint

arXiv:2610.34847

Ethics by Configuration: AI Ethics Principles in Coding Agent Instructions

Haoyu Gao, Peerachai Banyongrakkul, Marc Cheong, Christoph Treude, Sebastian Baltes, Mansooreh Zahedi

Haoyu Gao

The University of Melbourne

Victoria, Australia

haoyug1@student.unimelb.edu.au

Peerachai Banyongrakkul

The University of Melbourne

Victoria Australia

peerachai.banyongrakkul@student.unimelb.edu.au

Marc Cheong

The University of Melbourne

Victoria, Australia

marc.cheong@unimelb.edu.au

Christoph Treude

Singapore Management University

Singapore

ctreude@smu.edu.sg

Sebastian Baltes

Heidelberg University

Heidelberg, Germany

sebastian.baltes@uni-heidelberg.de

Mansooreh Zahedi

The University of Melbourne

Victoria, Australia

mansooreh.zahedi@unimelb.edu.au

Abstract—As AI coding agents become integral to software development, projects increasingly utilise configuration files, such as context files and skills, to govern agent behaviour. While AI ethics principles are widely used in research and policy, little is known about whether and how they are reflected when developers configure coding agents. We studied ethics principles in 40,079 configuration files across 8,893 GitHub repositories. Using a validated large language model (LLM) classification, we measured the prevalence of ethics-related statements, and qualitatively analysed 702 stratified samples across 679 files to uncover the ethical considerations reflected in these files and the parties they concern. Ethics-related statements appeared in 39.4% of files and 61.5% of repositories; concentrated on accountability, transparency, privacy protection, and reliability; and occurred more often in task-specific files such as skills than in project-wide context files. Our qualitative analysis identified 30 categories of ethical considerations, which take the form of concrete rules for the agent. Accountability appeared mainly as requirements for human approval, transparency as instructions to explain and honestly report the agent's work, and fairness as accessibility and localisation. These considerations reveal a difference in focus. Whereas public ethics frameworks aim to protect society and end users, configuration files mainly concern developers, maintainers, and community members in the development workflow. Ethics-related content appeared mainly in prose-based files, and whether agents follow these instructions remains untested. We discuss the implications for practitioners, researchers, and policymakers.

I. INTRODUCTION

With the rise of AI coding agents, developers increasingly use them across software development activities, including requirements analysis, code writing, test generation, and documentation maintenance [1, 2], with autonomy ranging from close human supervision to independent operation [3]. Their outputs, from intermediate responses to final deliverables, can impact stakeholders across the software development life cycle (SDLC). For example, hallucinated or overly long responses can frustrate the developer working with the agent [4], while end users may benefit from added accessibility features [5]. Meanwhile, agent configuration files, such as AGENTS.md [6] and skills [7], provide additional context and guidance for the agent to achieve specific tasks. Against the backdrop of Agentic AI governance, ethics, and risk management – to “effectively deploy and de-risk the powerful capabilities of the technology” [8] – it is increasingly important to understand how ethical considerations are reflected in these configurations, which guide agent behaviour in software development.

AI ethics principles, such as fairness and transparency, are widely discussed in research and policy [9]. For example, Australia's AI Ethics Principles [10] and the EU's Ethics Guidelines for Trustworthy AI [11] set out principles AI systems should follow throughout their lifecycle. However, putting them into practice remains difficult. From a humanistic or philosophical perspective, “principles might be too vague, unenforceable, or downright clash with each other” [12] (citing [13]), and some frameworks are hard to enforce [14]. From an implementation perspective, Pant et al. [15] surveyed 100 AI practitioners and found that, while most were familiar with AI ethics, they faced general, technology-related, and human-related challenges in applying these principles. Gao et al. [16] analysed open-source AI model documentation and found ethical considerations mostly written as problem statements and use-case restrictions. These studies examine ethics through what practitioners report or document for human readers. With AI coding agents, however, developers can write ethical expectations into configuration files as instructions for agents to follow. Treude et al. [12] described these files as a developer-authored governance layer turning abstract ethics principles into natural-language directives. Inspecting 25 repositories, they found early examples of guidance on fairness, accessibility, sustainability, and tone. Yet, beyond this small sample, it remains unknown how common such guidance is, which principles it reflects, and in what form.

In this paper, we conduct a large-scale empirical study of ethics principles in agent configuration files. We extend the dataset by Galster et al. [17] to 40,079 configuration files from 8,893 open-source repositories across eight configuration mechanisms, such as context files, skills, and hooks. We use Australia's AI Ethics Principles [10] to define the scope of ethics we considered. We classified each file with two open-source large language models (LLMs) and verified the classification against human annotations, checking both whether a file is ethics-related and whether its assigned principles are correct. Using this verified classification, we measured how prevalent ethics-related statements are and which principles they concern, and how repositories cover principles across their configuration files. We then drew 702 samples across 679 files for the eight principles and analysed them qualitatively, identifying 30 categories of ethical considerations reflected and the parties these considerations explicitly mention.

Our results show that ethics-related statements are common in agent configuration files, appearing in 39.4% of files and 61.5% of repositories, and concentrate on accountability, transparency and explainability, privacy protection and security, and reliability and safety. These statements appear more often in task-specific files, such as skills, commands, and subagents, than in project-wide context files. However, these statements have a narrower focus than the principles, concentrating on developers rather than on end users and society at large. In configuration files, the statements mostly concern the people closest to the agent: the developers working with it, project maintainers, and community members. Users of the resulting software are addressed less often, and society and the environment rarely. Transparency shows this focus clearly. Although explanations could be directed at the people who use the resulting software, almost all transparency excerpts concern reporting to developers and maintainers. We finally discuss the implications of these findings. Practitioners could complement approval with review and use hooks and permission settings to enforce specific constraints on agent actions. Researchers could build benchmarks that test whether ethical instructions change agent behaviour, and policymakers could provide guidance on how each principle applies when configuring an agent.

The main contributions of this paper are as follows:

• A validated LLM approach for classifying ethics principles in configuration files.

• A large-scale analysis of the prevalence of ethics-related statements in agent configurations.

• A categorisation of the ethical considerations reflected in agent configurations.

• Actionable implications for different stakeholders.

References (49)