<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Everton Kozloski</title>
    <description>The latest articles on DEV Community by Everton Kozloski (@evertonkozloski).</description>
    <link>https://dev.to/evertonkozloski</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F456951%2F45c0db3f-038f-4c79-ab83-571872a340c8.jpeg</url>
      <title>DEV Community: Everton Kozloski</title>
      <link>https://dev.to/evertonkozloski</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/evertonkozloski"/>
    <language>en</language>
    <item>
      <title>Integration Guard: Safely Merging Parallel Concurrent AI Agents from Git Worktrees into Main</title>
      <dc:creator>Everton Kozloski</dc:creator>
      <pubDate>Wed, 26 Aug 2026 15:01:41 +0000</pubDate>
      <link>https://dev.to/evertonkozloski/integration-guard-safely-merging-parallel-concurrent-ai-agents-from-git-worktrees-into-main-4l7m</link>
      <guid>https://dev.to/evertonkozloski/integration-guard-safely-merging-parallel-concurrent-ai-agents-from-git-worktrees-into-main-4l7m</guid>
      <description>&lt;p&gt;Modern coding-agent workflows often run several agents in parallel. Each&lt;br&gt;
  agent works in its own Git worktree and branch, while all changes eventually&lt;br&gt;
  need to land on a shared target branch such as main.&lt;/p&gt;

&lt;p&gt;This model provides isolation and speed, but introduces a difficult question:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;How can multiple agents work concurrently without losing commits,&lt;br&gt;
overwriting changes, or silently creating a semantically broken&lt;br&gt;
integration?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;This article presents the design of the Integration Guard, the subsystem implemented in &lt;a href="https://github.com/flashlan/vibe-kanban-alternative" rel="noopener noreferrer"&gt;Vibe Kanban Alternative&lt;/a&gt;, an independent, self-hosted fork of Vibe Kanban, to coordinate parallel agents and safely integrate their work.&lt;/p&gt;

&lt;h2&gt;
  
  
  The problem with parallel worktrees
&lt;/h2&gt;

&lt;p&gt;A typical setup looks like this:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fu9ivd3fd3t0o0qf0jy3x.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fu9ivd3fd3t0o0qf0jy3x.png" alt=" " width="800" height="318"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Each agent has its own isolated filesystem and branch. This prevents agents&lt;br&gt;
  from directly modifying each other’s working directories.&lt;/p&gt;

&lt;p&gt;However, the target branch can change while an agent is still working:&lt;/p&gt;

&lt;p&gt;Agent A starts at main = H0&lt;br&gt;
  Agent B completes and updates main = H1&lt;br&gt;
  Agent A finishes using its original branch&lt;br&gt;
  Agent A now needs to integrate into H1&lt;/p&gt;

&lt;p&gt;A naïve implementation usually chooses one of these approaches:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Force the agent to rebase before merging.&lt;/li&gt;
&lt;li&gt;Let the agent update the target branch directly.&lt;/li&gt;
&lt;li&gt;Use a temporary filesystem lock.&lt;/li&gt;
&lt;li&gt;Compare only filenames.&lt;/li&gt;
&lt;li&gt;Assume Git conflicts are the only problem.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Each approach has weaknesses.&lt;/p&gt;

&lt;p&gt;A rebase is not always necessary. If Agent A changes auth.rs and Agent B&lt;br&gt;
  changes billing.rs, their work can usually be integrated safely even though&lt;br&gt;
  main advanced.&lt;/p&gt;

&lt;p&gt;A temporary lock such as /tmp/vk-merge-lock does not coordinate separate&lt;br&gt;
  backend processes reliably.&lt;/p&gt;

&lt;p&gt;A blind reference update can silently overwrite another agent’s commit.&lt;/p&gt;

&lt;p&gt;And Git does not detect every semantic conflict. Two agents can modify&lt;br&gt;
  different lines in the same function and still produce incompatible behavior.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Integration Guard architecture
&lt;/h2&gt;

&lt;p&gt;The system separates three responsibilities:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fm8zn4nlbn0ek8yux4qbt.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fm8zn4nlbn0ek8yux4qbt.jpg" alt=" " width="799" height="203"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Agent Activity Observer
&lt;/h3&gt;

&lt;p&gt;The observer exposes which agents are currently active, what they intend to&lt;br&gt;
  change, and which workspaces they belong to.&lt;/p&gt;

&lt;p&gt;A declaration can include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Agent name&lt;/li&gt;
&lt;li&gt;Execution owner&lt;/li&gt;
&lt;li&gt;Workspace&lt;/li&gt;
&lt;li&gt;Intent&lt;/li&gt;
&lt;li&gt;Expected files&lt;/li&gt;
&lt;li&gt;Expected symbols&lt;/li&gt;
&lt;li&gt;Semantic dependencies&lt;/li&gt;
&lt;li&gt;Execution ID&lt;/li&gt;
&lt;li&gt;Lease expiration time&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The UI can then show information such as:&lt;/p&gt;

&lt;p&gt;Agent A — implementing merge_changes in crates/git/src/lib.rs&lt;br&gt;
  Agent B — updating complete_workspace_card in crates/mcp/src/...&lt;/p&gt;

&lt;p&gt;This information is available through the backend and MCP, rather than&lt;br&gt;
  relying on Mem0 or an agent’s conversation history.&lt;/p&gt;

&lt;p&gt;### 2. Soft reservations&lt;/p&gt;

&lt;p&gt;Agent declarations are intentionally soft reservations.&lt;/p&gt;

&lt;p&gt;If Agent A declares auth.rs and Agent B declares auth.rs, Agent B is warned,&lt;br&gt;
  but is not automatically blocked.&lt;/p&gt;

&lt;p&gt;This is important because the developer may know that the two agents are&lt;br&gt;
  working on independent sections of the same file.&lt;/p&gt;

&lt;p&gt;The system therefore separates:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Awareness during development&lt;/li&gt;
&lt;li&gt;Enforcement during integration&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Agents can continue working in parallel. The Integration Guard performs the&lt;br&gt;
  final validation before writing to the shared target branch.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Integration Guard
&lt;/h3&gt;

&lt;p&gt;The Integration Guard is responsible for the short critical section where a&lt;br&gt;
  branch is validated and integrated.&lt;/p&gt;

&lt;p&gt;It uses a database-backed lease scoped to the repository. This serializes the&lt;br&gt;
  validation and Git write across backend processes.&lt;/p&gt;

&lt;p&gt;The lease prevents two independent backend requests from simultaneously&lt;br&gt;
  validating the same target and then racing to update it.&lt;/p&gt;

&lt;h2&gt;
  
  
  The HEAD-aware integration algorithm
&lt;/h2&gt;

&lt;p&gt;The central idea is to use the task’s original branch point as the common&lt;br&gt;
  ancestor.&lt;/p&gt;

&lt;p&gt;Let:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;H0 = original common ancestor between the task branch and target branch&lt;/li&gt;
&lt;li&gt;Ht = current target branch HEAD&lt;/li&gt;
&lt;li&gt;Ha = current agent branch HEAD&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The Integration Guard computes:&lt;/p&gt;

&lt;p&gt;task_diff   = diff(H0, Ha)&lt;br&gt;
  target_diff = diff(H0, Ht)&lt;/p&gt;

&lt;p&gt;The complete flow is:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Facostnoh7w1c0mzuzpg3.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Facostnoh7w1c0mzuzpg3.jpg" alt=" " width="800" height="2797"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The important detail is that an advanced target branch does not automatically&lt;br&gt;
  force a rebase.&lt;/p&gt;

&lt;h3&gt;
  
  
  Independent changes
&lt;/h3&gt;

&lt;p&gt;Suppose:&lt;/p&gt;

&lt;p&gt;H0: initial project state&lt;br&gt;
  Agent A: changes auth.rs&lt;br&gt;
  Agent B: changes billing.rs&lt;br&gt;
  Ht: includes Agent B's changes&lt;br&gt;
  Ha: includes Agent A's changes&lt;/p&gt;

&lt;p&gt;The three-way merge can combine both changes:&lt;/p&gt;

&lt;p&gt;H0&lt;br&gt;
  ├── target_diff: billing.rs&lt;br&gt;
  └── task_diff:   auth.rs&lt;/p&gt;

&lt;p&gt;Result:&lt;br&gt;
  ├── billing.rs&lt;br&gt;
  └── auth.rs&lt;/p&gt;

&lt;p&gt;Agent A does not need to rewrite its branch history merely because Agent B&lt;br&gt;
  finished first.&lt;/p&gt;

&lt;h3&gt;
  
  
  Real textual conflicts
&lt;/h3&gt;

&lt;p&gt;If both agents modify the same lines or incompatible hunks, Git reports a&lt;br&gt;
  conflict.&lt;/p&gt;

&lt;p&gt;The Integration Guard then:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Does not move the target branch forward&lt;/li&gt;
&lt;li&gt;Does not mark the card as Done&lt;/li&gt;
&lt;li&gt;Returns a structured conflict&lt;/li&gt;
&lt;li&gt;Leaves the card open for review&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The operator can then decide whether to resolve the conflict manually, rebase&lt;br&gt;
  intentionally, or change the task scope.&lt;/p&gt;

&lt;h2&gt;
  
  
  Semantic conflicts beyond Git
&lt;/h2&gt;

&lt;p&gt;Git detects textual overlap. It does not understand contracts, APIs, or&lt;br&gt;
  behavior.&lt;/p&gt;

&lt;p&gt;For example:&lt;/p&gt;

&lt;p&gt;Agent A changes:&lt;br&gt;
    UserService::create_user()&lt;/p&gt;

&lt;p&gt;Agent B changes:&lt;br&gt;
    API code that depends on the return value of create_user()&lt;/p&gt;

&lt;p&gt;These changes may touch different files and different lines, yet still be&lt;br&gt;
  incompatible.&lt;/p&gt;

&lt;p&gt;The current semantic detector uses declared dependencies:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fq6wax0xm9ene5zc48avw.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fq6wax0xm9ene5zc48avw.jpg" alt=" " width="800" height="183"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is intentionally conservative. It is not a full AST or behavioral&lt;br&gt;
  analysis system, but it catches a class of conflicts that file-level&lt;br&gt;
  comparison cannot.&lt;/p&gt;

&lt;p&gt;A semantic conflict is reported before Git writes to the target branch.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Mem0 is not the coordination layer
&lt;/h2&gt;

&lt;p&gt;Mem0 is useful for durable project knowledge:&lt;/p&gt;

&lt;p&gt;“The merge API now requires a validation step.”&lt;br&gt;
  “This module owns the authentication contract.”&lt;/p&gt;

&lt;p&gt;But it is not suitable for real-time coordination because it can be:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Asynchronous&lt;/li&gt;
&lt;li&gt;Temporarily unavailable&lt;/li&gt;
&lt;li&gt;Stale&lt;/li&gt;
&lt;li&gt;Inconsistent with the current transaction state&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The system therefore uses:&lt;/p&gt;

&lt;h2&gt;
  
  
  Sources of truth
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Current active agents:&lt;/strong&gt; Database&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Work declarations:&lt;/strong&gt; Database&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Leases and reservations:&lt;/strong&gt; Database&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Merge serialization:&lt;/strong&gt; Integration Guard lease&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Durable architectural decisions:&lt;/strong&gt; Mem0&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Operator visibility:&lt;/strong&gt; Backend API and UI&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Mem0 stores semantic memory. The database stores current state.&lt;/p&gt;

&lt;h2&gt;
  
  
  The pipeline integration
&lt;/h2&gt;

&lt;p&gt;Previously, a pipeline could instruct an agent to manually:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Rebase its branch&lt;/li&gt;
&lt;li&gt;Create a commit&lt;/li&gt;
&lt;li&gt;Update the target ref&lt;/li&gt;
&lt;li&gt;Use a temporary merge lock&lt;/li&gt;
&lt;li&gt;Verify the result by checking the moving branch tip&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That approach put repository coordination logic inside an agent prompt.&lt;/p&gt;

&lt;p&gt;The new pipeline contract is simpler:&lt;/p&gt;

&lt;p&gt;Agent completes implementation and verification&lt;br&gt;
          ↓&lt;br&gt;
  Agent calls complete_workspace_card&lt;br&gt;
          ↓&lt;br&gt;
  Backend invokes Integration Guard&lt;br&gt;
          ↓&lt;br&gt;
  Guard validates and integrates safely&lt;br&gt;
          ↓&lt;br&gt;
  Card moves to Done only after success&lt;/p&gt;

&lt;p&gt;The agent no longer needs to know how the target branch is updated.&lt;/p&gt;

&lt;p&gt;The pipeline stage is now named:&lt;/p&gt;

&lt;p&gt;Integration Guard → Done&lt;/p&gt;

&lt;p&gt;The agent is explicitly instructed not to manually rebase, update refs, or&lt;br&gt;
  use temporary locks.&lt;/p&gt;

&lt;p&gt;The technical result may still be a single integration commit, but the&lt;br&gt;
  responsibility belongs to the backend integration layer rather than the&lt;br&gt;
  agent.&lt;/p&gt;

&lt;h2&gt;
  
  
  Concurrency control
&lt;/h2&gt;

&lt;p&gt;The database lease protects the critical integration sequence:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fvvl713dhae7fbm54pci8.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fvvl713dhae7fbm54pci8.jpg" alt=" " width="800" height="583"&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;This prevents the classic race:&lt;/p&gt;

&lt;p&gt;Request A reads main = H1&lt;br&gt;
  Request B reads main = H1&lt;br&gt;
  Request A writes main = H2&lt;br&gt;
  Request B writes main = H3&lt;/p&gt;

&lt;p&gt;Without serialization, the second operation may be based on stale state.&lt;/p&gt;

&lt;h2&gt;
  
  
  Failure behavior
&lt;/h2&gt;

&lt;p&gt;The Integration Guard follows a strict rule:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;A card is marked Done only after the target branch has been successfully updated.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Typical outcomes
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Target advanced with independent changes:&lt;/strong&gt; Three-way integration
succeeds.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The same lines changed:&lt;/strong&gt; Git reports a conflict and the card remains
open.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A declared semantic dependency overlaps:&lt;/strong&gt; The merge is blocked for
review.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Another integration is active:&lt;/strong&gt; The request waits or returns
&lt;code&gt;integration_in_progress&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The target worktree is dirty:&lt;/strong&gt; Integration is refused.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Integration succeeds:&lt;/strong&gt; The declaration is released and the card moves to
&lt;code&gt;Done&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This makes failure visible instead of silently converting an incomplete&lt;br&gt;
  integration into a completed card.&lt;/p&gt;

&lt;h2&gt;
  
  
  Testing strategy
&lt;/h2&gt;

&lt;p&gt;The implementation includes automated Git safety tests for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Target branch advancing before integration&lt;/li&gt;
&lt;li&gt;Independent changes being merged successfully&lt;/li&gt;
&lt;li&gt;Delete-versus-modify conflicts&lt;/li&gt;
&lt;li&gt;Base reference remaining unchanged after a conflict&lt;/li&gt;
&lt;li&gt;Dirty target worktrees&lt;/li&gt;
&lt;li&gt;Concurrent integration safety&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The repository also contains a manual acceptance runbook for testing with two&lt;br&gt;
  real agents:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Start Agent A in Workspace A.&lt;/li&gt;
&lt;li&gt;Confirm its declaration appears before the first edit.&lt;/li&gt;
&lt;li&gt;Start Agent B in Workspace B.&lt;/li&gt;
&lt;li&gt;Confirm both agents are visible in the Active Agents panel.&lt;/li&gt;
&lt;li&gt;Declare a semantic dependency conflict.&lt;/li&gt;
&lt;li&gt;Attempt integration while both declarations are active.&lt;/li&gt;
&lt;li&gt;Confirm the merge is blocked.&lt;/li&gt;
&lt;li&gt;Release Agent B’s declaration.&lt;/li&gt;
&lt;li&gt;Retry integration.&lt;/li&gt;
&lt;li&gt;Confirm the target branch changes only after successful validation.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This manual test is important because it crosses real process boundaries:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Backend&lt;/li&gt;
&lt;li&gt;Database&lt;/li&gt;
&lt;li&gt;MCP&lt;/li&gt;
&lt;li&gt;Executor&lt;/li&gt;
&lt;li&gt;UI&lt;/li&gt;
&lt;li&gt;Git worktrees&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Current limitations
&lt;/h2&gt;

&lt;p&gt;The system is intentionally conservative and local-first.&lt;/p&gt;

&lt;p&gt;The semantic detector currently relies on declared files, symbols, and&lt;br&gt;
  dependencies. It does not replace:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;AST analysis&lt;/li&gt;
&lt;li&gt;Type checking&lt;/li&gt;
&lt;li&gt;Integration tests&lt;/li&gt;
&lt;li&gt;Human review&lt;/li&gt;
&lt;li&gt;Product-level reasoning&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The UI currently presents active work through a polling activity panel.&lt;br&gt;
  Future improvements could include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Event-driven activity updates&lt;/li&gt;
&lt;li&gt;Richer symbol extraction&lt;/li&gt;
&lt;li&gt;Automatic dependency discovery&lt;/li&gt;
&lt;li&gt;Historical integration timelines&lt;/li&gt;
&lt;li&gt;Conflict visualization&lt;/li&gt;
&lt;li&gt;Strong reservations for critical symbols&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Parallel coding agents are valuable only if their work can be integrated&lt;br&gt;
  safely.&lt;/p&gt;

&lt;p&gt;The Integration Guard addresses this by combining:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Real-time agent observability&lt;/li&gt;
&lt;li&gt;Soft work declarations&lt;/li&gt;
&lt;li&gt;Database-backed integration serialization&lt;/li&gt;
&lt;li&gt;HEAD-aware diff calculation&lt;/li&gt;
&lt;li&gt;Semantic overlap detection&lt;/li&gt;
&lt;li&gt;Git three-way integration&lt;/li&gt;
&lt;li&gt;Explicit conflict handling&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The key design decision is simple:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;An advanced target branch is not automatically a reason to rebase. Compare the task against its original branch point, let Git perform a three-way integration, and require review only when there is a real textual or semantic conflict.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;This allows multiple agents to work independently while keeping the shared&lt;br&gt;
  target branch protected, predictable, and auditable.&lt;/p&gt;

&lt;h3&gt;
  
  
  The main implementation lives in:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://github.com/flashlan/%0Avibe-kanban-alternative/blob/main/crates/server/src/routes/workspaces/git.rs" rel="noopener noreferrer"&gt;&lt;code&gt;crates/server/src/routes/workspaces/git.rs&lt;/code&gt;&lt;/a&gt;
— Integration Guard flow&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/flashlan/vibe-kanban-%0Aalternative/blob/main/crates/git/src/lib.rs" rel="noopener noreferrer"&gt;&lt;code&gt;crates/git/src/lib.rs&lt;/code&gt;&lt;/a&gt; — Git diff and three-way
integration logic&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/flashlan/vibe-%0Akanban-alternative/blob/main/crates/db/src/models/agent_work.rs" rel="noopener noreferrer"&gt;&lt;code&gt;crates/db/src/models/agent_work.rs&lt;/code&gt;&lt;/a&gt; — Agent work
declarations&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/flashlan/%0Avibe-kanban-alternative/blob/main/crates/db/src/models/integration_guard.rs" rel="noopener noreferrer"&gt;&lt;code&gt;crates/db/src/models/integration_guard.rs&lt;/code&gt;&lt;/a&gt;
— Repository integration lease&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The complete implementation is available on &lt;a href="https://github.com/flashlan/vibe-kanban-alternative" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;.&lt;br&gt;
  Feedback and technical discussion are welcome in the repository issues.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>architecture</category>
      <category>devops</category>
      <category>git</category>
    </item>
  </channel>
</rss>
