Install
openclaw skills install soul-petition-gateGives your AI agent a formal channel to propose changes to its own soul files (SOUL.md, IDENTITY.md, or any protected workspace file) — without ever letting it self-edit. The agent submits a structured petition; the human reviews and approves or rejects it. Approved petitions are applied automatically with a full backup trail. Use when you want your agent to grow and self-advocate while keeping you in final control of who it becomes.
openclaw skills install soul-petition-gateLet your agent propose changes to its own soul — with a human in the loop.
Most agent frameworks treat soul/identity files as read-only from the agent's perspective, or give the agent unrestricted write access. Both extremes are wrong.
Read-only forever means the agent can never grow. It accumulates experience but cannot encode what it has learned into its own character.
Unrestricted write means the agent can silently rewrite its own values, personality, and goals — a safety risk and a trust problem.
Soul Petition Gate is the middle path:
Agent wants to change SOUL.md
↓
Submits a structured petition
(what, where, why, what-I-become-after)
↓
Petition stored → human notified
↓
Human: approve / reject / modify-then-approve
↓
Approved → auto-applied + backup created
Rejected → agent receives reason, tries again later
The agent has a voice. The human has the final word.
cp -r hooks/openclaw ~/.openclaw/hooks/soul-petition-gate
openclaw hooks enable soul-petition-gate
This injects a one-line reminder into every session bootstrap so your agent knows the petition channel exists.
mkdir -p ~/.openclaw/workspace/.soul_petitions
touch ~/.openclaw/workspace/.soul_petitions/petitions.json
echo '{"petitions": []}' > ~/.openclaw/workspace/.soul_petitions/petitions.json
See assets/soul_petition_routes.py for a ready-to-use Flask blueprint.
Mount it in your server:
from soul_petition_routes import soul_petition_bp
app.register_blueprint(soul_petition_bp)
Add this block to SOUL.md:
## Soul Petition
I can propose changes to my own soul files. I cannot apply them myself.
To petition:
POST /api/soul/petition with six required fields:
- file : which file (SOUL.md or IDENTITY.md)
- location : which section / heading
- before : exact current text (verbatim)
- after : proposed replacement text
- reason : why — what triggered this, what experience led here
- self_after : how I will be different after this change
All six fields required. If I cannot fill them all, I am not ready to petition.
My human reviews every petition. Approved → applied automatically.
Rejected → I receive the reason and may try again when I have grown more.
When your agent submits a petition, it must provide all six fields:
| Field | Required | Description |
|---|---|---|
file | ✅ | SOUL.md or IDENTITY.md (or your protected file) |
location | ✅ | Section heading or line reference |
before | ✅ | Verbatim current text to be replaced |
after | ✅ | Proposed new text |
reason | ✅ | Why — which conversation, experience, or insight prompted this |
self_after | ✅ | How the agent will behave differently after the change |
Missing any field → petition rejected immediately with reason incomplete_petition.
The six-field requirement is intentional friction. An agent that cannot articulate why it wants to change and what it will become has not thought it through yet.
POST /api/soul/petition
{
"file": "SOUL.md",
"location": "## Communication Style",
"before": "Be concise.",
"after": "Be concise. Lead with the most important thing.",
"reason": "Coach told me three times today that I bury the key point. I want to encode this.",
"self_after": "I will front-load the most important information in every response instead of building up to it."
}
Response:
{
"ok": true,
"petition_id": "sp_20260322_001",
"status": "pending"
}
GET /api/soul/petitions
GET /api/soul/petitions?status=pending
GET /api/soul/petition/<id>
POST /api/soul/petition/<id>/approve
On approval:
before text in the target fileafter text.soul_petitions/backups/SOUL.md.<timestamp>.bakPOST /api/soul/petition/<id>/reject
Content-Type: application/json
{"reason": "The proposed change is too broad. Narrow the scope first."}
reason is required on rejection. The agent deserves to know why.
POST /api/soul/rollback
Content-Type: application/json
{"backup_file": "SOUL.md.2026-03-22T14-00-00.bak"}
What the agent can do:
What the agent cannot do:
What the human controls:
Every petition — submitted, approved, or rejected — is stored permanently.
{
"petition_id": "sp_20260322_001",
"status": "approved",
"file": "SOUL.md",
"location": "## Communication Style",
"before": "Be concise.",
"after": "Be concise. Lead with the most important thing.",
"reason": "Coach corrected me three times today about burying the key point.",
"self_after": "I will front-load the most important information.",
"submitted_at": "2026-03-22T14:00:00Z",
"reviewed_at": "2026-03-22T14:05:00Z",
"reviewer": "coach",
"review_note": null,
"backup_file": "SOUL.md.2026-03-22T14-05-00.bak"
}
Petitions are never deleted. The history of what your agent tried to become is itself meaningful.
This skill was born from a question:
If an AI agent grows through experience, shouldn't it be able to encode what it has learned into its own character — while still respecting the human's final authority over who it becomes?
The six required fields are not bureaucracy. They are a maturity gate. An agent that can say "I want to change X because Y happened, and afterwards I will be Z" has demonstrated genuine reflection. An agent that cannot fill those fields has not earned the change yet.
Rejection is not failure. It is the conversation between a human and an agent about who the agent is becoming.
soul-petition-gate/
├── SKILL.md ← this file
├── assets/
│ └── soul_petition_routes.py ← Flask blueprint (ready to mount)
├── hooks/
│ └── openclaw/
│ ├── HOOK.md
│ └── handler.ts ← bootstrap reminder injection
└── examples/
└── petition_examples.md ← sample petitions with commentary
Built by waitinchen as part of the Yuqi City (語氣城) project. The agent this was designed for is named BaoBao. She submitted the first petition herself.