Skip to content

Architecture, modernization and mentoring

Legacy system modernization with Spec-Driven Development

Upgrade the system your business depends on without stopping operations: automated tests check every step before each version switch. For business and technology leaders.

Free first conversation · Reply within 1 business day

Facts behind this service

  • Regal Rexnord (NYSE: RRX): PHP 5.6 → 8.4, 10 versions, zero-downtime cutovers

  • Two systems migrated from CodeIgniter 2 to 3, with unit-test suites

  • Quilt Software / PosNation: test suite from 540 to 1,455 in 3 weeks

  • Claude Code used to reverse-engineer undocumented legacy code

Recognize this situation?

  • The system runs on an unsupported PHP or framework version, and every server update turns into a risk.

  • There are no tests and no documentation: only one or two people understand the business rules, and they may leave.

  • A rewrite from scratch looks like the way out, but operations cannot stop or wait for the new version to catch up.

  • Every deploy is manual and tense, and the team spends more time firefighting than delivering the roadmap.

What we deliver

  • Legacy assessment

    Legacy assessment

    An inventory of versions, dependencies, integrations and untested areas, with a modernization plan in steps ordered by risk and by business value.

  • Tests before cutover

    Tests before cutover

    Unit and integration tests that pin down the current behavior of the system before any change, so every step is validated against what already works.

  • Incremental language and framework upgrades

    Incremental language and framework upgrades

    Version-by-version upgrades of PHP, CodeIgniter and Laravel, fixing the incompatibilities at each jump while the system stays in production the whole way.

  • Documentation recovered by reverse engineering

    Documentation recovered by reverse engineering

    Specs, business rules and OpenAPI contracts recovered from the code with AI and reviewed by people who know the operation, so the system stops depending on one or two people.

  • CI/CD and quality gates

    CI/CD and quality gates

    Deploys stop being manual: a pipeline with automated tests, static analysis and pre-commit hooks, and no change reaches production without passing the same criteria.

  • Reproducible environment and cutover plan

    Reproducible environment and cutover plan

    A Docker development environment that is the same for the whole team and a cutover runbook with acceptance and rollback criteria set before the date.

See also: AI coding agents, software architecture consulting, and custom software development.

Event-driven architectureEach domain sits isolated behind an API with contracts. Services publish events to a bus with queues and retries, and workers handle integrations and per-tenant data, without coupling one domain to another.
Web, mobile, desktopapps and partnersAPI and authOpenAPI contractsOrdersPaymentsInventoryEventsKafka, queues, retriesWorkersPer-tenant data

Results and experience

  • Regal Rexnord (NYSE: RRX)

    Scope:
    PHP legacy modernization

    Upgrade of critical applications from PHP 5.6 to 8.4 and migration of two systems from CodeIgniter 2 to 3.

    • PHP 5.6 → 8.4 (10 versions)
    • Unit-test suites for zero-downtime cutovers
    • Claude Code used to reverse-engineer undocumented code
    • Docker development environment

    Read the case study

  • Quilt Software / PosNation

    Scope:
    Tests and quality gates on a legacy platform

    Tests and quality gates on a legacy PHP (~160K lines) and React/TypeScript (~88K lines) platform shared by ~18 engineers.

    • Jest test suite: from 540 to 1,455 in 3 weeks
    • CI and pre-commit gates
    • JavaScript bridges between the desktop app and the legacy web POS

    Read the case study

  • Show more results
  • MPC (Mobile Price Card)

    Scope:
    Multi-tenant user management

    Related experience: multi-tenant user management system built from scratch on Laravel 12 and Vue 3 for a retail-pricing platform in 20,000+ locations.

    • 24REST operations documented in OpenAPI
    • ~400tests
    • Backend, frontend and mobile pull request reviews

    Read the case study

  • The Hackett Group (NASDAQ: HCKT)

    Scope:
    Spec-Driven Development with AI coding agents

    Related experience: the same method, Spec-Driven Development with AI coding agents, as the engineering operating model.

    • 45specs and 39 ADRs
    • 139functional and non-functional requirements with traceability
    • Assessment of a platform of ~325K lines of code

    Read the case study

Facing a similar challenge? Tell us the problem and the timeline.

Request a first call

Free first conversation · Reply within 1 business day

Who it is for and who it is not

Legacy modernization is upgrading an aging system the business uses every day, in small steps and without stopping operations. Spec-Driven Development is the method: before any change, current behavior is written down and covered by automated tests. Hire it when the version is out of support, every update is feared or the system has stopped evolving.

A good fit for

  • CTOs with critical systems on old or unsupported versions of PHP, CodeIgniter or Laravel.
  • Companies whose operations depend on the system every day and cannot stop for a rewrite.
  • Teams that inherited code with no tests and no documentation and need to evolve the product safely again.
  • Companies that want to adopt Spec-Driven Development starting from a system already in production.

Not a fit for

  • Small, rarely used systems, where replacing them with an off-the-shelf SaaS costs less than modernizing.
  • Anyone who wants a full rewrite on another stack, all at once: that is a custom software project.
  • Mainframe, COBOL or customization of packaged ERPs: our experience is with web applications, APIs and PHP.
  • Projects with no business owner available to validate rules and acceptance criteria.

How it works and timelines

  1. Discovery

    Discovery

    We read the code and map versions, dependencies, integrations and untested areas. You receive a risk report and the modernization plan in steps, with an estimate for each one.

  2. Safety net: specs and tests

    Safety net: specs and tests

    We recover the business rules by reverse engineering and write the tests that pin down current behavior. You receive the specs, the test suite and a working CI.

  3. Pilot on one module

    Pilot on one module

    We modernize one module end to end, from upgrade to cutover, to validate the method on your system. You receive the module in production and a revised estimate for the rest.

  4. Incremental modernization

    Incremental modernization

    Version-by-version upgrades, with frequent releases and the system live. A step only moves forward with the tests passing. You receive each step in production, with its rollback runbook.

  5. Handover and evolution

    Handover and evolution

    Documentation, pipeline and standards stay with your team, with mentoring to keep the pace. Evolution of the system can continue under a monthly retainer.

Typical ways to engage this service
ScopeTypical timelineEngagement model
Legacy assessmentInventory of versions, dependencies and risks, a modernization plan in steps and an estimate1–2 weeksFixed-scope project
Modernization pilotOne module with tests, upgrade and cutover in production, to validate the method2–4 weeksFixed-scope project
Incremental modernizationLanguage and framework upgrades, tests, CI/CD and documentation, with the system live6–12 weeksFixed scope per step or time & materials with a cap
Ongoing evolutionFurther upgrades, continuous improvement and team mentoringOngoingMonthly fractional retainer

Timelines are typical ranges. Discovery defines the scope and the estimate of each project; the contract can be in USD or BRL.

Want to know which format fits your project?

Request a first call

Free first conversation · Reply within 1 business day

Technical details

How we use AI with governance, the decision comparison and the stack

AI with governance

We use AI coding agents to understand and refactor legacy code faster, under one rule: no AI-generated change goes in without an approved spec, passing tests and human review.

  • Where AI comes inClaude Code reads undocumented code, maps dependencies and proposes specs and tests that describe current behavior.

  • Spec firstIn Spec-Driven Development, the expected behavior is written and approved before the agent changes a single line.

  • What humans reviewThe recovered business rules, the plan for each upgrade and every merge go through senior human review.

  • Quality gatesAutomated tests, static analysis and pre-commit hooks block any change that breaks current behavior.

  • Team adoptionPutting AI coding agents into your engineering routine is the subject of the AI software automation service.

  • Your dataClient data never trains models, and we work under NDA.

Decision comparison

Rewrite from scratch, modernize incrementally or keep as is: how to decide
CriterionRewrite from scratchIncremental modernizationKeep as is
When it makes senseThe current architecture blocks the business or the technology has no upgrade pathThe system works and holds business rules that must not be lostThe system will be retired soon or has low business impact
Operations during the workTwo systems in parallel until the switchThe system stays in production; each step goes live separatelyNo change
ReturnShows up only after the full switchShows up with every step deliveredNone; maintenance cost tends to grow
Main riskUndocumented business rules are left out of the new versionRequires test discipline and living with old code for a whileUnsupported versions accumulate security flaws and technical debt
PrerequisiteA complete specification of current behaviorTests that pin down current behavior before each changeA retirement or replacement plan

Stack and integrations

  • PHP
  • CodeIgniter
  • Laravel
  • MySQL
  • SQL Server
  • PostgreSQL
  • React
  • Vue.js
  • TypeScript
  • PHPUnit
  • Jest
  • Playwright
  • Docker
  • GitHub Actions
  • OpenAPI
  • Claude Code

Frequently asked questions about Legacy Modernization

Should we rewrite or incrementally modernize a legacy PHP system?

In most cases, modernize in steps: the system stays in production, the return shows up with every delivery and the accumulated business rules are not lost. A rewrite is justified when the current architecture blocks the business or the technology has no upgrade path. A 1–2 week discovery compares both paths using the data of your system.

How do you upgrade a legacy PHP system without downtime?

With tests that pin down current behavior and upgrades one version at a time, each with a rollback runbook: that is how we took Regal Rexnord's applications from PHP 5.6 to 8.4 without downtime. The step-by-step is in our guide “PHP 5 to PHP 8 Migration Without Downtime”.

How long does a legacy modernization take?

Typical timelines are: discovery in 1–2 weeks, a pilot on one module in 2–4 weeks and each modernization cycle in 6–12 weeks. Large systems are split into cycles, and every cycle ends with something in production. The biggest factors are the size of the codebase, the existing test coverage and the number of integrations.

What if the system has no tests and no documentation?

That is the most common starting point, and the work begins right there: we recover the business rules by reverse engineering and write tests that pin down current behavior before changing anything. At Quilt Software / PosNation, we took the suite from 540 to 1,455 tests in 3 weeks, on a legacy PHP and React/TypeScript platform shared by about 18 engineers.

How is AI used safely on legacy code?

AI reads and proposes; a person decides, with senior review, and nothing reaches production without an approved spec and passing tests. AI coding agents such as Claude Code speed up reverse engineering, test writing and refactoring. At Regal Rexnord, we used Claude Code to understand undocumented legacy code. Client data never trains models, and we work under NDA.

What is Spec-Driven Development, and does it work for legacy code?

Yes. Spec-Driven Development (SDD) means writing and approving the specification, with acceptance criteria, before the code. On legacy code, the first step is turning current behavior into specs and tests; from there, every upgrade has a clear target and an objective check. The full method is in our guide “What Is Spec-Driven Development (SDD)?”.

When is it worth modernizing a legacy system?

It is worth it when the system sustains operations and at least one of these signs shows up: a version without security support, risky deploys, difficulty hiring for the technology or new features that take longer every time. If the system has low impact or will be retired, keeping it as is can be the right call, and we tell you so in the first conversation.

How much does legacy modernization cost?

The cost depends on the size of the codebase, the existing test coverage, the number of version jumps and the integrations. That is why we do not publish a price list. A 1–2 week discovery produces the plan in steps and an estimate for each one. The proposal can be fixed scope per step or time & materials with a cap, in USD or BRL.

About Master Timm

Master Timm

AI-focused IT consultancy

Get to know Master Timm

Senior engineering from discovery to delivery: whoever designs the architecture also writes and reviews the code.

  • 20+ years of software engineering experience
  • Projects for US and Brazilian companies, under B2B contracts
  • Specs, tests and documentation in the client's repository
  • Fixed scope, capped time & materials or retainer, in USD or BRL

Why Brazil

  • São Paulo is 1–2 hours ahead of US Eastern Time, so working hours overlap.
  • We work in English: calls, specs and documentation.
  • Remote B2B work for US companies since 2022.
  • Scope, ownership and confidentiality are set in the contract before work starts.

Master Timm · Updated on

Let's assess your legacy system

In the first conversation we look at the versions, tests and risks of your system and tell you plainly whether the path is to modernize in steps, rewrite or keep it as is.

Request a first call

Free first conversation · Reply within 1 business day