Why CutOnce Is a Monorepo

Scott Brady

By

Software engineer in Seattle and DIY builder who makes the CutOnce construction calculator.

  • ai
  • agents
  • monorepo
  • cutonce

CutOnce is two native apps and a website, and all of it lives in one Git repository. That makes it much easier to keep the three in lockstep. Agents have always written the code for CutOnce, and a monorepo suits the way they work.

What is in the repo

The top level looks like this:

Directory What it holds
ConstructionCalc/ The iOS app, in Swift and SwiftUI
CutOnceAndroid/ The Android app, in Kotlin and Jetpack Compose
marketing/site/ The website, in Next.js and TypeScript
docs/ The design system and other shared docs
testcases/ Calculator test cases written out as Markdown, 17 files
scripts/, .buildkite/ Tooling and CI for all three projects
.claude/skills/ The skills that run my agent pipeline

The two apps share no code. I explained that choice in Native Apps Are Affordable Again. They do share a repository, a ticket queue, a set of instructions, and a CI pipeline.

The general case for a monorepo

These benefits apply to any project with more than one deliverable, whoever writes the code.

Atomic changes. A change that spans projects is one commit, and all of it merges at once. With separate repositories, the same change is several pull requests that have to land in the right order, and until the last one lands, the repositories disagree with each other.

Shared history. git log shows what changed across the whole product, and git bisect works across project boundaries. A revert takes the iOS half and the Android half of a change out together.

One set of standards. Lint configuration, the design system, review rules, and the definition of done are written once and apply everywhere.

Checks that cross project boundaries. A script can read files from two projects and fail the build when they disagree. Across separate repositories that takes published packages or version pins. In one repository it takes a relative path.

Less to keep track of. There is one clone, one issue tracker, one CI pipeline, and one list of open pull requests.

Lockstep in one pull request

The definition of done in the root AGENTS.md starts with this rule:

Both platforms. Calculator fixes and features ship on iOS and Android, with regression tests on each.

In the 30 days from October 21 to November 19, 2026, 508 commits landed on main. Of those, 346 touched app code, and 153 changed the iOS app and the Android app in the same commit.

One of them was the fix for a rounding bug in the Tile calculator, merged on November 17. Switching units could make the number of boxes of tile drop, and the fix rounds Area per Box down on a unit switch so the box count never drops. The pull request changed 13 files:

  • the Swift fix and its tests
  • the same fix in Kotlin and its tests
  • two generated source files, one per app
  • a JSON data file in the website

CutOnce publishes the number of shared test vectors, the cases that run identically on iOS and Android, on its How we verify accuracy page. A script reads the test suites of both apps, counts the cases present on both, and writes the result into the Swift source, the Kotlin source, and the website’s data. This fix added four shared cases, so the published total went from 1,710 to 1,714 in the same commit that added the tests.

On main, there was no point at which iOS had the fix and Android did not, and no point at which the website’s number was behind the code. CI fails if the generated files are stale, so the three cannot drift apart on main.

In separate repositories that fix would be three pull requests. The script that counts shared tests would need both app repositories checked out side by side, and somebody would have to decide which commit of each one the count describes.

Why this suits agents

One checkout holds the whole task

Each ticket gets its own Git worktree, and the agent working the ticket starts there. That one directory has the Swift implementation, the Kotlin implementation, the website’s TypeScript ports, the test cases, and the design system docs.

When Sonnet ports a fix, the Swift source and the Swift tests are in the same directory tree, at the same commit. Nothing has to be fetched from another repository, and there is no question of which version of the other side to read.

One ticket, one branch, one review

My pipeline is built around the GitHub ticket. A ticket has one plan, one branch, one pull request, one CI run, and one merge. That mapping holds because a ticket’s whole change fits in one repository.

It also helps review. Opus and Astra review the diff with fresh context, and the diff they get contains both platforms. A reviewer can check that the Kotlin matches the Swift because both are in front of it. With one pull request per repository, each review would see only part of the change.

A split would also add coordination work to every ticket that spans projects: tracking which of three pull requests have merged, in what order, and what to do when the second one fails CI after the first has landed.

Instructions live next to the code

The root AGENTS.md holds the rules that apply to everything, including the definition of done. Each project has its own AGENTS.md with its conventions and gotchas, and an agent reads the ones for the directories it works in. The skills that run the pipeline are in .claude/skills/ in the same repository.

When a rule changes, it changes in one commit and every agent that starts after that reads the new version. The design system works the same way. A pull request that adds a reusable component or a token has to document it in docs/design-system/ in the same pull request, so the docs an agent reads describe the code it is about to change.

Cross-project checks are plain scripts

I wrote in the pipeline post that agents work best with a clear goal and a way to verify they reached it. A monorepo makes it cheap to add verification that spans projects, because a check is a script with relative paths:

  • The shared test vector check counts the cases in both apps’ test suites and fails if the generated files are stale.
  • The website’s free calculators are TypeScript ports of the app’s math. The site build runs vectors taken from the app’s own test cases against each port and fails on a mismatch.
  • A release notes check in the website’s scripts compares the notes with the version numbers in the iOS project.yml and the Android build.gradle.kts.

Each check turns “keep these in sync” from an instruction an agent might forget into a failing build it has to fix.

What it costs

CI has to be selective. A change to the Android app should not run the iOS UI tests, so the pipeline decides which steps to run from the paths that changed. A platform’s UI test step runs only when its app code or its test runner changed.

The repository is large. The .git directory is 1.1 GB and there are about 6,500 tracked files. Every ticket’s worktree is a full checkout of all three projects.

Summary

CutOnce’s two apps share no code. What holds them together is the shared test vectors, the both-platforms rule, and a repository where one pull request can change both apps. The agents do the duplicated work, and the monorepo makes each piece of it a single reviewable, revertable change.

← All posts