A Practical Way to Study Coding-Agent Improvements
Purpose
The goal is to improve the system of engineering work with agents: the people, the repository, the agent setup (instructions, docs, tools, and checks), the harness, and the model. A study should tell whether a change helps, for which tasks, and at what cost. For instructions such as AGENTS.md, only the results of real tasks can show this (why). The study goes in a cycle:
flowchart TB
subgraph questions[" "]
direction LR
observe["Observe"] --> question["Question"] --> hypothesis["Hypothesize"]
end
subgraph evaluation[" "]
direction RL
evaluate["Evaluate"] --> interpret["Interpret"] --> refine["Refine"]
end
hypothesis --> evaluate
refine -. "Next iteration" .-> observe
style questions fill:transparent,stroke:transparent
style evaluation fill:transparent,stroke:transparent
Research cycle: Observe -> Question -> Hypothesize -> Evaluate -> Interpret -> Refine -> repeat.
The cycle repeats. Exploring can come before a hypothesis, and a disappointing result is useful when it changes what we understand or what we build.
1. Start from a decision and form a question
Ask first: what decision would the answer change? For example, should we add a root AGENTS.md, shorten the one we have, or move detailed rules into the docs?
Then name the context, the change or the thing being studied, what it’s compared with (if anything), and the outcome. A question with these four parts can be answered.
- Too broad: “Are instruction files good?”
- Better: “For bug fixes in our Python repository, does a minimal root
AGENTS.md, compared with no instruction file, reduce human corrections without lowering the share of accepted changes?”
Different questions need different evidence:
- Descriptive: Which instructions do agents load and use?
- Comparative or causal: Does putting a rule in the root file, compared with a linked doc, change the results of tasks?
- Explanatory: Why do agents ignore a rule they have read?
- Design: What change to the workflow prevents that failure at an acceptable cost?
2. A hypothesis is a testable expectation
A research question says what a study wants to learn. A hypothesis predicts something that can be observed, and it must be possible to find evidence against it.
Example hypothesis: “For bug fixes, a minimal root AGENTS.md reduces the number of human corrections per accepted change, without a loss in quality that matters in practice.”
The hypothesis predicts a result. It doesn’t establish it. Before testing it, define what counts as a correction, an accepted change, and a loss in quality that matters. Compare the result with the expectation that the change makes no difference to the main outcome.
A hypothesis doesn’t need an arbitrary percentage. A threshold can be set once the baseline and the cost of the change are known. When nobody knows how the change would work, start by watching what happens. Hypotheses can come later.
3. Choose a method for what you want to learn
The methods work together. A case study can show a failure pattern, grounded theory can help explain it, an experiment can test a remedy, and design science organizes the cycle of building and evaluating. Grounded theory is a full qualitative method, so tagging notes isn’t a grounded theory study.
The Bottom-Up Approach combines two of these methods for a team’s own workflows. It uses grounded theory to learn from cases and sandbox-first experiments to test each structure it adds.
4. Decide what counts as improvement
For work with coding agents, “better” needs more than the agent saying it succeeded or a shorter session. Separate these outcomes:
- Result: Was the task done correctly, and was the change accepted?
- Human effort: How much time did people spend preparing the task, steering the agent, reviewing its work, and correcting it?
- Cost and risk: What did the session cost, and did it cause unintended changes, defects, or missed questions to the people who own a decision?
- Later effects: Did the change keep the code easy and safe to change? Some effects show only in later tasks on the same code.
Choose a main outcome before looking at the results, and use the others as limits that the change must not break. Write a rule for measuring the main outcome that another reviewer could apply. For example, count the corrections made before acceptance, and judge completion by the tests plus an independent review by a person.
Make the outcome concrete for each task type. A good bug fix and a good investigation are different results. For each task type, write a list of what a good result is that someone can tick off, and test each line by asking whether two reviewers looking at the same pull request would agree (What a good result looks like).
5. Work with few tasks and hidden parameters
A team rarely has the conditions of a controlled experiment. It has a few tasks a week, and each one is different. The same task run twice gives two different results. The model, the harness, the setup, the tickets, and the person running the session change in the same weeks. Some of these parameters the team can’t see or doesn’t record, such as the harness’s built-in prompt or a setup file in one developer’s home folder. Problems in Engineering Work with Agents lists these problems.
A study can still make them smaller:
- Record the parameters with each task: the model and harness versions, the commit of the repository and of the agent setup, the task type, and who ran the session.
- Compare within one task type, so that fewer parameters differ between the tasks.
- Change one thing at a time, and note what else changed in the same period.
- Repeat before concluding. Several tasks, or the same task run more than once, show more than one task.
- Say what can’t be told. With a few tasks a week, only large effects show. A change with a small effect stays unproven.
What the Approach Does about It describes these practices in more detail.
6. Interpret results without overclaiming
A result can support the hypothesis, contradict it, or leave it unresolved. Ask:
- How large is the change, and how uncertain is the estimate?
- Is it useful in practice, after the cost, the risk, and the maintenance?
- Could the difficulty of the tasks, a change of model, the reviewer’s judgment, or chance explain it?
- Does it appear across tasks and repositories, or only in one place?
- What result would justify revising or dropping the recommendation?
A result that isn’t statistically significant doesn’t prove there’s no effect. A local trial that went well doesn’t make a general rule. Keep the original prediction, the observations, the counterexamples, and the limits visible, including negative results.
7. A short study note
Before starting a study, write seven short lines:
- Decision: Which change to the notes or the workflow is being considered?
- Question: What exactly needs to be learned?
- Hypothesis or aim: What is predicted, or what is still unknown?
- Context: Which agents, models and harness versions, repository, task type, and people?
- Evidence: Existing research, observation, a case study, a controlled comparison, or a combination?
- Outcomes: What will be observed, and by which criteria will it be judged?
- Revision rule: Which findings would justify keeping, qualifying, rewriting, or removing the recommendation?
These lines are enough to prevent vague claims and early conclusions. The next step is to pick one question and turn the note into a small protocol: which tasks to use, which conditions to compare, how to score the results, and how to analyze them.
Further reading
These are starting points on method. They aren’t evidence that any specific AGENTS.md recommendation works.
- Kitchenham, Dybå & Jørgensen (2004), “Evidence-based software engineering.” How to form questions that can be answered, assess evidence, and apply findings in context. Durham bibliography · DOI
- Wieringa (2014), Design Science Methodology for Information Systems and Software Engineering. Research questions, artifact design, and evaluation in context. Springer (PDF)
- Wohlin et al. (2024), Experimentation in Software Engineering. A fuller reference for choosing empirical methods and running experiments. Springer (PDF)
- Runeson & Höst (2009), “Guidelines for conducting and reporting case study research in software engineering.” How to study complex real-world settings. Open-access paper
- Stol, Ralph & Fitzgerald (2016), “Grounded theory in software engineering research.” What grounded theory involves and how to apply it with care. University repository
Library sources
- Dresch et al. 2015, Design Science Research (doi:10.1007/978-3-319-07374-3)
- Denzin and Lincoln 2018, The SAGE Handbook of Qualitative Research
- Marczyk et al. 2005, Essentials of Research Design and Methodology
- Mendez et al. 2024, Handbook on Teaching Empirical Software Engineering
- Trochim et al. 2016, Research Methods: The Essential Knowledge Base
- Wohlin and Runeson 2021, Guiding the selection of research methodology in industry-academia collaboration in software engineering (doi:10.1016/j.infsof.2021.106678)
- Wohlin and Rainer 2022, Is it a case study? A critical analysis and guidance