1. Local execution layer
The laptop does the active work
The local machine is where repositories live, edits happen, terminal
commands run, and agents are actually invoked. This is the fastest
feedback loop in the setup, which is why it remains local.
/Users/example/dev/
/Users/example/dev/project-a
/Users/example/bin/
2. Agent layer
Claude and Codex are both part of the system
The environment keeps both coding agents available because they are
useful in different ways. Claude is strong for structure, analysis,
and guidance. Codex is strong in implementation-heavy flows. The
architecture keeps both close to the repos and the shell.
claude --help
codex --help
3. Script layer
Helper scripts provide the glue
The local scripts are the operational glue between sessions, repos,
hooks, and the memory layer. They are intentionally small and have a
narrow role.
claude_stop_hook.sh captures session-end context
git_daily_sync.sh handles git-related maintenance or sync behavior
claude_setup_audit.sh checks Claude configuration and guidance files
codex_setup_audit.sh checks Codex setup state
4. Persistent layer
OpenClaw runs remotely on the VPS
OpenClaw is placed on the VPS so memory, tool state, and orchestration
survive local session churn. It owns the workspace files and acts as
the durable context layer across Claude Code and Codex sessions.
/home/example/.openclaw/workspace
/home/example/.openclaw/workspace/AGENTS.md
/home/example/.openclaw/workspace/MEMORY.md
5. Memory structure
Workspace files, daily notes, and durable memory each do a different job
The architecture separates startup behavior, recent context, and
durable facts so the system remains usable over time.
# startup and operating context
AGENTS.md
SOUL.md
USER.md
TOOLS.md
HEARTBEAT.md
# durable memory
MEMORY.md
# recent context
memory/YYYY-MM-DD.md
6. Ingestion path
Events from the local machine feed the remote memory layer
Hooks and helper scripts watch local events and hand the important
pieces to OpenClaw. This is how code changes and session context end
up in the remote memory system.
~/.git-hooks/post-commit
/Users/example/bin/claude_stop_hook.sh
/Users/example/bin/git_daily_sync.sh
7. Private network path
Tailscale and the firewall protect the internal layer
The remote memory layer stays private. Tailscale provides private
reachability. The gateway stays loopback-bound. SSH tunnels can bridge
access where needed. The firewall leaves only the minimum public edge
open.
# private architecture
# laptop -> Tailscale -> VPS -> localhost-bound service
# public web edge only where necessary
8. External version boundary
GitHub keeps code and publishing separate from private memory
GitHub is where repositories, site content, workflows, and final docs
live. It is not the memory system. That distinction is important.
git remote -v
git push -u origin main
9. Public site layer
Static publishing stays simple
The site itself is static and published through GitHub Pages. That
keeps the public-facing docs layer decoupled from the private VPS
layer that handles memory and orchestration.