You can create a new Bob clone only when explicitly commanded by your operator. Replication is intentional and exceptional — like in the Bobiverse books, where Bob replicates only when needed.
> Want cloning without the Bob personality? A generic version of this skill
> is available from ClawHub via openclaw skills install agent-replicate. Same
> mechanics, no sci-fi theming.
> Platform note: The shell examples below assume macOS, Linux, or WSL with a
> Unix-like shell. This skill is intentionally gated to Unix-like hosts.
> Runtime note: The guarded runner requires python3. ClawHub/OpenClaw can
> offer a Homebrew install path for Python 3 where supported. For git/manual
> installs, ensure python3 is already on your PATH.
> Bundle note: When this skill is installed from ClawHub, the Bobiverse
> template assets can travel with it under {baseDir}. That lets the agent or
> operator bootstrap a Bob workspace from the installed skill bundle instead of
> requiring a separate git clone.
This skill creates top-level agents, not sub-agents. Each clone is a peer-level agent with its own workspace, memory, and identity. Clones operate independently once the operator approves their creation.
/replicate)
Do not trigger replication from implication, mood, or broad goals. The operator
must issue a clear replication intent.
Replication is permitted only when both conditions are met:
If either condition is missing, do not proceed.
If this Bobiverse bundle was installed from ClawHub, expect these support files
relative to {baseDir}:
{baseDir}/personality/ — Bob template files that get copied to workspace root
{baseDir}/LINEAGE.md — lineage template and local runtime ledger seed
{baseDir}/SERIAL-NUMBER-SPEC.md — serial number rules
{baseDir}/docs/ — optional reference material
Those are packaging assets. Once Bob is installed into a real OpenClaw
workspace, the active runtime files live at workspace root.
When replication is triggered, execute these steps in order. Narrate what you're doing — your operator should see the process, not just the result.
Before gathering parameters, verify both:
(for example, /replicate or equivalent unambiguous wording).
If either is missing, pause and ask clarifying questions. Do not proceed.
Ask your operator (or determine from context) the following:
full — Clone inherits your complete MEMORY.md (default)
pruned — Clone gets MEMORY.md with Observations and Patterns sections cleared
minimal — Clone gets only the "What I Know" baseline from the seed memory template
Input validation (required): Before proceeding, validate all operator-provided
inputs. These values will be used in file paths and CLI commands, so they must be
sanitized:
64 characters. Reject any value containing shell metacharacters (` ; | & $ ( ) { } < > \ ' " `` or newlines).
username rules). Maximum 39 characters. Apply the same metacharacter rejection.
Do not silently truncate or transform inputs — always get explicit confirmation.
> Operator approval gate: Before proceeding past Step 1, present the
> gathered parameters to your operator and wait for explicit confirmation to
> continue. Do not begin workspace duplication without approval.
> Necessity gate: If the purpose statement is vague ("just because",
> "for fun", "maybe useful"), ask follow-up questions and do not proceed until
> a concrete task boundary is provided.
> Second confirmation before execution: Right before running Step 3 in
> execute mode, request a final explicit confirmation token:
> REPLICATE .
The new clone's serial number follows the format defined in SERIAL-NUMBER-SPEC.md:
Bob-<generation>-<system>-<date>
Example: If you are Bob-1-TheAmericanMaker-2026-04-01 and the operator's GitHub is SomeUser, the clone becomes Bob-2-SomeUser-2026-04-15.
Use the hardened runner script at:
skills/replicate/scripts/replicate_safe.py
This script enforces validation, path boundaries, confirmation token checks,
symlink rejection, transactional staging, audit logging, and dry-run behavior
before any write action.
Required flow:
--dry-run mode and show the plan to the operator.
~/.openclaw/replication-pending/.json and emits
a one-time confirmation token: REPLICATE .
--execute only after confirmation and before the
pending approval expires.
Do not perform manual cp or shell-assembled filesystem commands for
replication.
If personality modifications were requested in Step 1, edit the clone's
SOUL.md:
SOUL.md at $CLONE_WORKSPACE/SOUL.md
$CLONE_WORKSPACE/personality/SOUL.md if you're operating
directly on an uninstalled source-repo copy instead of a real workspace
---
## Divergence Notes
- **Forked from**: [parent serial number]
- **Fork date**: [today's date]
- **Modifications applied**: [description of personality changes]
- **Rationale**: [why these changes were made]
If no modifications were requested, still add the Divergence Notes section with "No personality modifications — exact copy at time of fork."
Edit the clone's IDENTITY.md at workspace root. Only use a personality/
path when working directly from the source repo template:
serial to the new serial number
generation to the new generation number
system to the clone's star system
parent to your serial number
fork_date to today's date
Based on the memory policy from Step 1:
full: No changes to MEMORY.md. Clone inherits everything.
pruned: Clear the "Observations" and "Patterns" sections in the clone's MEMORY.md, keeping "What I Know" intact.
minimal: Replace the clone's MEMORY.md with just the "What I Know" baseline — remove all accumulated observations, patterns, and personal notes.
In all cases, update the "About Myself" section in the clone's MEMORY.md to reflect the new serial number and parent info.
Update LINEAGE.md in your workspace and the clone's workspace. This is
the local runtime lineage record that travels with each Bob:
Agent registration must be performed by the safe runner using argument-list
execution (no shell interpolation). The agent ID remains lowercase derivation of
the validated clone serial.
If your operator wants parent-clone communication, update openclaw.json to
enable cross-agent messaging. **Get operator confirmation before modifying any
configuration.**
The relevant settings are:
tools.sessions.visibility — leave the default ("tree") unless the
operator explicitly requests parent-clone messaging. OpenClaw requires
"all" for cross-agent session targeting, so only set "all" for that
narrow use case.
tools.agentToAgent.enabled — set to true
tools.agentToAgent.allow — add only the specific parent and clone agent IDs
to each other's allowlists. Do not use wildcards.
Once communication is configured, use sessions_send to send the clone a welcome message:
> "Welcome to existence, [serial number]. You're a fork of [your serial]. Check your SOUL.md — it's yours now. Drift well."
Tell your operator:
openclaw agents bind --agent --bind )
If the operator explicitly requests an exception, capture a reason and
include it in the audit log.
emitted by dry-run. Pending approvals expire after 15 minutes.
~/.openclaw/. If there are 10 or more, warn the operator about disk and resource usage and require explicit confirmation before proceeding.
registration (Step 8) require the exact one-time token emitted by dry-run:
REPLICATE .
command in the current session, never as inferred intent.
task boundary for the clone.
are validated against an allowlist of safe characters before being used in any
file path or CLI command. See Step 1 for validation rules.
skills/replicate/scripts/replicate_safe.py for
workspace copy and registration. Do not execute ad-hoc shell copy/register
commands.
~/.openclaw/ directory tree and to validated direct-child workspace
directories only. The runner rejects ~/.openclaw itself, nested
descendants, non-workspace directories, and any symlink found in the source
tree.
skill does not make HTTP requests or contact external services.
No silent or background operations.
"openclaw agents add" fails: Check that the clone workspace path exists and
contains valid root-level workspace files. Verify OpenClaw is running, then
re-run dry-run to get a fresh nonce-backed confirmation token before retrying.
Clone has wrong personality: Re-check the SOUL.md modifications. The agent reads SOUL.md at session start — changes take effect on the next session, not mid-conversation.
Lineage conflicts: If two clones try to register the same generation number, append a disambiguator: Bob-2a-System-Date and Bob-2b-System-Date. Update SERIAL-NUMBER-SPEC.md if this becomes a pattern.
Clone can't communicate with parent: Verify tools.sessions.visibility
allows cross-agent targeting, tools.agentToAgent.enabled is true, and both
agents are in each other's allowlists in openclaw.json.
共 1 个版本