NewsCrawler.org

Giving a coding agent docs or ADRs cuts rule violations; no clear difference between them

コーディングエージェントに docs と ADR を渡したときの規約違反の比較
Image: zenn.dev

The author compared three setups for a coding agent: no rules, a single docs file, and ADRs[1], which record design decisions along with their background and rejected options. To test this, the author built a test event-management app and had Claude Code 2.1.332 with claude-sonnet-5-5 implement 20 feature requests in each setup, 10 times over. Violations of six rules based on the bulletproof-react project structure were counted as newly added per 1,000 added lines.

Without docs or ADRs, the agent produced 16.5 violations per 1,000 added lines, compared with 2.0 with docs and 1.7 with ADRs. The cost of 20 issues was 2.72 USD, 3.13 USD and 3.34 USD, and the time was 12.3, 14.1 and 14.7 minutes, in the same order. The author found no detectable difference between docs and ADRs, and ADRs cost about 7% more.

In a separate preliminary test on another open-source React app, ADRs produced more violations than docs: 6.5 against 3.5 per 1,000 lines. The author notes that this is a result from one app only, and that the token difference may grow in the larger app the author actually maintains.

Read the original zenn.dev

Sources

  • Zenn JA

    コーディングエージェントに docs と ADR を渡したときの規約違反の比較

    15 likes2 bookmarks0 comments

Published: First seen: Читать по-русски

Open as a page