A practical roadmap for transitioning teams to true trunk-based development (TBD), organized into five phases. Phase 1 covers infrastructure prerequisites: CI pipelines must complete under 10 minutes and real-time observability must be in place. Phase 2 addresses merging incomplete work safely using feature flags from the start and branch-by-abstraction for large architectural changes. Phase 3 enforces small PRs with hard size limits (~300–500 lines) and vertical slicing over horizontal layer-based splits. Phase 4 tackles the cultural shift: optimizing for review speed (hours, not days) and accepting incremental, imperfect merges over delayed perfection. Phase 5 covers cleanup discipline — removing flags and old code after rollout — and tracking KPIs like PR size, lifetime, and merge frequency to verify real TBD adoption.

5m read timeFrom codecraftdiary.com
Post cover image
Table of contents
Phase 1: Fixing the Foundation (The Infrastructure)Phase 2: Mastering the Tools of “Incomplete” WorkPhase 3: Rewiring the Process (Small PRs)Phase 4: The Cultural Shift (The Hard Part)Phase 5: The Cleanup and AI RealityFinal Thought

Sort: