Rediscovering Architectural Decision Records: How Persistent Design Context Improves LLM Code Generation
Abstract
As AI coding tools proliferate, multi-turn development using large language models (LLMs) is becoming commonplace. However, the "context degradation" problem-where design intent is lost across sessionsremains a serious challenge that leads to quality deterioration as projects grow in complexity. This study proposes "sqlew," a tool that repurposes Architectural Decision Records (ADRs)-a practice proposed in 2011 but abandoned due to human operational overhead-as external design memory for LLMs. sqlew realizes automated ADR recording and selective retrieval via structured queries through the Model Context Protocol (MCP), constructing a coexistence model of static instruction (CLAUDE.md) and dynamic rationale (ADR). We conducted a controlled experiment on a 12.5-turn TypeScript workflow approval system development across three conditions: no ADR (vanilla), from-inception adoption (sqlew), and retroactive adoption (Vanilla-to-sqlew, v2s). The sqlew condition reduced development time by 10.1% (496 min vs. 552 min) and total tool calls by 10.8%. In the vanilla condition, a supplementary turn (Turn 12.6: 29 min, 21,751K tokens) was required to compensate for missing E2E tests; including this hidden cost widened the time difference to 14.6%. Keyword-based density analysis of Chain of Thought (CoT) revealed a qualitative shift in reasoning patterns (Trial-and-Error Loop → Context-Informed Reasoning) and accelerating divergence in prior decision reference density (+21% → +64% → +137%). The most striking finding is the compliance gap between instruction and rationale. Despite the same TDD instruction being present in CLAUDE.md, conditions where ADRs contained the rationale for why TDD was adopted (sqlew/v2s) spontaneously generated 16-25 E2E tests, whereas the vanilla condition produced zero. LLMs exhibit higher compliance and reasoning quality toward "why to do something (rationale)" than "what to do (instruction)." We release all session logs, prompts, and analysis code, and invite replication.
Fields of Study & Subjects
Software Engineering Research
Software Engineering Techniques and Practices
Advanced Software Engineering Methodologies
Publication details
- Publication date
- 25 February 2026
- Language
- EN
- Document type
- Preprint