Skip to content
Alpha

This site is an alpha version and is still being developed in the open - your feedback will help us improve it. See the roadmap. Last updated: 14 October 2026.

Version in force: 0.3.0 (6 October 2026).

Software development

How we write, test and ship code so that any Defra team, or any partner, can pick it up and run with it.

Who these guardrails apply to

The core department. Whether the software development guardrails also apply to Defra's arm's length bodies is still to be confirmed.

Looking for detailed coding guidance?

These guardrails set the boundaries. The Defra software development standards are the detailed, practical guide to languages, coding style, testing, source control, versioning and release - follow them for day-to-day engineering.

GR-DEV-01 Use the supported languages and frameworks

Should Use Defra's approved technologies and languages for new services so that skills, libraries and support are shared.

The list, and the reasons for each choice, are in approved technologies and languages in the Defra Digital Service Manual and in the Defra software development standards. In short: Node.js with hapi for front-end and back-end services, GOV.UK Frontend Nunjucks templates, .NET or Python only where Node.js is not suitable, and no other front-end frameworks. Review approved technologies, and request new ones, on the Defra Tools Radar, which needs a Defra network and sign-in.

Why: A small, well-supported set of technologies makes it easier to move people between teams, share components and support services for the long term.

How to meet it: If you need something else, request it through the Tools Radar and record the reason in an ADR, including how the service will be supported after the team moves on. The Delivery Architecture team handles exceptions to the software development standards.

Phases, evidence and status for GR-DEV-01
Status
Draft
Phases
Alpha
Led by
Technical architect, Developer
Evidence
ADR recording the reason wherever the service uses a different stack
Automated check
Manual
Maps to
Service Standard 11
DDTS doctrine
1, 2, 3
Owner
Architecture team, last reviewed 2026-10-01, since v0.1.0

GR-DEV-02 All code in Defra source control

Must All source code, including infrastructure and pipeline code written by suppliers, lives in a Defra-owned GitHub organisation from day one.

Why: Defra owns what it pays for and must be able to change supplier without losing code or history.

Phases, evidence and status for GR-DEV-02
Status
Draft
Phases
Alpha, Beta, Live
Led by
Developer, Delivery manager
Evidence
  • Alpha: All code, including prototypes and infrastructure code written by suppliers, in a Defra-owned GitHub organisation from the first commit
  • Beta: All source, infrastructure and pipeline code in the Defra GitHub organisation, with nothing held only by a supplier
  • Live: All changes made in the Defra GitHub organisation
Automated check
Manual
Maps to
Service Standard 12
DDTS doctrine
1, 2, 3
Owner
Architecture team, last reviewed 2026-10-01, since v0.1.0

GR-DEV-03 Protect the main branch

Should Main branches are protected: changes arrive through pull requests with at least one review and passing automated checks.

Phases, evidence and status for GR-DEV-03
Status
Draft
Phases
Alpha, Beta, Live
Led by
Developer
Evidence
  • Alpha: Main branch protected from the start, with changes through reviewed pull requests
  • Beta: Branch protection requiring at least one review and passing checks
  • Live: Branch protection still in place on every repository
Automated check
Guardrail check (tools/guardrail-check): default branch protected by branch protection or a ruleset
Maps to
Secure by Design principles 10
DDTS doctrine
1, 2, 3
Owner
Architecture team, last reviewed 2026-10-01, since v0.1.0

GR-DEV-04 Continuous integration and delivery

Should Every change is built, tested, scanned and deployed by an automated pipeline. Releases to production are small, frequent and reversible.

Phases, evidence and status for GR-DEV-04
Status
Draft
Phases
Beta, Live
Led by
Developer
Evidence
  • Beta: Every change built, tested, scanned and deployed by an automated pipeline, with rollback tested
  • Live: Deployment history showing small, frequent, reversible releases
Automated check
Manual
Maps to
Service Standard 14; Secure by Design principles 10
DDTS doctrine
1, 2, 3
Owner
Architecture team, last reviewed 2026-10-01, since v0.1.0

GR-DEV-05 Automated testing at the right levels

Should Use a balanced set of automated tests - unit, integration/contract, end-to-end journey, accessibility, performance and security - run in the pipeline.

Phases, evidence and status for GR-DEV-05
Status
Draft
Phases
Alpha, Beta, Live
Led by
Developer
Evidence
Test results from the pipeline at each level
Automated check
Manual
DDTS doctrine
1, 2, 3
Owner
Architecture team, last reviewed 2026-10-01, since v0.1.0

GR-DEV-06 Manage dependencies actively

Should Use automated dependency updates and software composition analysis, and keep runtimes on supported versions.

Why: Unpatched dependencies are one of the most common ways services are compromised.

Phases, evidence and status for GR-DEV-06
Status
Draft
Phases
Beta, Live
Led by
Developer
Evidence
  • Beta: Dependabot or Renovate configured, software composition analysis in the pipeline, and runtimes on supported versions
  • Live: Dependency updates merged promptly and runtimes upgraded before they go out of support
Automated check
Guardrail check (tools/guardrail-check): Dependabot or Renovate configured
DDTS doctrine
1, 2, 3
Owner
Architecture team, last reviewed 2026-10-01, since v0.1.0

GR-DEV-07 Follow shared coding standards

Should Use automated linting and formatting, and follow the Defra software development standards, so code looks and behaves consistently across teams.

Phases, evidence and status for GR-DEV-07
Status
Draft
Phases
Alpha, Beta, Live
Led by
Developer
Evidence
Linting and formatting checks in the pipeline
Automated check
Lint and format checks in the pipeline
DDTS doctrine
1, 2, 3
Owner
Architecture team, last reviewed 2026-10-01, since v0.1.0

GR-DEV-08 Document as you go

Should Each repository has a README explaining what it does, how to run it locally, how to test it and how to deploy it, and links to its ADRs.

Phases, evidence and status for GR-DEV-08
Status
Draft
Phases
Alpha, Beta, Live
Led by
Developer
Evidence
README explaining what the service does and how to run, test and deploy it, with links to its ADRs
Automated check
Guardrail check (tools/guardrail-check): README sections on running, testing and deploying, and a link to ADRs
DDTS doctrine
1, 2, 3
Owner
Architecture team, last reviewed 2026-10-01, since v0.1.0

GR-DEV-09 Record significant decisions as ADRs

Should Record significant architecture decisions as architecture decision records (ADRs), kept with the code or linked from the repository's README.

Why: the reasons behind a design are lost when people move on. ADRs let the next team, an assessor or a partner taking over the service understand what was decided and why, and change it safely.

How to meet it: keep ADRs in a docs/adr folder in the service repository, using the ADR template. Write one when you make a decision that is hard to reverse, departs from a guardrail, or that someone will later ask "why did we do this?".

Phases, evidence and status for GR-DEV-09
Status
Draft
Phases
Discovery, Alpha, Beta, Live
Led by
Technical architect
Evidence
ADR log in the repository or linked from its README
Automated check
Guardrail check (tools/guardrail-check): ADRs in docs/adr
DDTS doctrine
1, 2, 3
Owner
Architecture team, last reviewed 2026-10-01, since v0.2.0