Code is Science is back: the journal code policy tracker now covers 24 journals.See the tracker

Outsourcing research software development: how to brief, contract and hand over

When to bring in an outside team, which contract model fits, who owns the code, how to budget it in a grant and what a complete handover looks like.

PracticeBy the Code is Science editorsDec 1, 202613 min read
Line illustration of a lab table with a microscope, flask and plants linked by dotted lines to a folder of code, a laptop and a small server rack
Key takeaways
  • Outsource the engineering, never the science: the lab keeps the research question, the validation data and the final say on correctness.
  • Write a software development plan before asking for quotes, and split the work into stages that each end with something the lab can use.
  • Custom software usually cannot be a "work made for hire" under US law, so the contract needs a written copyright assignment or licence and an agreed open-source plan.
  • The code lives in a repository the institution controls from the first commit, with tests, documentation and an archived release at handover.

Outsourcing research software development means paying an outside engineer or team to build or rebuild a tool that a research group needs, while the group keeps the science. In short: decide what must stay in the lab, write a short software development plan, pick a contract model that matches how uncertain the work is, settle code ownership and the open-source licence before anyone writes a line, keep the code in your own repository, and plan the handover and maintenance from the start.

Most research code is written by the people who use it: a PhD student, a postdoc, sometimes the PI on a weekend. That works until the code has to serve other groups, run for years, pass a hospital security review or sit behind a public web portal. Then the job looks more like product engineering than research, and the group has to decide whether to hire, borrow an institutional research software engineer or contract the work out.

When there is no RSE group to borrow from and a permanent post is not on the table, many labs compare a short-term hire against software outsourcing services that place engineers inside the lab's own repository and workflow for the length of a project. This guide walks through that decision from the research side: what to keep, what to put in writing and how to make sure the result is still reviewable, citable research software when the contract ends.

When does outsourcing research software make sense?

Outsourcing makes sense when the hard part of the work is engineering rather than research, and when the lab cannot get that engineering from inside the institution in time.

Typical signals that a project has crossed that line:

  • Other people depend on the tool. Collaborators, a consortium or the public use it, and a crash now stops their work as well as yours.
  • The code has to outlive its author. The postdoc who wrote it leaves next year and nobody else understands it.
  • There are non-research requirements. User accounts, security reviews, accessibility, uptime, app store rules or integration with clinical or institutional systems.
  • The scale changed. A script that processed one dataset now has to process hundreds, on a cluster or in the cloud.
  • The skills are missing. Mobile apps, web front ends or database design that nobody in the group has done before.

Outsourcing makes less sense when the method itself is still changing every week. If the algorithm is the research, the people doing the research should write it. A contractor can still help with the parts around it, such as tests, packaging, a user interface or a data pipeline, but should not be the only person who understands the core method.

Who can build it: RSE group, freelancer or outside team?

Ask inside the institution first, then look outside. The right builder depends on how long the work lasts and how much of it is research.

OptionGood forWatch out for
Fixed-term hire in the labLong projects where the engineer should learn the domain deeplyRecruitment takes months; the knowledge leaves when the contract ends
Institutional RSE groupResearch-aware engineering, charged by time or written into grantsQueues and capacity; not every institution has one
National or regional centresCollaborations funded through open calls, such as those run by the Netherlands eScience CenterCall deadlines and eligibility rules
Individual freelancerSmall, well-defined jobs: a plugin, a refactor, a dashboardSingle point of failure; limited cover for holidays and illness
Development company or team augmentationLarger builds, several skills at once (back end, mobile, design, testing), firm deadlinesLess domain knowledge at the start; needs a clear scope and a lab-side owner

Our guide to research software engineers explains how institutional RSE groups work and how to find one. The US Research Software Engineer Association and the Society of Research Software Engineering in the UK both list groups and contacts, which is a quick way to check whether help exists nearby before going to the open market.

Which contract model fits a research project?

Choose the contract model by how well you can describe the result in advance. Research projects are rarely fully specified, so pure fixed-price contracts are often a poor fit.

ModelHow it worksFits whenRisk for the lab
Fixed priceOne price for an agreed specificationThe output is well known: port a tool to a new framework, build a defined APIEvery change becomes a negotiation; vendors price in uncertainty
Time and materialsYou pay for hours or days actually workedExploratory work where requirements will moveCosts can drift without a budget cap and regular reviews
Capped time and materials in stagesHourly billing inside a ceiling, with a review gate after each stageMost research software projectsNeeds a lab-side owner who actually attends the reviews
Team augmentationEngineers join your team and work under your directionThe lab has technical leadership but lacks hands or specific skillsYou carry the project management and the design decisions

Whatever the model, ask for the work to be split into stages that each end with something usable. If the money runs out halfway, the lab should still own a working, documented tool rather than half of a large one.

How do you write a scope a contractor can price?

Write a short software development plan before you ask anyone for a quote. University-industry guidance from UIDP recommends exactly this for sponsored projects: a plan with clear parameters for how the code will be written, documented, secured and validated (UIDP Contract Accord 16: Software). Two to four pages is enough for most projects.

  1. Purpose and users. What the software does, for whom, and what research question it serves.
  2. Current state. Existing code, languages, data formats and where they live. Attach a sample dataset that contains no personal data.
  3. Scientific correctness. Reference outputs, validation datasets or published results the new code must reproduce, and the tolerance you accept.
  4. Functional requirements. The few things it must do, ranked. Mark nice-to-haves clearly.
  5. Non-functional requirements. Platforms, expected data volumes, security and data protection rules, accessibility, hosting.
  6. Engineering standards. Version control, automated tests, code review, documentation, licence. Our software management plan guide has a template you can reuse.
  7. Stages and acceptance. What "done" means for each stage, and who in the lab signs it off.
  8. Handover and maintenance. What you receive at the end and what support, if any, continues afterwards.

The acceptance criteria matter most. "The pipeline reproduces Table 2 of the 2024 paper to three decimal places on the reference dataset" is a criterion a contractor can test against. "The pipeline works well" is not.

Who owns the code, and can you still release it openly?

Settle ownership and the licence in the contract, before work starts. Many researchers assume that paying for software means owning it. In the United States that is not automatic.

  • "Work made for hire" rarely covers contractor software. For independent contractors, US copyright law (17 U.S.C. ยง 101) limits work made for hire to nine listed categories of commissioned work, and custom software usually does not fit any of them. Guidance for technology transfer offices, such as CASRAI's note on work made for hire, therefore recommends a written copyright assignment clause as well.
  • Background code stays with its owner. Contractors often reuse their own libraries. The contract should list them and grant the institution a perpetual licence to use them inside the delivered software.
  • Agree the open-source plan up front. If you intend to publish the code, say so in the contract and name the licence. The contractor then knows not to mix in code that would prevent it. The Open Source Initiative licence list and our licence primer for research code help with the choice.
  • Ask for a dependency list. Require a list of third-party packages and their licences with every stage, ideally as a software bill of materials in a standard format such as SPDX. It shows early if a copyleft or non-commercial dependency conflicts with your licence plan.
  • Ask about AI coding assistants. If the team uses them, ask how generated code is reviewed and checked against the licence plan, and write the answer into the contract.
  • Involve your institution. Your technology transfer office or research contracts team usually has template clauses and may already have a framework agreement with approved suppliers.

Outside the US the details differ, but the practical rule is the same everywhere: get ownership, licence and permission to publish in writing, signed before the work begins.

How do you budget outside development in a grant?

Get a realistic quote before the proposal is submitted, and budget for maintenance as well as the build. A number guessed during proposal writing is often too low, and the gap then comes out of research time.

  • Classify the arrangement correctly. US federal awards distinguish a subrecipient, who carries out part of the research, from a contractor, who provides goods or services (2 CFR 200.331). Software built to your specification is usually a contractor relationship, which affects paperwork and procurement rules. Ask your grants office.
  • Follow procurement rules early. Above certain amounts, institutions require competitive quotes or a tender. Starting that process after the award can delay the project by months.
  • Stage the payments. Tie payments to accepted stages, not to dates, so the budget follows delivered work.
  • Keep a maintenance line. Dependencies, operating systems and browsers change every year. Our article on funding the maintenance of research software covers where that money can come from.
  • Write the software into the data management or software management plan. Funders increasingly ask what happens to software after the grant; a contractor-built tool needs the same answer as any other.

How do you choose between teams?

Choose the team that asks the best questions about your research, not the one with the most polished proposal. A short paid discovery stage, often one or two weeks, is a cheap way to see how a team works before committing to the full build.

Questions worth asking every candidate:

  1. Have you built software for researchers before, and can we talk to one of those groups?
  2. How will you check that the new code gives the same scientific results as the old one?
  3. Will you work in our repository from the first day, with our issue tracker?
  4. What tests and documentation are included in the price?
  5. Who exactly will work on the project, and what happens if that person leaves?
  6. How do you handle personal or sensitive research data, and where will it be processed?
  7. Which of your own libraries do you plan to reuse, and under what licence?
  8. What does the handover look like, and what does support after delivery cost?

Be wary of answers that promise to replace the lab's judgement. A good outside team will say plainly which decisions belong to the researchers.

How do you keep the work reviewable while it is built?

Keep the code, the data and the decisions inside the lab's systems, and review the work as it happens rather than at the end.

  • One repository, owned by the institution. The contractor works in your organisation's account from the first commit. See our Git guide for researchers if the group does not use version control yet.
  • Data stays in your environment. Give the contractor access to anonymised or synthetic data where possible, and to real data only inside approved infrastructure.
  • A named lab-side owner. One person in the group reviews pull requests, answers domain questions within a day or two and attends stage reviews.
  • Automated tests from the start. Regression tests against reference outputs run on every change. Our guide to testing research code explains where to begin.
  • Decisions written down. Short notes in the repository on why a method, library or data format was chosen. They are what the next person will need.

If the job is to rebuild an old codebase rather than start fresh, the same rules apply, with extra care to change behaviour only on purpose. Our article on modernizing legacy research code covers that case.

What should the handover include?

A handover is complete when someone in the lab who did not write the code can install it, run it, test it and release a new version. Ask for the following, and check each item yourself before final payment:

  1. All source code, build scripts and infrastructure configuration in your repository, with a tagged release.
  2. A README with installation, usage and a worked example; our guide to writing a README for research code shows what to include.
  3. The automated test suite, passing in continuous integration.
  4. The dependency list with licences, and the signed ownership and licence documents.
  5. Credentials and accounts (domains, cloud, app stores) transferred to institutional owners.
  6. A recorded walkthrough of the architecture for future team members.
  7. An archived release with a DOI, following our guide to archiving code with a DOI, so papers can cite the exact version.

Credit contributors properly too. If the contractor's engineers made a substantial contribution, list them in the software's citation file and consider acknowledging them in papers that use it.

What usually goes wrong?

The problems below are mostly organisational rather than technical, which means the lab can prevent most of them before the contract is signed.

ProblemTypical causePrevention
Results quietly changeNo reference outputs or regression testsAcceptance criteria tied to validation data; tests in CI
Lab cannot maintain the codeCode kept in the vendor's systems; no documentationInstitution-owned repository; handover checklist before final payment
Code cannot be publishedOwnership or dependency licences unclearAssignment clause, named licence, dependency list every stage
Budget runs out earlyFixed scope for uncertain work; no stagesCapped time and materials with review gates
Data protection incidentReal personal data copied to a contractor's laptopSynthetic data for development; approved infrastructure only
Slow progressNobody in the lab answers questionsA named lab-side owner with time set aside each week

What to do this week: prepare to brief a team

  1. Write one paragraph on what the software must do and for whom, and one list of what must stay in the lab.
  2. Ask your institution whether an RSE group or a framework agreement with approved suppliers exists.
  3. Collect reference outputs and a shareable sample dataset for acceptance testing.
  4. Draft the two-to-four-page software development plan using the eight headings above.
  5. Book a meeting with your contracts or technology transfer office about ownership and the open-source licence.

Questions about outsourcing research software

Can a research lab outsource software development at all?

Yes. Labs regularly contract freelancers, development companies or institutional RSE groups. The lab should keep the research question, the validation data and the final decisions on correctness, and the contract should go through the institution's procurement and contracts offices.

Who owns software written by a contractor for a university?

It depends on the contract. In the US, custom software from an independent contractor usually does not qualify as work made for hire, so the agreement should include a written copyright assignment or a licence to the institution.

Can outsourced research code be released as open source?

Yes, if the contract says so. Name the licence before work starts, require a list of third-party dependencies and their licences, and make sure the contractor's reused libraries are licensed compatibly.

Is fixed price or time and materials better for research software?

Capped time and materials split into stages usually fits best, because research requirements change. Fixed price suits well-defined jobs such as porting a tool or building a specified API.

How do you check that a contractor's code gives correct scientific results?

Agree reference datasets and expected outputs in the scope, write them into acceptance criteria and run them as automated regression tests on every change.

What should a lab receive at the end of an outsourced project?

The full source in an institution-owned repository, a README, a passing test suite, dependency and licence records, transferred accounts, an architecture walkthrough and an archived release with a DOI.

Keep reading. More from the desk.