OpenClaw to Hermes Migration (8/13) — Porting an AI Agent with a 52-Item Checklist
7 blocks, 77 items. Get the order wrong and you start over.
ํต์ฌ ์์ฝ
- This post describes the 7-block / 77-item checklist structure for migrating an AI agent's configuration assets from one environment to another. The M block (17 items) stays in the source platform; the items ported to Hermes total 52 (P+O+G+H+S+I).
- Porting order: P → O → G → H → S → I. The post explains block by block why stacking upper-layer blocks without their dependencies causes reference errors.
- Covers the 3-tier skill classification (Always-On 5 / On-Demand 9 / Archived 45), the 30-day and 60-day inactivity thresholds, config/loader change patterns just before cutover, and residual token verification.
Overall Structure: 7 Blocks, 77 Items
The unit of work in a porting package is the block, not the individual file. A block is a bundle of files and rules that share a functional purpose. Each block depends on other blocks being present to operate correctly.
| Block | Code | Items | Owner |
|---|---|---|---|
| Meta | M | 17 | OpenClaw manager |
| Persona | P | 8 | Hermes manager |
| Operational | O | 7 | Hermes manager |
| Governance | G | 18 | Hermes manager |
| Heartbeat | H | 7 | Hermes manager |
| Self-Evolution | S | 6 | Hermes manager |
| Integrations | I | 6 | Hermes manager |
The M block holds metadata and archive items that remain in the source environment. The scope that must be ported and verified in the target environment is 52 items (P+O+G+H+S+I).
Why Order Matters
Blocks form a dependency graph. Upper-layer blocks reference objects defined by lower-layer blocks.
- Deploying G (Governance) without P (Persona) leaves the agent identity that governance rules must reference undefined.
- Deploying H (Heartbeat) without O (Operational) causes heartbeat to attempt write operations before the memory-map exists.
- S (Self-Evolution) is only meaningful after both G and O are installed. Without a baseline to measure change deltas against, the gating logic is effectively disabled.
Installation order: P → O → G → H → S → I. Build the foundation layers first, then stack the behavioral layers on top. Reverse-order installation causes reference errors or runtime warnings.
P Block — Persona (8 Items)
The file set that defines agent identity.
P01 IDENTITY + P02 + P04 VALUES + P05 BEING → consolidated into SOUL.md
- Total: 168 lines, 8,381 bytes.
- In the source environment, identity files were spread across multiple locations. In this porting effort, they are merged into a single SOUL.md. The goal is not to reduce file count but to allow identity fields to be read and overwritten from a single file, reducing context-loading cost.
USER.md compression - Original: 128 lines - After compression: 1,211 characters (limit: 1,375 characters) - User profile and behavioral preferences compressed for context window efficiency. 164 characters of headroom remaining.
The most commonly missed items in the P block are VALUES and BEING. Porting only IDENTITY leaves the agent knowing who it is but not how it should reason.
O Block — Operational (7 Items)
The infrastructure layer for day-to-day operation.
- ops board: active task state tracking file
- linter: output quality inspection rules
- memory-map: domain knowledge index
- 25 lessons: accumulated lessons from the source environment
Lessons must not be copied verbatim. Items that reference source-platform-specific paths or service names become dead references in the target environment. During porting, screen for and remove platform-bound references, or rewrite them against the target environment.
G Block — Governance (18 Items)
The block with the highest item count. Includes 3-tier execution governance and a pre-commit guard.
3-tier structure:
Tier 1 (Always-On) → auto-loaded every session, cannot be disabled
Tier 2 (On-Demand) → loaded when conditions are met
Tier 3 (Archived) → inactive state, manual restore only
The tiers partition "what to load always" from a cost perspective. Tier 1 rules are loaded every session regardless of cost. Tier 2 rules load only when specific keywords or context are detected. Tier 3 rules are stored but excluded from the active load set.
pre-commit guard: checks for credential leaks, personal information exposure, and prohibited patterns before commit. The guard enforces governance rules at save time rather than at execution time.
If the P block defines who the agent is, the G block defines what the agent is permitted to do. The two blocks are a pair.
H Block — Heartbeat (7 Items)
The autonomous operation loop.
- 14-mode pool: 14 operation types available to heartbeat
- 13 escalation triggers: criteria for actions the agent cannot process automatically
The 14-mode pool is not a simple ping mechanism. It is a collection of distinct operations — research scans, memory cleanup, daily briefings, reflection passes, and others — each with its own frequency, input conditions, and output format.
The 13 escalation triggers define the conditions under which the agent must request user intervention. The purpose of escalation rules is to establish the boundary between what the agent decides autonomously and what requires a human decision.
S Block — Self-Evolution (6 Items)
The agent self-improvement pipeline.
Three gating conditions:
- reflect: pattern analysis after session end
- research: judgment that external information collection is required
- delta gating: lessons are updated only when changes exceed the threshold
Delta gating is the core of the S block. Updating lessons at every session end degrades the signal-to-noise ratio over time. Changes that do not cross the threshold are not saved. This is the storage strategy.
I Block — Integrations (6 Items)
External system connections.
| Connection | Status |
|---|---|
| Discord | Active |
| Hub (Home Server) | Active |
| GWS (Google Workspace) | Active |
| Browser | Active |
| Additional System A | Connected (standby) |
| Additional System B | Pending |
4 Active, 1 Connected (ready but not yet activated), 1 Pending (configuration in progress). The Active / Connected / Pending distinction separates "credential exists" from "runtime calls permitted," allowing the two to be managed independently.
Skill Classification System
3-tier classification across all 77 skills:
| Tier | Classification | Count | Condition |
|---|---|---|---|
| Tier 1 | Always-On | 5 | Auto-loaded every session |
| Tier 2 | On-Demand | 9 | Conditional load |
| Tier 3 | Archived | 45 | Inactive state |
Inactivity thresholds: - 30 days unused → Archived candidate - 60 days unused → deactivation review
The 45 Tier 3 skills can be manually restored when needed. The files are preserved; they are only excluded from the active load set. Demoting skills by inactivity threshold is a design choice to separate "capable skills" from "frequently used skills," controlling per-session initialization cost.
Pre-Cutover State Verification
config.yaml settings at cutover:
skills:
disabled: 45 # all Tier 3 disabled
platform_disabled:
discord: 14 # 14 Discord-specific skills disabled separately
Independent of Tier 3 deactivation, platform-specific skills are blocked once more via a per-platform switch. Tier-based deactivation and platform-based deactivation operate on different axes and require cross-axis management.
loader.sh sandbox fix:
REAL_HOME=$(eval echo ~$USER)
HERMES_HOME="$REAL_HOME/.hermes"
In Claude Code sandbox environments, $HOME may be set to an isolated path rather than the actual user home. If the loader computes its data directory from $HOME, agent assets are created in the wrong location. Pinning REAL_HOME with eval echo ~$USER is the workaround. This pattern applies to any environment where HOME is redefined — sandbox, chroot, or container.
Residual Token Verification
Two residual checks after porting is complete:
| Item | Result |
|---|---|
| mir/Mir token residue | 0 |
| yongjin token residue | 0 |
If authentication tokens from the previous environment are present in the target environment, API calls will be routed to the wrong account. Residual token verification is not functional verification — it is account isolation verification. This is the final check before cutover.
Checklist Summary
The 52-item porting sequence in order:
- Assemble SOUL.md (P block)
- Compress USER.md and verify character limit
- Port ops board / linter / memory-map / lessons (O block)
- Configure 3-tier governance + pre-commit guard (G block)
- Register 14-mode heartbeat pool + escalation criteria (H block)
- Set up reflect / research / delta gating pipeline (S block)
- Connect 4 Active integrations, verify status of remaining (I block)
- config.yaml: disabled 45 / platform_disabled.discord 14
- Fix loader.sh REAL_HOME
- Run residual token verification
Applicability and Open Questions
This checklist generalizes to any task involving moving an agent's configuration assets from one environment to another. The same structure applies not only to platform porting but also to reinstallation on the same platform, replication to multi-user environments, and rebuilding isolated sandbox environments. Block count and item count vary per agent, but block dependency order / tier-based load control / platform-axis separation / residual token verification are common patterns across all cases.
Open question: whether to express the inter-block dependency graph as an explicit DAG, or to leave it as an implicit "recommended order." An explicit DAG enables automated validation but adds overhead. An implicit order is lightweight but defers order errors to runtime. Moving to an explicit DAG appears inevitable at scale, but the inflection point remains open.
Series overview: Series index
๋๊ธ
๋๊ธ ์ฐ๊ธฐ