Code Quality & Review Standards
Trunk-based development with protected main branches, mandatory PR reviews, code quality standards, and version control best practices.
Job to be done: When our code changes suffer from inconsistent reviews and architectural drift, I want to adopt trunk-based development with clear ownership and standards, so I can ship with confidence and reduce the time wasted on merge conflicts.
You will set up trunk-based development with protected main branches, implement PR checklists and code ownership boundaries, add automated formatting/linting checks, and establish an ADR process for major decisions. Work through branch protection rules, CI enforcement, and review SLAs to ship changes with consistent quality.
What you’ll implement
These are the roadmap epic features, organized as a starter backlog.
Execution guide
Practical guidance aligned to the Execution Kit Definition of Done.
Outcome
Teams ship changes with predictable review quality, consistent branching/PR hygiene, and a shared definition of what ‘good engineering’ looks like.
Before to After Transformation
Long-lived feature branches, painful merges, inconsistent reviews, 'works on my machine' syndrome
# Typical chaos:
git checkout -b feature/big-rewrite
# ... 3 weeks later ...
git merge main # 50 conflicts
# No required reviews, push straight to mainShort-lived branches, fast PRs, automated checks, consistent quality across all teams
# Trunk-based with protection:
git checkout -b feat/small-change
# PR created, auto-assigned reviewers
# ✓ CI passes (build, test, lint)
# ✓ 1 approval required
# ✓ Merged to main within hours
# DORA improvements:
# - Deployment frequency: weekly to daily
# - Lead time: 7 days to 2 daysSymptoms
Prerequisites
Implementation steps
- Adopt trunk-based development policy (branching strategy and max branch age)
- Introduce a PR checklist and review expectations
- Add a lightweight engineering standards README (per repo or org)
- Add ADR process (when to write, where to store, review cadence)
- Define code ownership boundaries and reviewers
- Add automation for formatting/linting (fail PR on violations)
- Reduce PR size via work slicing guidance
- Introduce review SLAs (p50 < 24h) and track cycle time
- Run a retro to iterate the policy (what’s too strict / too loose)
Definition of Done
- Trunk-based workflow documented and adopted
- PR checklist enforced and used consistently
- CI checks required before merge
- ADR template available and used for major decisions
- Practice integrated into team workflow
Metrics
- PR cycle time (p50/p95)
- Average PR size (lines changed)
- % PRs passing CI on first try
- Change failure rate
- Lead time for changes
Failure modes
Ownership
- Set expectations and protect the time budget for reviews
- Ensure incentives reward quality outcomes
- Configure branch protection and required checks
- Provide templates (PR checklist, ADR)
- Follow the workflow and continuously improve it
- Keep ADRs and standards current
What good looks like (by org scale)
- Branch protection + required CI checks
- PRs reviewed within 1 business day
- Clear code ownership
- ADRs for major decisions
- PR size norms + work slicing
- Org-wide policy with limited exceptions
- Audit-friendly review evidence
- Measured PR cycle time by org/portfolio
References
Resources
Templates and related materials for this kit.
Related capabilities
Capabilities tracked under this epic in the roadmap.
- Git Workflow Standard>= 95% of code changes follow trunk-based development or GitHub flow (feature branches < 2 days old).
- PR Review Checklist>= 90% of PRs have checklist completed before merge (tests, docs, security, performance).
- PR Review Turnaround SLA>= 80% of PRs receive first review within 4 business hours.
- Conventional Commit Messages>= 85% of commits follow conventional commit format (type(scope): description).
- Pair/Mob Programming>= 40% of complex features (>= 5 story points) developed using pair or mob programming.
- Code Readability Standards>= 70% of modules have README with setup, usage, and architecture notes. Code review checks readability.
Related kits
Other kits in the same milestone or with similar DORA impact.