✓ ShippedByAgents
Practitioner (own blog/paper) Refactor / maintenance

One Luup backend engineer and Claude Code move a payment-critical legacy domain into DDD modules in about a month: 232 files, +38,000/-13,000 lines, seven stacked PRs, zero unapproved behaviour changes

Code for a Luup domain that applies user perks such as discounts, and so directly affects payment amounts, sat outside the backend's DDD module structure. Backend engineer Jang moved it with Claude Code under one rule: no unapproved difference from main in externally observable behaviour, including Firestore persistence format, API input and output, and calculations. The rule was written into the agent's memory file, and handoff and decision files carried context across 59+ sessions. The work was split into seven stacked PRs in a strangler-fig sequence: new modules added unused in PRs 1-5, traffic switched in PR 6 (revertible), and legacy deleted in PR 7 only after PR 6 ran cleanly in production. Characterisation tests pinned legacy behaviour first, production Firestore counts (0 invalid records in 540,000+ master-data documents) settled one design choice, and intentional differences were listed in PR descriptions. Five parallel AI review agents (behaviour diff, DDD rules, simplicity, performance, team checklist) found one must-fix fail-closed regression that could have withheld perks, plus 10 recommended fixes and 3 rejected false positives. Humans added 17 review comments.

The numbers (as reported)

DurationAbout 1 month, 1 engineer + Claude Code
Final diff vs main232 files, about +38,000 / -13,000 lines (net about +25,000)
PRs7 stacked PRs, about 50 commits
Claude Code sessions59+ (lower bound due to log retention)
Tests600+ Jest tests in the target modules kept green
AI review findings1 must-fix, 10 recommended, 3 false positives rejected; 17 human review comments

Facts

Company / subject
Luup
Tools
Claude Code
Codebase
brownfield
Work type
Refactor / maintenance
Stack
TypeScript, Firestore, Cloud Functions, Jest
Published
2026-07-17
Last checked
2026-11-23

What the source claims Practitioner (own blog/paper)

Claimed by the builder, writing about their own work. Not checked independently.

  • Legacy code moved into DDD modules (232 files, +38,000/-13,000 lines) in about a month by one engineer with Claude Code ~1 month, 232 files
  • AI review caught a behaviour-difference bug with user impact that humans alone might have missed 1 must-fix bug found
  • Over 600 Jest tests were kept green throughout 600+ tests

Caveats

Written in Japanese by the engineer who did the work on Luup's company blog. No manual-effort baseline is given. The one must-fix regression was introduced by the migration itself (the author and Claude Code), and one convention violation got past all five AI review agents; it was caught by a newer Claude model ('Fable') released mid-project. Circular imports were left unresolved.

More stories by tool: Claude Code

Related topics: Refactoring and maintenanceBrownfield codebases

Source

Luup Developers Blog on Zenn (Jang), in Japanese

One email a week: what actually shipped

New sourced stories, the numbers behind them, and what didn't work. No hype.

We'll only use this to send the newsletter. See the privacy page.