# NanoClaw → Clawdie Migration History

**Last updated:** 08.03.2026 — v0.2.0

---

## Attribution

Clawdie is a fork of [NanoClaw](https://github.com/openclaw/nanoclaw) by [Gavriel](https://github.com/openclaw), built on the [OpenClaw](https://github.com/openclaw/openclaw) ecosystem created by [Peter Steinberger](https://github.com/steipete).

NanoClaw's philosophy of minimalism, security through isolation, and AI-native design made this fork possible. The skills engine, upstream update mechanism, and core orchestration patterns originate from NanoClaw.

---

## What Changed

Clawdie diverges from NanoClaw in these areas:

| Area | NanoClaw | Clawdie |
| --- | --- | --- |
| Runtime | Docker / Apple Container | FreeBSD jails (Bastille) |
| Jail manager | — | Warden (Bastille-based) |
| Networking | Docker bridge | VNET + warden0 bridge + pf NAT |
| Snapshots | — | ZFS + Sanoid policies |
| Channel | WhatsApp (primary) | Telegram (primary) |
| Coding agent | Claude Code in container | PI (`@mariozechner/pi-coding-agent`) |
| Database | SQLite only | SQLite + PostgreSQL 18 (in db jail) |
| OS | macOS / Linux | FreeBSD 15.0-RELEASE |
| Package name | `nanoclaw` | `controlplane` |
| Service manager | launchd / systemd | FreeBSD rc.d |
| Rollback | File-based backup (`.nanoclaw/backup/`) | ZFS snapshots |

---

## Migration Steps Completed

### Phase 1: Core Rename (v0.1.0)
- Renamed package from `nanoclaw` to `controlplane`
- Renamed `container-runner.ts` → `jail-runner.ts`
- Renamed `container-runtime.ts` → `jail-runtime.ts`
- Renamed `container-config.ts` → `jail-config.ts`
- Renamed `jail-ops.ts` for lifecycle operations
- Removed non-FreeBSD runtime paths (Docker, Apple Container)
- Migrated database columns from `container_config` → `jail_config`

### Phase 2: Channel Migration (v0.1.0)
- Replaced WhatsApp with Telegram as primary channel
- Added `src/channels/telegram.ts` using grammY
- Replaced `npm run auth` from WhatsApp QR to Telegram bot token
- Removed WhatsApp dependencies

### Phase 3: FreeBSD Jail Runtime (v0.1.0)
- Implemented `jexec`-based agent execution in `jail-runner.ts`
- Added Bastille integration in `jail-config.ts`
- Defined Warden jail profiles (control-plane, worker, networked-worker, browser-vm)
- Added `jail/agent-runner/` for PI execution inside jails

### Phase 4: Infrastructure Skills (v0.2.0)
- Added warden-bootstrap, warden-pf, warden-zfs, warden-health
- Added bastille-network for persistent host bridge
- Added freebsd-admin for host-level system changes
- Added sanoid for ZFS snapshot policies
- Added postgres-memory for database jail
- Added nginx-glasspane for operator surface
- Added telegram-admin for operator Telegram path
- Added tmux-screenshot for operator diagnostics
- Added browser-vm for future Linux VM planning
- Validated full stack: controlplane + db jails on warden0

---

## What Remains from NanoClaw

These components are still NanoClaw-derived and functional:

- **skills-engine/** — Skill application, tracking, and rebase engine
- **Output markers** — `---NANOCLAW_OUTPUT_START---` / `---NANOCLAW_OUTPUT_END---` in jail-runner.ts (cosmetic, functional as-is)
- **Core orchestration** — `src/index.ts` message loop and agent dispatch patterns
- **Database layer** — `src/db.ts` SQLite schema and operations
- **Group isolation** — `src/group-folder.ts` and `src/group-queue.ts`
- **IPC** — `src/ipc.ts` filesystem-based inter-process communication
- **Task scheduler** — `src/task-scheduler.ts` cron-like scheduling

These upstream skills are preserved but reference NanoClaw patterns in their internal docs:

- add-discord, add-gmail, add-slack, add-voice-transcription
- add-parallel, x-integration
- coding-agent, customize, debug
- get-qodo-rules, qodo-pr-resolver

---

## Canonical Paths

| Path | Purpose |
| --- | --- |
| `/home/clawdie/clawdie-ai/` | Development codebase |
| `/home/clawdie/clawdie-cp/` | Production deployment |
| `zroot/clawdie-runtime/jails/controlplane` | Control-plane jail dataset |
| `zroot/clawdie-runtime/jails/db` | Database jail dataset |
| `/usr/local/etc/sanoid/sanoid.conf` | Sanoid snapshot policy |

---

## Links

- **Clawdie:** https://clawdie.si
- **Documentation:** https://ai.clawdie.si
- **PRD:** https://domedog.pro/
- **Codeberg:** https://codeberg.org/Clawdie/Clawdie-AI
- **NanoClaw upstream:** https://github.com/openclaw/nanoclaw
- **OpenClaw:** https://github.com/openclaw/openclaw
- **Discord:** https://discord.gg/VDdww8qS42
