<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/make-the-change-easy-then-make-the-easy-change-is-a-great-way-to-code-with-ai-6ecesz5xs" -->

---
title: "Make the change easy, then make the easy change" is a...
description: Coding agents are good at refactoring, so separate restructuring from new behavior when adding a feature, the author argues. First do a pure refactoring that...
canonical: https://daily.dev/posts/make-the-change-easy-then-make-the-easy-change-is-a-great-way-to-code-with-ai-6ecesz5xs
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: "Make the change easy, then make the easy change" is a great way to code with AI | daily.dev
og:description: Coding agents are good at refactoring, so separate restructuring from new behavior when adding a feature, the author argues. First do a pure refactoring that...
og:url: https://daily.dev/posts/make-the-change-easy-then-make-the-easy-change-is-a-great-way-to-code-with-ai-6ecesz5xs
og:image: https://api.daily.dev/og/posts/6eCESz5XS.png
og:image:alt: "Make the change easy, then make the easy change" is a great way to code with AI
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# "Make the change easy, then make the easy change" is a great way to code with AI

**[RUBYLAND](https://daily.dev/sources/rubyla)** · 5 min read · 0 upvotes · 0 comments

## Summary

Coding agents are good at refactoring, so separate restructuring from new behavior when adding a feature, the author argues. First do a pure refactoring that preserves existing behavior, then make the easy change that adds new functionality. To freeze behavior before refactoring, generate a large number of temporary integration tests with AI, forbid the agent from touching app code, then use those tests as an oracle while refactoring. Delete the tests once the refactoring is done. An example: adding ERB support to the Archspec gem by first extracting Ruby source handling behind a common interface, then implementing a new reader.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://radan.dev/articles/pure-refactor-before-the-change>

## Questions this post answers

### How can I use AI coding agents to refactor code safely without breaking existing behavior?

Generate a large number of temporary integration tests over the code you want to refactor, using AI to write them quickly, then forbid the agent from changing any application code while writing those tests. Once the tests capture current behavior, freeze them and let the agent refactor against them as an oracle for correctness, then delete the tests once the new, simpler change is made and verified.

_If you're trying to refactor confidently with an AI agent, daily.dev surfaces more real-world agentic workflows like this one._

### What does the phrase 'make the change easy, then make the easy change' mean in software engineering?

It means separating refactoring from new behavior when adding a feature: first restructure the code so the needed change becomes simple, then make that simple change without altering existing functionality. Kent Beck coined the phrase. Ideally this is a two-step move, a pure refactoring with no behavior change followed by a pure addition that doesn't touch the code powering old features.

_Developers weighing how to structure AI-assisted changes can find more takes like this on daily.dev._

## Similar posts on daily.dev

- [Human Maintainable Code in the Age of AI Agents](https://daily.dev/posts/human-maintainable-code-in-the-age-of-ai-agents-ilzajja2s) · Atomic Spin · 12 upvotes · 1 comments
- [Stop AI Spaghetti: Enforcing Rails Architecture in 2026](https://daily.dev/posts/stop-ai-spaghetti-enforcing-rails-architecture-in-2026-ocxjimlhf) · Ruby Flow · 0 upvotes · 0 comments
- [From AI Opportunity to AI Feature: Where We Start in Rails Applications - FastRuby.io](https://daily.dev/posts/from-ai-opportunity-to-ai-feature-where-we-start-in-rails-applications---fastruby-io-cjazhjmjg) · RUBYLAND · 0 upvotes · 0 comments
- [How to Modernize a Legacy Application with AI Without Turning It Into a Rewrite](https://daily.dev/posts/how-to-modernize-a-legacy-application-with-ai-without-turning-it-into-a-rewrite-wgq9enof0) · freeCodeCamp · 2 upvotes · 0 comments

---

Tags: [#ai-agents](https://daily.dev/tags/ai-agents), [#testing](https://daily.dev/tags/testing), [#code-review](https://daily.dev/tags/code-review)

[View this post on daily.dev](https://daily.dev/posts/make-the-change-easy-then-make-the-easy-change-is-a-great-way-to-code-with-ai-6ecesz5xs)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"\"Make the change easy, then make the easy change\" is a great way to code with AI","url":"https://daily.dev/posts/make-the-change-easy-then-make-the-easy-change-is-a-great-way-to-code-with-ai-6ecesz5xs","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/make-the-change-easy-then-make-the-easy-change-is-a-great-way-to-code-with-ai-6ecesz5xs"},"datePublished":"2026-10-27T11:28:02.275Z","dateModified":"2026-10-27T11:28:29.274Z","description":"Coding agents are good at refactoring, so separate restructuring from new behavior when adding a feature, the author argues. First do a pure refactoring that...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/73ed47fa220c00d1662144a875842696?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/73ed47fa220c00d1662144a875842696?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"RUBYLAND","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"RUBYLAND","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/rubyla","url":"https://daily.dev/sources/rubyla"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/make-the-change-easy-then-make-the-easy-change-is-a-great-way-to-code-with-ai-6ecesz5xs","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"ai-agents,testing,code-review","timeRequired":"PT5M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"RUBYLAND","item":"https://daily.dev/sources/rubyla"},{"@type":"ListItem","position":3,"name":"\"Make the change easy, then make the easy change\" is a great way to code with AI"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/make-the-change-easy-then-make-the-easy-change-is-a-great-way-to-code-with-ai-6ecesz5xs#faq","mainEntity":[{"@type":"Question","name":"How can I use AI coding agents to refactor code safely without breaking existing behavior?","acceptedAnswer":{"@type":"Answer","text":"Generate a large number of temporary integration tests over the code you want to refactor, using AI to write them quickly, then forbid the agent from changing any application code while writing those tests. Once the tests capture current behavior, freeze them and let the agent refactor against them as an oracle for correctness, then delete the tests once the new, simpler change is made and verified. If you're trying to refactor confidently with an AI agent, daily.dev surfaces more real-world agentic workflows like this one."}},{"@type":"Question","name":"What does the phrase 'make the change easy, then make the easy change' mean in software engineering?","acceptedAnswer":{"@type":"Answer","text":"It means separating refactoring from new behavior when adding a feature: first restructure the code so the needed change becomes simple, then make that simple change without altering existing functionality. Kent Beck coined the phrase. Ideally this is a two-step move, a pure refactoring with no behavior change followed by a pure addition that doesn't touch the code powering old features. Developers weighing how to structure AI-assisted changes can find more takes like this on daily.dev."}}]}
```

