<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/using-coding-agents-on-a-migration-three-practices-that-mattered-yrlwovp9d" -->

---
title: Using coding agents on a migration: Three practices that...
description: Engineers at Temporal share lessons from using coding agents heavily during a migration of their billing store to ClickHouse. Contrary to expectations, agents...
canonical: https://daily.dev/posts/using-coding-agents-on-a-migration-three-practices-that-mattered-yrlwovp9d
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Using coding agents on a migration: Three practices that mattered | daily.dev
og:description: Engineers at Temporal share lessons from using coding agents heavily during a migration of their billing store to ClickHouse. Contrary to expectations, agents...
og:url: https://daily.dev/posts/using-coding-agents-on-a-migration-three-practices-that-mattered-yrlwovp9d
og:image: https://api.daily.dev/og/posts/YRlwOVp9d.png
og:image:alt: Using coding agents on a migration: Three practices that mattered
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.

# Using coding agents on a migration: Three practices that mattered

**[Temporal](https://daily.dev/sources/temporal)** · 8 min read · 1 upvotes · 1 comments

## Summary

Engineers at Temporal share lessons from using coding agents heavily during a migration of their billing store to ClickHouse. Contrary to expectations, agents helped most with cleanup and code removal rather than new construction. Three practices drove this: writing cleanup instructions as comments at the time temporary code is created, placing durable rules next to the code they govern with a named enforcing test, and treating agent instruction files as artifacts that can go stale and must be maintained. The piece is candid about limits: no speed claims can be substantiated, some instruction files were found to be stale and misleading, and human-specific institutional knowledge still cannot be replaced by prompting.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://temporal.io/blog/using-coding-agents-on-a-migration-three-practices-that-mattered>

## Questions this post answers

### Why are AI coding agents more effective at cleaning up dead code than writing new code during a migration?

Cleanup work involves an exhaustive, tedious search across scattered files (config entries, deployment manifests, test fixtures, mocks) that agents handle well because the individual edits are trivial once the complete list is established. During a ClickHouse migration of Temporal Cloud's billing store, an agent handled a teardown touching several dozen files, most of them stale deployment configuration, in a single working session.

_Anyone weighing where AI agents pull their weight in a migration can find similar field reports on daily.dev._

### How can I write code comments so an AI coding agent can find and clean up temporary migration code later?

Use a distinctively named comment marker (like a CLEANUP-NOTE tag) placed in temporary code at the moment it's written, stating what the code is for and what should happen to it once the migration finishes. Weeks later, an agent can search for every instance of the marker and use it as a deletion checklist, since the reasoning was captured while it was still fresh rather than reconstructed later.

_Developers building agent-friendly conventions into their codebase can track write-ups like this on daily.dev._

### Where should I put agent instruction files so they don't consume too much context budget across a repository?

Scope instruction files to the specific directory they apply to rather than the repository root, so only agents and developers working in that area load and pay the context cost for the rule. Also name the test that enforces each rule so it stays checkable rather than becoming an unverifiable assertion, and treat these files as artifacts that can go stale and need active maintenance.

_Teams designing agent instruction conventions can compare approaches like this on daily.dev._

## Community discussion

Top comments from developers on daily.dev.

**@leonidbugaev** · 0 upvotes

> When they overflowed into negative totals, the useful part for me was the test in the same package. The other file still pointing at deleted files is going to sit there until an agent follows it and I notice the mess.

## Similar posts on daily.dev

- [Agentic coding at ClickHouse](https://daily.dev/posts/agentic-coding-at-clickhouse-ombhogfph) · ClickHouse · 1 upvotes · 0 comments
- [adam bien's blog](https://daily.dev/posts/adam-bien-s-blog-axj4hithl) · Adam Bien · 1 upvotes · 0 comments
- [AI-Assisted Code Modernization and Migration: A Practical, Reliable Approach](https://daily.dev/posts/ai-assisted-code-modernization-and-migration-a-practical-reliable-approach-jkdyxjbvg) · KDAB Blog · 1 upvotes · 1 comments
- [Agent Experience Best Practices for Coding Agent Productivity](https://daily.dev/posts/agent-experience-best-practices-for-coding-agent-productivity-qnyn7e5mm) · marmelab · 3 upvotes · 0 comments

---

Tags: [#ai-agents](https://daily.dev/tags/ai-agents), [#database](https://daily.dev/tags/database), [#technical-debt](https://daily.dev/tags/technical-debt), [#clickhouse](https://daily.dev/tags/clickhouse)

[View this post on daily.dev](https://daily.dev/posts/using-coding-agents-on-a-migration-three-practices-that-mattered-yrlwovp9d)

```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":"Using coding agents on a migration: Three practices that mattered","url":"https://daily.dev/posts/using-coding-agents-on-a-migration-three-practices-that-mattered-yrlwovp9d","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/using-coding-agents-on-a-migration-three-practices-that-mattered-yrlwovp9d"},"datePublished":"2026-09-02T13:03:22.368Z","dateModified":"2026-09-13T21:01:19.248Z","description":"Engineers at Temporal share lessons from using coding agents heavily during a migration of their billing store to ClickHouse. Contrary to expectations, agents...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/e8a7a66eb72cc128f336e6dcd69a5f96?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/e8a7a66eb72cc128f336e6dcd69a5f96?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Temporal","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":"Temporal","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/65290ca7e3ab46a7b1df76f2757800c2","url":"https://daily.dev/sources/temporal"},"commentCount":1,"discussionUrl":"https://daily.dev/posts/using-coding-agents-on-a-migration-three-practices-that-mattered-yrlwovp9d","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":1},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":1}],"keywords":"ai-agents,database,technical-debt,clickhouse","timeRequired":"PT8M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Temporal","item":"https://daily.dev/sources/temporal"},{"@type":"ListItem","position":3,"name":"Using coding agents on a migration: Three practices that mattered"}]}
{"@context":"https://schema.org","@type":"WebPage","@id":"https://daily.dev/posts/using-coding-agents-on-a-migration-three-practices-that-mattered-yrlwovp9d","comment":[{"@type":"Comment","text":"When they overflowed into negative totals, the useful part for me was the test in the same package. The other file still pointing at deleted files is going to sit there until an agent follows it and I notice the mess.","datePublished":"2026-09-02T14:58:14.398Z","url":"https://daily.dev/posts/YRlwOVp9d#c-ZIlpKX4jy","author":{"@type":"Person","name":"Leonid Bugaev","url":"https://daily.dev/leonidbugaev","image":"https://lh3.googleusercontent.com/a/ACg8ocLhMgurwTmJElWaH9A8Ju8cHvZxgMCDt009jEYkmFCyUGAoaGSw=s96-c"}}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/using-coding-agents-on-a-migration-three-practices-that-mattered-yrlwovp9d#faq","mainEntity":[{"@type":"Question","name":"Why are AI coding agents more effective at cleaning up dead code than writing new code during a migration?","acceptedAnswer":{"@type":"Answer","text":"Cleanup work involves an exhaustive, tedious search across scattered files (config entries, deployment manifests, test fixtures, mocks) that agents handle well because the individual edits are trivial once the complete list is established. During a ClickHouse migration of Temporal Cloud's billing store, an agent handled a teardown touching several dozen files, most of them stale deployment configuration, in a single working session. Anyone weighing where AI agents pull their weight in a migration can find similar field reports on daily.dev."}},{"@type":"Question","name":"How can I write code comments so an AI coding agent can find and clean up temporary migration code later?","acceptedAnswer":{"@type":"Answer","text":"Use a distinctively named comment marker (like a CLEANUP-NOTE tag) placed in temporary code at the moment it's written, stating what the code is for and what should happen to it once the migration finishes. Weeks later, an agent can search for every instance of the marker and use it as a deletion checklist, since the reasoning was captured while it was still fresh rather than reconstructed later. Developers building agent-friendly conventions into their codebase can track write-ups like this on daily.dev."}},{"@type":"Question","name":"Where should I put agent instruction files so they don't consume too much context budget across a repository?","acceptedAnswer":{"@type":"Answer","text":"Scope instruction files to the specific directory they apply to rather than the repository root, so only agents and developers working in that area load and pay the context cost for the rule. Also name the test that enforces each rule so it stays checkable rather than becoming an unverifiable assertion, and treat these files as artifacts that can go stale and need active maintenance. Teams designing agent instruction conventions can compare approaches like this on daily.dev."}}]}
```

