Engineering Quality Handbook

Purpose

Engineering quality is the discipline of ensuring that software meets its intended purpose, is maintainable over time and can be delivered reliably.

Quality is not a phase or a role. It is a property of the entire engineering process that must be designed, measured and continuously improved.

This handbook defines the principles, standards and practices for engineering quality across all capabilities.

Scope

This handbook covers:

Principles

Quality is a Shared Responsibility

Quality is not the responsibility of a QA team or a quality engineer. Every engineer is responsible for the quality of what they build.

Quality Must Be Measured

You cannot improve what you do not measure.

Define quality metrics, measure them consistently and track trends over time. Use data to guide quality improvements, not to punish teams.

Prevent Defects, Don't Just Find Them

Finding defects through testing is important. Preventing defects through good design, code review and standards is more effective and less expensive.

The cost of fixing a defect increases exponentially the later it is found:

PhaseRelative Cost
Design1x
Development5x
Testing10x
Production50x+

Consistency Enables Quality

Consistent code, processes and standards reduce cognitive load and make it easier to spot anomalies.

Inconsistency hides defects.

Quality is About Trade-offs

Perfect quality is not achievable. Every quality investment must be balanced against time, cost and business value.

The goal is to achieve a level of quality that is appropriate for the system's purpose and risk profile.

Quality Metrics

Code Quality Metrics

MetricWhat It MeasuresTarget
Cyclomatic complexityHow difficult code is to test and<= 10 per method
maintain.
DuplicationAmount of duplicated code.< 5%
Code coveragePercentage of code exercised by tests.>= 90%
Style violationsDeviations from coding standards.0 in new code
Technical debt ratioEstimated effort to fix issues vs< 5%
cost to rebuild.

Process Quality Metrics

MetricWhat It MeasuresTarget
Defect escape rateDefects found in production vs testing.< 5%
Mean time to recoverHow quickly the team can recover from< 1 hour
production incidents.
Deployment frequencyHow often the team deploys toDaily or more
production.
Change failure ratePercentage of deployments that cause< 5%
a failure.

Quality Gates

Quality gates are automated checks that must pass before a change proceeds to the next stage.

Pre-Commit Gate

Run before every commit:

Pull Request Gate

Run on every pull request:

Deployment Gate

Run before every deployment:

Release Gate

Run before every release:

Code Review and Quality

Code review is the most effective quality practice.

What to Review For

Review Velocity

Technical Debt Management

Classification

CategoryDescriptionApproach
StrategicIntentional debt taken to meet aTrack, schedule repayment.
deadline with a plan to repay.
AccidentalAccumulated through inadequate design,Assess, prioritise, reduce
insufficient testing or neglect.incrementally.

Management Process

  1. Identify: Use tools (SonarQube, CodeClimate) and manual review.
  2. Classify: Strategic or accidental? Severity?
  3. Track: Record in the team's tracking system.
  4. Prioritise: Balance against feature work.
  5. Remediate: Fix incrementally, not in rewrites.
  6. Prevent: Improve processes to reduce future debt.

Quality Culture

Practices for Building Quality Culture

Anti-patterns

AI Integration

AI can assist engineering quality through:

AI cannot replace human judgement in quality decisions. Quality standards and priorities must be set by humans.

Related Documents