<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>devops Archives - CodeCraft Diary</title>
	<atom:link href="https://codecraftdiary.com/tag/devops/feed/" rel="self" type="application/rss+xml" />
	<link>https://codecraftdiary.com/tag/devops/</link>
	<description></description>
	<lastBuildDate>Sun, 17 May 2026 15:54:18 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.0</generator>

<image>
	<url>https://codecraftdiary.com/wp-content/uploads/2025/10/cropped-IMG_3463-32x32.png</url>
	<title>devops Archives - CodeCraft Diary</title>
	<link>https://codecraftdiary.com/tag/devops/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Trunk-Based Development: From Chaos to Flow</title>
		<link>https://codecraftdiary.com/2026/05/18/trunk-based-development-roadmap/</link>
					<comments>https://codecraftdiary.com/2026/05/18/trunk-based-development-roadmap/#respond</comments>
		
		<dc:creator><![CDATA[codecraftdiary]]></dc:creator>
		<pubDate>Mon, 18 May 2026 13:00:00 +0000</pubDate>
				<category><![CDATA[Development Workflow & Best Practices]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[devops]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[workflow]]></category>
		<guid isPermaLink="false">https://codecraftdiary.com/?p=3268</guid>

					<description><![CDATA[<p>If you’ve followed the first two parts of this series, you know the hard truth: most teams aren’t actually doing Trunk-Based Development. They are doing &#8220;Short-lived Feature Branching&#8221; with better branding. We’ve talked about why your PRs are still too big and why the 6-month pull request is a parallel universe that kills delivery. But [&#8230;]</p>
<p>The post <a href="https://codecraftdiary.com/2026/05/18/trunk-based-development-roadmap/">Trunk-Based Development: From Chaos to Flow</a> appeared first on <a href="https://codecraftdiary.com">CodeCraft Diary</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph" id="p-rc_e009b3fffe4fec9a-33">If you’ve followed the first two parts of this series, you know the hard truth: most teams aren’t actually doing Trunk-Based Development<sup></sup>. They are doing &#8220;Short-lived Feature Branching&#8221; with better branding<sup></sup><sup></sup><sup></sup><sup></sup>. We’ve talked about why your PRs are still too big <sup></sup>and why the 6-month pull request is a parallel universe that kills delivery<sup></sup><sup></sup><sup></sup><sup></sup>.</p>



<p class="wp-block-paragraph" id="p-rc_e009b3fffe4fec9a-34">But how do you actually fix it? Knowing small PRs are better is easy. Changing a team&#8217;s habits is the hard part.<br>This is the practical roadmap for moving from long-lived branches to real trunk-based flow.</p>



<p class="wp-block-paragraph">Previous posts about Trunk-Based Development: Pt. 2 &#8211;<a href="https://codecraftdiary.com/2026/04/29/trunk-based-development-your-pull-requests-are-still-too-big/" target="_blank" rel="noreferrer noopener">https://codecraftdiary.com/2026/04/29/trunk-based-development-your-pull-requests-are-still-too-big/</a></p>



<p class="wp-block-paragraph">Pt. 1 <a href="https://codecraftdiary.com/2026/04/04/trunk-based-development-why-most-teams-think-they-use-it-but-dont/" target="_blank" rel="noreferrer noopener">https://codecraftdiary.com/2026/04/04/trunk-based-development-why-most-teams-think-they-use-it-but-dont/</a></p>



<h2 class="wp-block-heading has-vivid-cyan-blue-color has-text-color has-link-color wp-elements-b4a2e9edbf137201d675742e19120e9e">Phase 1: Fixing the Foundation (The Infrastructure)</h2>



<p class="wp-block-paragraph" id="p-rc_e009b3fffe4fec9a-35">You cannot do trunk-based development with slow pipelines<sup></sup>. If your CI/CD suite is a bottleneck, your developers will naturally revert to batching work to &#8220;save time&#8221;<sup></sup><sup></sup><sup></sup>.</p>



<h3 class="wp-block-heading">1. The 10-Minute Rule for CI</h3>



<p class="wp-block-paragraph" id="p-rc_e009b3fffe4fec9a-36">In 2026, speed is a requirement, not a luxury<sup></sup>. If your CI takes 20 minutes, there is friction; if it takes 60 minutes, people stop merging frequently<sup></sup>.</p>



<ul class="wp-block-list">
<li><strong>Target:</strong> Aim for CI under 10 minutes.</li>



<li><strong>Action:</strong> Parallelize your test suites. If a test is flaky, don&#8217;t ignore it—fix it or delete it. A flaky test suite is a debt that destroys the confidence needed for frequent merges.</li>
</ul>



<h3 class="wp-block-heading">2. Radical Observability</h3>



<p class="wp-block-paragraph" id="p-rc_e009b3fffe4fec9a-38">To merge to main multiple times a day safely, you need to know exactly what is happening in production<sup></sup><sup></sup><sup></sup><sup></sup>.</p>



<ul class="wp-block-list">
<li><strong>Action:</strong> Implement real-time logging and alerting. If you merge a small change and the error rate spikes, you should know within seconds, not after a customer support ticket arrives.</li>
</ul>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h2 class="wp-block-heading has-vivid-cyan-blue-color has-text-color has-link-color wp-elements-29c24c10968e70f2c22e07e24b09bae3">Phase 2: Mastering the Tools of &#8220;Incomplete&#8221; Work</h2>



<p class="wp-block-paragraph" id="p-rc_e009b3fffe4fec9a-39">The biggest fear in TBD is merging work that isn&#8217;t &#8220;done&#8221;<sup></sup>. To overcome this, you must decouple <strong>deployment</strong> from <strong>release</strong><sup></sup><sup></sup>.</p>



<h3 class="wp-block-heading">3. Feature Flags as a Standard</h3>



<p class="wp-block-paragraph" id="p-rc_e009b3fffe4fec9a-40">Feature flags are the missing piece for most teams<sup></sup><sup></sup>. They allow you to merge partial work and control exposure without waiting for the entire feature to be polished<sup></sup>.</p>



<ul class="wp-block-list">
<li><strong>The Strategy:</strong> Wrap new logic in a toggle. This lets the code live in the main branch, deployed to production but hidden from users until it&#8217;s ready.</li>



<li><strong>The Rule:</strong> A feature flag must exist from the start, not as an afterthought.</li>
</ul>



<h3 class="wp-block-heading">4. Branch by Abstraction for Large Changes</h3>



<p class="wp-block-paragraph" id="p-rc_e009b3fffe4fec9a-43">When you are doing a complete architectural overhaul, do not create a &#8220;v2-architecture&#8221; Git branch<sup></sup>. That is a recipe for a merge nightmare<sup></sup>.</p>



<ul class="wp-block-list">
<li><strong>The Strategy:</strong> Keep both the old and new architectures in the main branch simultaneously.</li>



<li><strong>The Execution:</strong> Use an abstraction layer (an interface or wrapper) to toggle between the old and new logic. Run &#8220;dark launches&#8221; where the new code executes, but you ignore the results or simply compare them against the old version to gain confidence.</li>
</ul>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h2 class="wp-block-heading has-vivid-cyan-blue-color has-text-color has-link-color wp-elements-da50a52945aa1f7338c551e98359bfba">Phase 3: Rewiring the Process (Small PRs)</h2>



<p class="wp-block-paragraph" id="p-rc_e009b3fffe4fec9a-46">Small pull requests are the backbone of TBD<sup></sup><sup></sup><sup></sup><sup></sup>. A large PR is a cognitive nightmare that leads to shallow reviews and delayed deployments<sup></sup>.</p>



<h3 class="wp-block-heading">5. Enforce Hard PR Size Limits</h3>



<p class="wp-block-paragraph" id="p-rc_e009b3fffe4fec9a-47">Don&#8217;t make small PRs a suggestion; make them a constraint<sup></sup>.</p>



<ul class="wp-block-list">
<li><strong>The Rule:</strong> Set a soft limit of ~300 lines and a hard limit of ~400–500 lines per PR.</li>



<li><strong>The Logic:</strong> Constraints force better behavior. If a task is too big, it forces the developer to think about how to slice it vertically.</li>
</ul>



<h3 class="wp-block-heading">6. Vertical vs. Horizontal Slicing</h3>



<p class="wp-block-paragraph" id="p-rc_e009b3fffe4fec9a-50">Stop splitting work by &#8220;Backend PR,&#8221; &#8220;Database PR,&#8221; and &#8220;Frontend PR&#8221;<sup></sup><sup></sup>. This creates artificial dependencies and forces you to wait until all are done before merging<sup></sup><sup></sup>.</p>



<ul class="wp-block-list">
<li><strong>The Strategy:</strong> Slice vertically. One PR should deliver a minimal end-to-end functionality (even if hidden by a flag), followed by another PR that extends that behavior.</li>
</ul>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h2 class="wp-block-heading has-vivid-cyan-blue-color has-text-color has-link-color wp-elements-b64911a58c1530395a27c6aa2d2277f9">Phase 4: The Cultural Shift (The Hard Part)</h2>



<p class="wp-block-paragraph" id="p-rc_e009b3fffe4fec9a-52">Trunk-based development is 10% tooling and 90% discipline<sup></sup><sup></sup><sup></sup><sup></sup>.</p>



<h3 class="wp-block-heading">7. Optimize for Review Speed, Not Just Quality</h3>



<p class="wp-block-paragraph" id="p-rc_e009b3fffe4fec9a-53">If reviews take days, developers will batch work to avoid the &#8220;waiting tax&#8221;<sup></sup>.</p>



<ul class="wp-block-list">
<li><strong>Expectation:</strong> A PR should be reviewed within a few hours, not days.</li>



<li><strong>Technique:</strong> If a PR is small (under 300 &#8211; 400 lines), it takes 15 minutes to review. If it’s still stuck, do live reviews or pair programming to clear the logjam.</li>
</ul>



<h3 class="wp-block-heading">8. Accept &#8220;Ugly but Correct&#8221;</h3>



<p class="wp-block-paragraph" id="p-rc_e009b3fffe4fec9a-56">Flow matters more than perfection<sup></sup>.</p>



<ul class="wp-block-list">
<li><strong>The Mindset:</strong> It is better to merge a small, slightly imperfect (but safe) change today than a &#8220;perfect&#8221; massive change next week. You can refactor and improve incrementally once the code is integrated -> <strong>but don&#8217;t forget to refactor</strong>.</li>
</ul>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h2 class="wp-block-heading has-vivid-cyan-blue-color has-text-color has-link-color wp-elements-719d0410563fdd8d55254b4f0db48f32">Phase 5: The Cleanup and AI Reality</h2>



<p class="wp-block-paragraph" id="p-rc_e009b3fffe4fec9a-58">AI-assisted coding is generating more code than ever. If you don&#8217;t have small changes and fast integration, your workflow will collapse under the sheer volume of AI-generated changes.</p>



<h3 class="wp-block-heading">9. The Non-Optional Cleanup</h3>



<p class="wp-block-paragraph" id="p-rc_e009b3fffe4fec9a-59">Feature flags and abstractions are great, but they create technical debt if left forever<sup></sup><sup></sup><sup></sup><sup></sup>.</p>



<ul class="wp-block-list">
<li><strong>The Rule:</strong> Once a rollout is 100% successful, deleting the old code and the flag is part of the original task, not a &#8220;nice-to-have&#8221; for later.</li>
</ul>



<h3 class="wp-block-heading">10. Track Your Behavior (Metrics)</h3>



<p class="wp-block-paragraph" id="p-rc_e009b3fffe4fec9a-61">Stop guessing if you are doing TBD. Measure it<sup></sup><sup></sup>.</p>



<ul class="wp-block-list">
<li><strong>KPIs:</strong> Track average PR size, PR lifetime, and merges per developer per day.</li>



<li><strong>Reality Check:</strong> If your PRs live for days and contain thousands of lines, you are still doing feature-branch development.</li>
</ul>



<h3 class="wp-block-heading">Common Failure Mode</h3>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p class="wp-block-paragraph">Teams adopt feature flags but still keep long-lived branches.<br>That is not trunk-based development.<br>The branch lifetime matters more than the branching strategy itself.</p>
</blockquote>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h2 class="wp-block-heading has-vivid-cyan-blue-color has-text-color has-link-color wp-elements-5aa7b167613851ef5f737ecc5b0682c8">Final Thought</h2>



<p class="wp-block-paragraph" id="p-rc_e009b3fffe4fec9a-64">Trunk-based development feels uncomfortable at first because it goes against the natural desire to be &#8220;complete&#8221; and &#8220;polished&#8221; before sharing work<sup></sup>. It requires you to prioritize the <strong>system&#8217;s flow</strong> over your <strong>individual comfort</strong><sup></sup>.</p>



<p class="wp-block-paragraph" id="p-rc_e009b3fffe4fec9a-65">If you fix just one thing this month, make your pull requests radically smaller<sup></sup><sup></sup>. Faster reviews, fewer bugs, and smoother delivery will follow<sup></sup><sup></sup><sup></sup><sup></sup>. Everything else is just details.</p>



<p class="wp-block-paragraph"></p>
<p>The post <a href="https://codecraftdiary.com/2026/05/18/trunk-based-development-roadmap/">Trunk-Based Development: From Chaos to Flow</a> appeared first on <a href="https://codecraftdiary.com">CodeCraft Diary</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://codecraftdiary.com/2026/05/18/trunk-based-development-roadmap/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
