Scalable Instruction Adherence Benchmarking in Large-Scale Codebases
Evaluate coding agent instruction adherence and security boundary compliance within large-scale multi-file enterprise repositories under long-horizon task constraints.
Time
Compute level
Resources
What the paper used
Prerequisites
Scope
The Gap
In Section 7, the author notes that the evaluation was restricted to 20 synthetic micro-repositories ranging from 60 to 125 lines of code with brief 3-step tasks, limiting external validity for real-world software engineering contexts.
Limitation
The micro-scale, synthetic repository design fails to evaluate how context window length, deep dependency trees, and long-horizon planning impact rule compliance and specification adherence.
Proposed Solution
Construct an agent evaluation suite on top of real-world multi-file repositories (adapting SWE-bench codebases) featuring complex dependency graphs and strict architectural rules. Measure instruction adherence decay, token cost, and hallucinated contract completion over multi-turn, long-horizon tasks.
Why This Matters
Evaluating agents on complex repositories ensures safety and specification compliance mechanisms generalize to production-scale software development.
How to Get Started
How to test it: Evaluate if instruction adherence degrades as context length increases beyond 50k tokens in long-horizon coding tasks compared to micro-repositories. Beat the baseline pass rates of micro-repos using context-aware rule injection, measuring compliance rate, stopping if performance degrades uniformly regardless of repository size.
- Select 50 representative open-source Python repositories from SWE-bench with over 10,000 lines of code.
- Embed security boundaries and contribution rules files into repository roots.
- Formulate multi-turn refactoring tasks that require adhering to repository-level constraints.
- Benchmark frontier coding agents and evaluate instruction compliance across context length tiers.
Suggested by AI. Adapt it to your setup.
Has This Been Done?
Works like 'OctoBench' and 'Constraint Decay' study instruction following and constraint fragility in repository-grounded agentic coding. However, they do not specifically execute the exact multi-turn, multi-file framework proposed to measure adherence decay and token costs on SWE-bench architectures.
- OctoBench: Benchmarking Scaffold-Aware Instruction Following in Repository-Grounded Agentic Coding · 2026 · 24 citations
- Constraint Decay: The Fragility of LLM Agents in Backend Code Generation · 2026 · 13 citations
- OmniCode: A Benchmark for Evaluating Software Engineering Agents · 2026 · 7 citations
We searched OpenAlex and arXiv for “benchmark coding agent instruction adherence large codebases context decay” and “Scalable Instruction Adherence Benchmarking in Large-Scale Codebases” and an AI compared the idea with the top 10 results. A small search can miss relevant work.
Source Paper
Markdown Is Not a Firewall: four coding agents, one rules file, four boundariesSandeep Dhuri · 2026
This paper presents a pre-registered empirical study evaluating repository rules files (such as AGENTS.md or CLAUDE.md) as security controls for autonomous AI coding agents compared against deterministic enforcement gates. Testing four shipped coding agents across twenty Python repositories, the author finds that natural language rules files act as non-enforceable advice rather than hard controls, sometimes causing misinterpretations and false success claims (e.g., Codex CLI losing 31.2 percentage points on hidden tests). Conversely, deterministic programmatic gates successfully block boundary violations regardless of agent behavior.
Related Ideas
- NFR-Aware Benchmarking for Agentic CodingAgent READMEs: An Empirical Study of Context Files for Agentic Coding🟡Fairly easy
- Evaluation on Repository-Scale Benchmarks (SWE-bench)AutoDev: Automated AI-Driven Development🟡Fairly easy
- Automated Linter for Agent-Code SynchronizationAgent READMEs: An Empirical Study of Context Files for Agentic Coding🟡Fairly easy
- Hierarchical Specification-to-Patch Synthesis for Large-Scale Repository ChangesSWE-CoWork: Benchmarking Coding Agents as Digital Employees in Organizations🟠Medium
- Hermetic Harness-Agent Environment Isolation Against Dependency-Mediated Answer LeakageSage S2.1 Flash Technical Report🟡Fairly easy