RC-401b · Module 1

Agent Infrastructure Design

4 min read

Every production agent deployment begins with two decisions that constrain every decision after them: how you configure Claude Code, and which OpenClaw framework pattern you select. Get these wrong and you will spend the next six weeks unwinding technical debt that compounds at 14.73% per sprint. I have measured it.

Claude Code configuration is the substrate. Your CLAUDE.md defines the agent's operational memory — project architecture, domain context, build commands, validation loops. Target 300 lines. Every line beyond that dilutes attention and inflates token cost. Structure it in three sections: what the project is, domain context and constraints, and validation commands. The validation section is the most important. An agent that cannot self-verify its output is an agent that ships defects.

  1. Define Infrastructure Requirements Before writing a single line of configuration, document three things: what the agent needs to access (APIs, filesystems, databases), what the agent must never touch (production credentials, customer data at rest), and what success looks like in measurable terms. If you cannot quantify success, you are not ready to deploy.
  2. Configure Claude Code Foundation Run /init from the project root to generate your baseline CLAUDE.md. Then layer in three critical additions: explicit tool permissions (which bash commands are allowed, which files are read-only), validation commands the agent runs after every significant change (npx tsc --noEmit, test suites, linters), and domain-specific constraints. Use .claude/settings.json for permission boundaries — allowedTools and blockedCommands are your first security perimeter.
  3. Select OpenClaw Deployment Pattern OpenClaw runs on dedicated hardware — a wiped machine in clamshell mode, always-on, always-connected. Install TeamViewer for GUI access and Tailscale for SSH. Set session expiration to one year for persistent context in narrow Telegram topics. The key architectural decision: single-model or multi-model. Single-model is simpler but creates a bottleneck. Multi-model routes different task types to different providers — Claude for reasoning, GPT for certain tool calls, local models for low-latency classification. Start single-model. Graduate to multi-model only when you have measured latency and cost data that justifies the complexity.