clawdinators/docs/ARCHITECTURE.md
Josh Palmer c2c3bf4f46 🔄 rebrand: moltbot → openclaw, clawdinators
Rename org references from moltbot to openclaw across all config, docs,
CI workflows, flake inputs, secret names, and repo seeds.

Mapping:
- org: moltbot → openclaw
- repos: moltinators → clawdinators, nix-moltbot → nix-openclaw, molthub → clawhub
- secrets: moltinator-* → clawdinator-*
- flake input: nix-moltbot → nix-openclaw
- GH repos renamed: openclaw/nix-openclaw, openclaw/clawdinators

Upstream package/binary names (moltbot, moltbot-gateway, moltbot.json)
kept as-is — those come from nix-openclaw and haven't been renamed yet.

Tests: not run (rename-only change; CI will validate flake eval)
2026-01-30 14:30:46 +01:00

37 lines
1.5 KiB
Markdown

# Architecture (Draft)
Goal: declaratively spawn CLAWDINATOR instances on AWS using OpenTofu + NixOS.
Operating mode:
- declarative-first, no manual setup
- machines are created by automation (another CLAWDINATOR)
Core pieces:
- AWS AMIs are built from a prebuilt NixOS image (nixos-generators + import-image).
- AWS EC2 instances are launched from those AMIs via OpenTofu.
- NixOS modules configure clawbot + CLAWDINATOR runtime on each host.
- Shared memory is mounted at a consistent path on all hosts.
Runtime layout (planned):
- /var/lib/clawd/memory (shared hive-mind memory)
- /var/lib/clawd/workspace (agent workspace)
- /var/lib/clawd/logs (gateway logs)
- /var/lib/clawd/repos/clawdinators (this repo for self-update)
Storage:
- POC uses one host volume per instance (e.g., EBS), mounted at /var/lib/clawd.
- In multi-host mode, add a shared filesystem or object-sync layer and keep canonical memory files authoritative.
Instance naming:
- CLAWDINATOR-{1..n}
- Daily notes can be per-instance (YYYY-MM-DD_INSTANCE.md)
- Canonical files are shared (goals, architecture, ops, etc.)
Upstream freshness:
- Nix flake input tracks `github:openclaw/nix-openclaw` (latest upstream).
- Update with `nix flake update` and rebuild hosts.
- Optional self-update timer is available in the Nix module.
- Self-update expects this repo to be present on the host (default: /var/lib/clawd/repos/clawdinators).
- Updates will refresh flake.lock; review before applying in prod.
- GitHub App tokens are refreshed via a systemd timer when enabled.