>_ DevTrendsnl

Taal

Home

Talen

Secties

Frontend Backend Mobiel DevOps AI / ML GameDev Blockchain Embedded Beveiliging
Clojure

How Uncle Bob Organizes Neural Networks with tmux and git worktrees

Uncle Bob (Robert Martin), creator of the Agile Manifesto and author of Clean Code books, has published a new project called SwarmForge on GitHub. At the very top of the README, a red uppercase notice asks readers not to buy the SWARM cryptocurrency token, which the author has no affiliation with. Behind this quirky banner lies an interesting idea: a multi-agent system built from Unix tools, zsh scripts, and git worktrees.

While most AI framework authors stuff their solutions with heavy Python libraries, SwarmForge solves the problem locally and pragmatically.

Why Run Multiple Agents at Once

When you give a coder based on Claude or Copilot a complex task, it quickly hits context limits. Either that, or it quietly breaks neighboring code. In real life, programmers solve this through division of labor. One writes specifications, another codes using TDD, a third checks architecture and refactors.

SwarmForge brings this practice to neural networks. The tool spins up tmux sessions, assigns each agent a role and a separate git worktree, then organizes task exchange between them. As a result, agents work on the same repository simultaneously but physically don't interfere with each other or overwrite each other's files.

Ready-Made Role Sets

Instead of lengthy configuration, the author offers downloading ready-made scenarios from different repository branches:

  • Branch two-pack. Express development for small tasks: the coder implements behavior via TDD, and the cleaner removes duplicates and fixes architectural flaws.
  • Branch four-pack. Standard cycle with a Gherkin specifier, coder, refactorer, and architect.
  • Branch six-pack. Full chain with a separate mutation hardening step and a QA agent.
  • Custom build. Your own variant from an arbitrary set of roles, described in a text config.

You can assign a separate CLI client to each role. Nothing stops you from putting Claude in the architect role and handing routine tasks to Codex or Copilot.

Task Passing Between Agents

The main problem with multi-agent systems is that agents love spamming each other with messages and losing context. SwarmForge has no direct chat between neural networks.

Instead of direct command invocation, SwarmForge runs a background daemon on Babashka (a Clojure interpreter for scripts). The daemon monitors the outbox and inbox directories in the file system .swarmforge/handoffs/.

When one agent finishes a stage, it calls a local script swarm_handoff.sh. The script checks the handoff and creates a task file. If code is being transferred, the agent must specify the exact 10-character commit hash. The daemon picks up the file, verifies the commit, and moves it to the next agent's inbox folder.

This approach guards against hallucinations. A neural network cannot pass work further along if it hasn't committed changes to its git worktree.

Configuration and Launch

All settings are stored in a simple text file swarmforge/swarmforge.conf. Each line describes one window and sets its role, provider, worktree name, and additional CLI parameters:

window coordinator codex master window coder copilot wt-coder --yolo window refactorer claude wt-refactorer window architect claude wt-arch task --dangerously-skip-permissions

Launching the system in an existing project takes a couple of terminal commands. Choose a branch, download the archive, and run the entry script:

BRANCH=four-pack
curl -L "https://github.com/unclebob/swarm-forge/archive/refs/heads/${BRANCH}.tar.gz" | tar -xz --strip-components=1
./swarm

The script ./swarm checks utilities, downloads shared scripts from the main branch, initializes git worktrees for each role, and opens tmux sessions. On macOS it automatically pulls Terminal.app or Ghostty, on Windows — Windows Terminal from WSL.

When launching, SwarmForge tries to block OS sleep mode via caffeinate on macOS or systemd-inhibit on Linux, so agents don't go to sleep mid-work.

Who Will Benefit from SwarmForge

The project leaves an interesting impression. On one hand, you can see Uncle Bob's characteristic style: emphasis on TDD, code quality metrics, Gherkin specifications, and strict rules from clean architecture. On the other hand, dependency on Babashka, tmux, and specific CLI tools makes the entry barrier noticeable.

If Clean Code ideas resonate with you and you want to experiment with autonomous development without bulky frameworks like AutoGen or CrewAI, SwarmForge is worth trying. It's a good example of how basic Unix utilities and proper Git workflow help coordinate complex AI systems.