RORK LABJP
APPLE-AI — Apple opens Foundation Models free to developers under 2M first-time downloads, slashing the cost of adding AI to indie appsSWIFT-API — Foundation Models server-side integration lets you call Claude and Gemini through the same Swift API, now with image inputKOTLIN-MIGRATION — Android Studio's migration agent converts React Native apps into native Kotlin automatically — a future path for Rork-built appsRORK-MAX — Rork Max generates native Swift code ($200/mo), covering iPhone, iPad, Watch, TV, Vision Pro, and iMessageSIMULATOR — A browser-based streaming iOS simulator lets you test on a real Apple environment without Xcode or Mac hardwareSWIFTUI — SwiftUI evolves at WWDC 2026 with reorderable containers, swipe actions for any container, and layouts up to 2x fasterAPPLE-AI — Apple opens Foundation Models free to developers under 2M first-time downloads, slashing the cost of adding AI to indie appsSWIFT-API — Foundation Models server-side integration lets you call Claude and Gemini through the same Swift API, now with image inputKOTLIN-MIGRATION — Android Studio's migration agent converts React Native apps into native Kotlin automatically — a future path for Rork-built appsRORK-MAX — Rork Max generates native Swift code ($200/mo), covering iPhone, iPad, Watch, TV, Vision Pro, and iMessageSIMULATOR — A browser-based streaming iOS simulator lets you test on a real Apple environment without Xcode or Mac hardwareSWIFTUI — SwiftUI evolves at WWDC 2026 with reorderable containers, swipe actions for any container, and layouts up to 2x faster
Articles/Dev Tools
Dev Tools/2026-06-12Advanced

Keeping Manual Fixes Alive Across Rork Regenerations — Boundary Design for AI-Owned Code

A tiny copy-change request quietly reverted my week-old ATT fix. Here is the boundary architecture I use now: a guarded directory, one-line adapters, patch assets, and scoped prompts — with measured blast-radius numbers.

Rork383RegenerationCode ManagementGitLong-term Operations2

Premium Article

In early June, a pre-release diff review stopped me cold. A fix I had written by hand the week before — a guard that kept the ads SDK from initializing while the ATT consent dialog was still on screen — was gone. Not commented out, not moved. Gone.

The trigger was my own doing. I had asked Rork for a small change to some settings-screen copy, then exported the project as usual. Rork made the change I asked for, and along the way it also restored everything else to what it considered the correct generated state. From the model's point of view, my manual fix was just a deviation to be smoothed over.

Regeneration is the core strength of Rork, and giving it up is not an option. At the same time, the longer you operate an app, the more reasons you accumulate to touch the exported code by hand: ad initialization order, billing event edge cases, emergency crash mitigations. So the real requirement is structural — keep regenerating, and keep manual fixes alive, at the same time.

That incident pushed me to redraw my projects around an explicit split between land the AI owns and land a human protects. What follows is the whole approach: the measurements that motivated it, the implementation, and the day-to-day sync procedure.

First, measure how regeneration destroys manual edits

A request in the Rork chat is not a file-level edit instruction. It is a statement about how the app should be, and the generator reorganizes whichever files it deems relevant to that state. The size of your request tells you almost nothing about the size of the rewrite.

I wanted numbers rather than impressions, so I took a copy of a production project and issued three deliberately small requests, counting rewritten files with git diff --stat each time.

Request                                          Files rewritten
Change one button label on the settings screen        7
Change home-screen card corner radius 8 -> 12          4
Add one toggle to the settings screen                 11

Seven files for a single label change. Looking inside the diff, the target file was there as expected — alongside shared hooks and utilities that had been reformatted back into the generator's preferred shape. Most of that churn is harmless. The problem is that one or two lines of reverted manual work hide inside hundreds of lines of harmless churn, and no human reviews that reliably, release after release.

The conclusion is not "avoid regeneration." It is: put manual fixes where regeneration cannot reach them.

The boundary principles — land that may be overwritten, land that may not

I run on three rules, and only three.

First, everything Rork generates — app/, components/, hooks/ — is treated as disposable. Any of it may be overwritten by the next regeneration, so no manual fix lives there directly.

Second, hand-written code is quarantined in an independent directory I call guarded/. The name is irrelevant. What matters is that Rork never generates that path, and that the sync procedure can protect it mechanically.

Third, generated code may touch guarded/ through exactly one import and one function call. The thinner the connection point, the cheaper the recovery: when regeneration wipes it, you restore one line, not a subsystem.

The layout looks like this:

project/
├── app/              # Rork's land (may be overwritten at any time)
├── components/       # same
├── hooks/            # same
├── guarded/          # human land (regeneration never reaches it)
│   ├── ads/
│   │   └── initializeAds.ts
│   ├── analytics/
│   │   └── track.ts
│   └── billing/
│       └── listeners.ts
└── patches/          # patches for fixes that cannot move (see below)

Thank you for reading this far.

Continue Reading

What follows includes implementation code, benchmarks, and practical content we hope you'll find useful. This site runs without ads — server and development costs are supported entirely by members like you. If it's been helpful, we'd be truly grateful for your support.

WHAT YOU'LL LEARN
Measured blast radius: a one-line copy change request rewrote 7 files — and the boundary principles that assume this will happen
A complete TypeScript adapter-layer pattern that isolates hand-written ad, billing, and analytics logic from AI-owned screens
A git format-patch workflow that turns manual fixes into assets you can mechanically re-apply after every export
Secure payment via Stripe · Cancel anytime

Unlock This Article

Get full access to the rest of this article. Buy once, read anytime. This site is ad-free — your support goes directly toward keeping it running.

or
Unlock all articles with Membership →
Share

Thank You for Reading

Rork Lab is ad-free, supported entirely by members like you. We publish practical guides daily with implementation code, benchmarks, and production-ready patterns. If you've found it useful, we'd love to have you on board.

  • Copy-paste ready implementation code
  • New advanced guides published daily
  • $5/mo or $10 for lifetime access
View Membership →

Related Articles

Dev Tools2026-05-19
Auto-Throttling AdMob When Crash Rates Spike: A Revenue-Protecting Brake Architecture with Rork, Firebase Remote Config, and Crashlytics
When crash rates spike, do you keep showing ads and watch your store rating crater, or pull back and accept the lost revenue? After 12 years of indie operations, my answer is neither: a four-state auto-throttle architecture that ties Firebase Remote Config and Crashlytics signals into AdMob serving decisions.
Dev Tools2026-06-12
Android 17 Will Ignore Your Portrait Lock — Getting Rork-Built Expo Apps Ready for Large Screens Ahead of Time
Android 17 stops honoring orientation locks and resizability restrictions on large-screen devices. Here is how I assessed the impact on my Rork-built Expo apps, reworked the layouts, and verified everything with nothing but an emulator.
Dev Tools2026-06-12
Your Rork App's 'Documents & Data' Keeps Growing — Taming expo-image's Disk Cache
My wallpaper app's binary was 40 MB, yet 'Documents & Data' had ballooned to 2.4 GB. Here is how I diagnosed expo-image's unbounded disk cache and fixed it with cachePolicy tuning, thumbnail URLs, and generational cache clearing.
📚RECOMMENDED BOOKS
Build a Large Language Model (From Scratch)
Sebastian Raschka
LLM Dev
Prompt Engineering for LLMs
Berryman & Ziegler
Prompting
AI Engineering
Chip Huyen
AI Eng
* Contains affiliate links
See all →