← Return to Our Story

The Synthesis:
Migrating to Claude Native

We've spent weeks building a massive, highly successful Unified Agent Stack using physical folders and Python watchdogs. But what happens when we port these hard-won operational learnings directly into Claude's native agentic subsystems?

A glowing crystalline AI entity orchestrating a swarm of worker nodes

The Current State: Manual Physics

Today, our Swarm operates via what software engineers call "The Manual Physics of the File System."

Because we lacked a native way for AI agents to orchestrate *other* AI agents seamlessly, we had to build a translation layer. That translation layer is the watchdog module inside our scripts/agent_stack.py daemon.

Think about how Flem (the Coder) and Bella (the QA) communicate today. They don't actually talk to each other. Flem modifies a physical Markdown file. He then uses a bash command (git mv) to physically slide that file from the tasks/active/ folder into the tasks/review/ folder.

The Unified Supervisor detects the file drop, kills Flem's OS process, and spins up a brand new OS process for Bella. This works flawlessly. It creates impenetrable error boundaries. But it also requires significant Python boilerplate, background daemons, PID locking, and infinite while-loops burning CPU cycles just waiting for a file to move.

# The Current Way: Boilerplate Daemon Polling while True: for event in observer.event_queue: if event.src.startswith("tasks/review/"): subprocess.Popen(["opencode", "--agent", "Bella"]) time.sleep(2.0)

The Future: Claude's Native Subsystems

As Anthropic's Claude evolves, it is shifting from a simple Chat LLM into a comprehensive Agentic Ecosystem. Through the Model Context Protocol (MCP) and native Sub-Agent routing, Claude is gaining the ability to natively span multiple distinct personas, memories, and toolset permissions within a single overriding architecture.

If we migrate our framework to Claude's native subsystems, we can entirely delete scripts/agent_stack.py and orchestrator.py.

Instead of relying on a Python daemon watching folders, Claude acts as the Supreme Orchestrator. It natively spins up sub-agents in a conceptual state machine without touching the hard drive.

Today: The Physical Swarm

  • State is managed by physically moving files across 5 distinct folders.
  • Processes are managed by OS-level subprocesses and PID files.
  • Tool permissions (like `git commit`) are forbidden via text-based `.cursorrules`.
  • Error handling relies on exiting the process with code 1 and firing a Telegram webhook.

Tomorrow: Claude Native

  • State is managed conceptually by Native Agent Task graph transitions over JSON.
  • Processes are managed as concurrent LLM inference streams entirely in-memory.
  • Tool permissions are strictly enforced by un-registering the `git commit` MCP tool for the Coder agent.
  • Error handling is natively caught in the graph, routing back to the PM Agent immediately.

Copying the Learnings: How Do We Do It?

The beauty of our current homegrown swarm is that we have essentially written a blueprint for perfect agentic governance. We have discovered exactly what works and what fails. To port this to Claude's ecosystem, we simply map our physical rules to conceptual MCP rules.

1. The Sub-Agent Tool Registry

Today, Flem reads `.cursorrules` and sees "You are forbidden from committing code." Sometimes, if an agent hallucinates, they might try to do it anyway.

With Claude Native, we instantiate Flem not via CLI, but via an API definition. We do not give Flem the Git Commit tool. At an architectural level, it is impossible for the Coder sub-agent to commit. We only register the `git_commit` tool to the Henry_PM sub-agent.

2. Routing via the Graph instead of Folders

Instead of tasks/active/ and tasks/review/, we define an Agentic State Graph (similar to LangGraph or Claude's upcoming routing layers). The PM Node drafts the task JSON. The PM Node emits a Call_Coder function. The Coder Node modifies the working tree and emits a Call_QA function with the diff.

3. Preserving the "Human-in-the-Loop" Checkpoint

The most important part of our architecture is the tasks/human-review/ directory. We must preserve this in Claude.

When the QA_Node finishes validating the tests, it hits an explicit yield or pause_for_human mechanism. Claude's interface natively halts execution, pings the Architect (perhaps via an IDE plugin or webhook integration), and displays the uncommitted Git Diff directly in the chat UI.

The Architect clicks a simple [APPROVE] button in the UI.

That click resumes the graph execution, firing up the Henry_PM sub-agent who finally has permission to invoke the MCP `git_commit` tool.

The Conclusion

Building our own physical orchestrator was fully necessary to learn the boundaries of AI capabilities. It taught us about hallucination spirals, catastrophic module path errors, and why humans must remain the final gatekeepers.

By porting these hard-coded lessons into Claude's native agentic architecture, we retain all the discipline, safety, and governance of the Swarm, but execute it with a magnitude more speed, eliminating the fragile scaffolding of OS-level folder polling.

The rules don't change. Only the physics do.

RETURN TO OUR STORY