<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/synthetic-sagas-8tm8q2cib" -->

---
title: Synthetic sagas | daily.dev
description: A developer reflects on rewriting a personal text editor in Rust with heavy AI assistance (mostly Claude Code with Opus), describing how AI coding has improved...
canonical: https://daily.dev/posts/synthetic-sagas-8tm8q2cib
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Synthetic sagas | daily.dev
og:description: A developer reflects on rewriting a personal text editor in Rust with heavy AI assistance (mostly Claude Code with Opus), describing how AI coding has improved...
og:url: https://daily.dev/posts/synthetic-sagas-8tm8q2cib
og:image: https://api.daily.dev/og/posts/8Tm8q2CIb.png
og:image:alt: Synthetic sagas
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.

# Synthetic sagas

**[Jamie Brandon](https://daily.dev/sources/jamiebrandon)** · 13 min read · 0 upvotes · 0 comments

## Summary

A developer reflects on rewriting a personal text editor in Rust with heavy AI assistance (mostly Claude Code with Opus), describing how AI coding has improved to the point of committing generated code after minimal review. The piece covers a testing strategy built on an IO-trait boundary for deterministic simulation, e2e tests, fuzzing, snapshot tests of API surfaces to catch architectural decay, quadratic-complexity regression tests, and a handle-based data-oriented design that avoids Rust borrow-checker fights. It closes with broader musings on single-threaded (non-parallel-agent) workflows, the shifting quality-vs-effort frontier for software, and optimism about AI lowering the barrier to building software.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.scattered-thoughts.net/writing/synthetic-sagas>

## Questions this post answers

### How do you write testable, simulatable code in Rust when the standard library isn't sans-io?

Split logic into a core crate that takes input events and returns render output via a `&mut dyn IO` trait, keeping the real IO implementation in a separate crate. This makes end-to-end and fuzz testing of the core trivial, though library calls that can't be mocked (like daemonization) remain outside the testable boundary and are harder to verify.

_Developers wrestling with sans-io architecture in Rust can find more real-world patterns like this on daily.dev._

### How can I catch performance regressions like accidentally quadratic code when using AI-generated code?

Write rough unit tests for asymptotics that open a file at two different sizes and assert the larger one's processing time grows linearly rather than quadratically, plus a minimum throughput in MB/s. This catches accidentally quadratic code that even advanced AI models still frequently produce, since typical test suites verify correctness but not performance characteristics.

_Anyone reviewing AI-generated code for hidden performance traps can track similar techniques on daily.dev._

## Similar posts on daily.dev

- [An AI agent coding skeptic tries AI agent coding, in excessive detail](https://daily.dev/posts/an-ai-agent-coding-skeptic-tries-ai-agent-coding-in-excessive-detail-5jw8p1rds) · Max Woolf's Blog · 23 upvotes · 0 comments
- [Learnings from 100K Lines of Rust with AI](https://daily.dev/posts/learnings-from-100k-lines-of-rust-with-ai-paclz7ko3) · Hacker News · 2 upvotes · 0 comments
- [I used AI. It worked. I hated it.](https://daily.dev/posts/i-used-ai-it-worked-i-hated-it--selogov58) · Lobsters · 99 upvotes · 18 comments

---

Tags: [#testing](https://daily.dev/tags/testing), [#architecture](https://daily.dev/tags/architecture), [#rust](https://daily.dev/tags/rust), [#ai-coding](https://daily.dev/tags/ai-coding), [#claude-code](https://daily.dev/tags/claude-code)

[View this post on daily.dev](https://daily.dev/posts/synthetic-sagas-8tm8q2cib)

```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":"Synthetic sagas","url":"https://daily.dev/posts/synthetic-sagas-8tm8q2cib","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/synthetic-sagas-8tm8q2cib"},"datePublished":"2026-09-21T05:02:18.742Z","dateModified":"2026-09-21T05:02:38.524Z","description":"A developer reflects on rewriting a personal text editor in Rust with heavy AI assistance (mostly Claude Code with Opus), describing how AI coding has improved...","image":"https://media.daily.dev/image/upload/s--1KxV4ohY--/f_auto/v1722860400/public/Placeholder%2007","thumbnailUrl":"https://media.daily.dev/image/upload/s--1KxV4ohY--/f_auto/v1722860400/public/Placeholder%2007","isAccessibleForFree":true,"articleSection":"Jamie Brandon","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":"Jamie Brandon","logo":"https://media.daily.dev/image/upload/s--lWYKZ6-3--/f_auto/v1721999373/logos/jamiebrandon","url":"https://daily.dev/sources/jamiebrandon"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/synthetic-sagas-8tm8q2cib","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"testing,architecture,rust,ai-coding,claude-code","timeRequired":"PT13M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Jamie Brandon","item":"https://daily.dev/sources/jamiebrandon"},{"@type":"ListItem","position":3,"name":"Synthetic sagas"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/synthetic-sagas-8tm8q2cib#faq","mainEntity":[{"@type":"Question","name":"How do you write testable, simulatable code in Rust when the standard library isn't sans-io?","acceptedAnswer":{"@type":"Answer","text":"Split logic into a core crate that takes input events and returns render output via a `\u0026mut dyn IO` trait, keeping the real IO implementation in a separate crate. This makes end-to-end and fuzz testing of the core trivial, though library calls that can't be mocked (like daemonization) remain outside the testable boundary and are harder to verify. Developers wrestling with sans-io architecture in Rust can find more real-world patterns like this on daily.dev."}},{"@type":"Question","name":"How can I catch performance regressions like accidentally quadratic code when using AI-generated code?","acceptedAnswer":{"@type":"Answer","text":"Write rough unit tests for asymptotics that open a file at two different sizes and assert the larger one's processing time grows linearly rather than quadratically, plus a minimum throughput in MB/s. This catches accidentally quadratic code that even advanced AI models still frequently produce, since typical test suites verify correctness but not performance characteristics. Anyone reviewing AI-generated code for hidden performance traps can track similar techniques on daily.dev."}}]}
```

