← All work

Consulting experience / Life Sciences / Scientific Testing

AI-Enabled Engineering Modernization for a Domain-Heavy Testing Platform

This scientific testing modernization work used AI to assist code investigation, test scaffolding, and documentation. Engineers reviewed the findings against domain behavior and used that context to implement clearer API and service responsibilities, behavioral checks, delivery automation, and operating guidance.

The contribution at a glance

Our role
AI-assisted investigation, domain-aware implementation, validation, and engineering handoff.
Work delivered
Domain and API mapping, behavioral checks, clearer service boundaries, delivery checks, and reviewed documentation.
Simplified view of the work
  1. 01

    Investigate the code

    Use AI assistance to surface questions and dependencies for engineer review.

  2. 02

    Check and refactor

    Connect domain behavior checks to changes in API and service responsibilities.

  3. 03

    Support ongoing work

    Deliver automated checks and documentation the team can inspect and use.

Scope & current status

AI-assisted engineering applied to modernization of an existing scientific testing platform.

The challenge

The platform had been built over several years by engineers and domain experts who understood the subject matter deeply. That domain expertise was genuinely reflected in the implementation — classification models, marker scoring routines, interpretation logic, and eligibility calculations were all implemented with real accuracy. What had not kept pace was the engineering architecture supporting that logic.

Domain logic was embedded throughout the codebase without explicit service boundaries. Classification models and scoring routines appeared in serializers, view-layer handlers, and processing functions — interleaved with validation, persistence, and API response formatting in ways that made any single behavior difficult to isolate or test. The API surface had grown incrementally over multiple product cycles, with endpoints accumulating multiple responsibilities that reflected the order in which features were built rather than a coherent design.

Test coverage was sparse. This was partly structural: when domain logic is tightly coupled to serializers and view handlers, writing a focused test for a classification calculation requires exercising the full API surface, which makes tests slow, fragile, and expensive to maintain. The absence of behavioral coverage meant that changes to the core processing logic carried genuine risk of undetected regressions in a context where result accuracy had direct downstream consequences for customers.

CI/CD existed in a minimal form. Pull requests were not automatically tested. Deployments involved manual steps known to a small number of individuals that had never been formally documented. The gap between what the team knew collectively and what the system required of anyone executing a deployment was wide enough to be an operational risk.

The broader challenge was not a single problem. It was an accumulation: technical debt across multiple layers, in a codebase carrying specialized domain knowledge that a conventional modernization approach — without AI-enabled tools — would have struggled to map systematically within a practical engagement timeline.

The approach

AI-assisted investigation helped locate domain logic, responsibility overlaps, and dependencies worth examining. Engineers checked those findings against the code and the domain before deciding what to change.

The work then established behavioral checks for important processing paths, refactored API and service responsibilities, and introduced automated delivery checks and operating documentation. AI-generated scaffolding and draft explanations were reviewed and corrected as part of the engineering work.

The work in detail

  1. 01

    AI-Accelerated Codebase Assessment

    Used AI tooling to systematically map the distribution of domain logic across the codebase, identify responsibility overlaps in the API surface, and surface the processing paths carrying the highest risk. Engineers checked the findings against source code and domain knowledge.

  2. 02

    AI-Assisted Test Generation for Domain Processing Paths

    Generated initial test scaffolding for classification modeling, marker scoring, and interpretation routines using AI tooling. Engineers validated and enriched the scaffolding against domain knowledge and real test data before any refactoring proceeded.

  3. 03

    API Refactoring and Concern Separation

    Extracted domain logic from serializer and view-layer handlers into explicit service boundaries. Refactored the API surface to DRF conventions with single-responsibility endpoints, separating validation, domain processing, and persistence into independently testable layers.

  4. 04

    CI/CD and Deployment Foundation

    Introduced automated test execution, linting, and build validation on every pull request. Documented deployment procedures previously held as institutional knowledge, removing single-person dependency from the deployment process.

  5. 05

    AI-Assisted Domain Documentation

    Used AI tooling to generate initial documentation for undocumented domain processing logic. Engineers reviewed, corrected, and refined the output into accurate technical documentation, architecture decision records, and operational runbooks.

  6. 06

    Knowledge Transfer and Modernization Enablement

    Delivered the AI-enabled engineering practices — test generation workflows, codebase analysis approaches, documentation patterns — as transferable skills for the internal team, enabling them to continue the modernization cadence independently after the engagement.

The outcome

The delivered work included clearer API and service boundaries, behavioral checks for domain processing, automated delivery checks, and operating documentation. AI supported investigation, test scaffolding, and documentation; engineers remained responsible for interpreting the domain behavior and reviewing changes.

Why it matters

The promise of AI in software engineering is often framed around speed: AI writes the code, engineers ship faster. The reality is more specific and more interesting. AI is genuinely useful at the parts of engineering work that are systematic and scale-dependent — traversing a large codebase to map where logic lives, generating initial test scaffolding for functions with known inputs and outputs, drafting documentation for routines that have never been described in prose. These are tasks that benefit from the ability to process large amounts of material quickly and consistently. Human judgment is required for what comes after: deciding what the findings mean, validating that the generated tests are testing the right thing, determining whether a refactoring has preserved semantic correctness in a domain where "correct" means something specific.

In a domain-heavy testing platform, that domain specificity is high. A test that passes on a scoring function is not meaningful validation unless an engineer who understands the domain logic has confirmed that the expected output in the test is actually the correct output — not just that the code produces a consistent result. AI tooling cannot substitute for that judgment. It can accelerate the work that surrounds it.

This is the pattern that makes AI-enabled engineering a durable practice rather than a productivity gimmick: AI handles the scale problem, humans handle the judgment problem. In modernization engagements, those two problems appear together constantly — a codebase large enough that comprehensive manual analysis is impractical, but domain-specific enough that automated analysis without interpretation produces misleading or incomplete results. Getting both right is what makes the difference between a modernization engagement that moves quickly and produces reliable outcomes and one that simply moves quickly.

Related work