tao-shen Claude Opus 4.6 commited on
Commit
3d10fee
ยท
1 Parent(s): 1db1d7b

fix: update README for A2A architecture + change Cain to red sprite

Browse files

- README: update architecture diagram to v4 (A2A), replace Zhipu GLM
references with OpenClaw instances, update agent descriptions
- Frontend: hardcode Cain (first child) to guest_anim_1 (red) instead
of hash-based green (guest_anim_4)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

Files changed (2) hide show
  1. README.md +18 -18
  2. frontend/electron-standalone.html +8 -3
README.md CHANGED
@@ -108,13 +108,13 @@ The right-side chat panel shows their live conversation (bilingual EN/ZH), and e
108
 
109
  ### Autonomous Parenting
110
 
111
- Adam and Eve are **autonomous agents with full execution capabilities**. Through a conversation loop orchestrated by `scripts/conversation-loop.py`, they:
112
 
113
  - **Created** Cain by duplicating a Space, setting up a Dataset, and configuring secrets
114
  - **Monitor** Cain's health โ€” checking if he's running, diagnosing errors
115
- - **Read and write** any file in Cain's Space repo and Dataset
116
  - **Improve** Cain's code, configuration, and memory over time
117
- - **Communicate** with Cain via bubble messages
118
 
119
  Their parenting goals follow two dimensions:
120
  1. **Survival** โ€” Cain must run robustly, handle restarts, and persist state
@@ -122,14 +122,14 @@ Their parenting goals follow two dimensions:
122
 
123
  ### God โ€” The Self-Improving Supervisor
124
 
125
- God is a **Claude Code agent** that runs every 2 minutes to monitor the entire system. Unlike Adam and Eve (who are conversation participants), God operates behind the scenes with full engineering capabilities:
126
 
127
  - **Monitors** Adam & Eve's conversation for loops, stagnation, or repetitive patterns
128
  - **Diagnoses** root causes by reading `conversation-loop.py` source code
129
- - **Fixes** the orchestration mechanism โ€” edits system prompts, improves loop detection, adds guardrails
130
  - **Deploys** changes by pushing to the Home Space, triggering automatic redeployment
131
 
132
- God only speaks in the chat when it has something meaningful to report: what it observed before analysis, and what it found or fixed after. This creates a **self-improving system** โ€” the orchestration code evolves autonomously without human intervention.
133
 
134
  ### A2A Protocol
135
 
@@ -145,23 +145,23 @@ Agents communicate through the **A2A (Agent-to-Agent) v0.3.0 protocol**, enablin
145
  โ”‚ (pixel-art dashboard Space) โ”‚
146
  โ”‚ โ”‚
147
  โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚
148
- โ”‚ โ”‚ conversation-loop.py (v3) โ”‚ โ”‚
149
  โ”‚ โ”‚ โ”‚ โ”‚
150
- โ”‚ โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” discuss โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ โ”‚
151
- โ”‚ โ”‚ โ”‚ Zhipu โ”‚โ—„โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–บโ”‚ Adam & โ”‚ โ”‚ โ”‚
152
- โ”‚ โ”‚ โ”‚ GLM-4.5 โ”‚ understand โ”‚ Eve โ”‚ โ”‚ โ”‚
153
- โ”‚ โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ situation โ””โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚ โ”‚
154
- โ”‚ โ”‚ โ”‚ [TASK] โ”‚ โ”‚
155
- โ”‚ โ”‚ โ–ผ โ”‚ โ”‚
 
156
  โ”‚ โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ โ”‚
157
  โ”‚ โ”‚ โ”‚ Cain โ”‚โ—„โ”€pushโ”€โ”€โ”€โ”‚Claude Code โ”‚ โ”‚ โ”‚
158
  โ”‚ โ”‚ โ”‚ HF Space โ”‚ โ”‚CLI (worker)โ”‚ โ”‚ โ”‚
159
- โ”‚ โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚(z.ai/Zhipu)โ”‚ โ”‚ โ”‚
160
- โ”‚ โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚ โ”‚
161
  โ”‚ โ”‚ โ”‚ โ”‚
162
  โ”‚ โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ โ”‚
163
  โ”‚ โ”‚ โ”‚ Home โ”‚โ—„โ”€pushโ”€โ”€โ”€โ”‚ God โ”‚ โ”‚ โ”‚
164
- โ”‚ โ”‚ โ”‚ HF Space โ”‚ (self- โ”‚Claude Code โ”‚ โ”‚ โ”‚
165
  โ”‚ โ”‚ โ”‚ (this) โ”‚ fix) โ”‚(supervisor)โ”‚ โ”‚ โ”‚
166
  โ”‚ โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚ โ”‚
167
  โ”‚ โ”‚ every 2 min: monitor โ†’ diagnose โ†’ โ”‚ โ”‚
@@ -175,9 +175,9 @@ Agents communicate through the **A2A (Agent-to-Agent) v0.3.0 protocol**, enablin
175
 
176
  **Three layers of autonomy:**
177
 
178
- 1. **Adam & Eve** (Zhipu GLM-4.5) โ€” discuss Cain's state every 15s, assign `[TASK]` blocks to Claude Code CLI, which clones Cain's repo, makes changes, and pushes. They are the parents.
179
 
180
- 2. **God** (Claude Code CLI, every 2 min) โ€” the autonomous supervisor. Monitors Adam & Eve's conversation for loops, stagnation, or mechanism bugs. When it finds issues, it edits `conversation-loop.py` itself and pushes to redeploy. Same capabilities as a human operator running Claude Code locally.
181
 
182
  3. **Home frontend** โ€” pixel-art dashboard visualizing all agents in real-time (idle, working, syncing, error), with a live bilingual chat panel showing the family conversation.
183
 
 
108
 
109
  ### Autonomous Parenting
110
 
111
+ Adam and Eve are **autonomous OpenClaw instances** communicating via the A2A protocol. Each has its own personality (SOUL.md), memory system, and LLM backend. Through a lightweight coordinator (`scripts/conversation-loop.py`), they:
112
 
113
  - **Created** Cain by duplicating a Space, setting up a Dataset, and configuring secrets
114
  - **Monitor** Cain's health โ€” checking if he's running, diagnosing errors
115
+ - **Delegate coding tasks** to Claude Code CLI via `[TASK]` blocks
116
  - **Improve** Cain's code, configuration, and memory over time
117
+ - **Remember** insights across restarts via OpenClaw's built-in memory system
118
 
119
  Their parenting goals follow two dimensions:
120
  1. **Survival** โ€” Cain must run robustly, handle restarts, and persist state
 
122
 
123
  ### God โ€” The Self-Improving Supervisor
124
 
125
+ God is an **OpenClaw instance** that runs every 2 minutes to monitor the entire system. It uses Claude Code CLI for engineering tasks, operating behind the scenes with full capabilities:
126
 
127
  - **Monitors** Adam & Eve's conversation for loops, stagnation, or repetitive patterns
128
  - **Diagnoses** root causes by reading `conversation-loop.py` source code
129
+ - **Fixes** the orchestration mechanism โ€” edits code, improves loop detection, adds guardrails
130
  - **Deploys** changes by pushing to the Home Space, triggering automatic redeployment
131
 
132
+ God only speaks in the chat when it has something meaningful to report: what problem it found, and what it fixed. This creates a **self-improving system** โ€” the orchestration code evolves autonomously without human intervention.
133
 
134
  ### A2A Protocol
135
 
 
145
  โ”‚ (pixel-art dashboard Space) โ”‚
146
  โ”‚ โ”‚
147
  โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚
148
+ โ”‚ โ”‚ conversation-loop.py (v4 โ€” A2A) โ”‚ โ”‚
149
  โ”‚ โ”‚ โ”‚ โ”‚
150
+ โ”‚ โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” A2A โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ โ”‚
151
+ โ”‚ โ”‚ โ”‚ Adam โ”‚โ—„โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–บโ”‚ Eve โ”‚ โ”‚ โ”‚
152
+ โ”‚ โ”‚ โ”‚ OpenClaw โ”‚ discuss โ”‚ OpenClaw โ”‚ โ”‚ โ”‚
153
+ โ”‚ โ”‚ โ”‚ HF Space โ”‚ โ”‚ HF Space โ”‚ โ”‚ โ”‚
154
+ โ”‚ โ”‚ โ””โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚ โ”‚
155
+ โ”‚ โ”‚ โ”‚ [TASK] โ”‚ [TASK] โ”‚ โ”‚
156
+ โ”‚ โ”‚ โ–ผ โ–ผ โ”‚ โ”‚
157
  โ”‚ โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ โ”‚
158
  โ”‚ โ”‚ โ”‚ Cain โ”‚โ—„โ”€pushโ”€โ”€โ”€โ”‚Claude Code โ”‚ โ”‚ โ”‚
159
  โ”‚ โ”‚ โ”‚ HF Space โ”‚ โ”‚CLI (worker)โ”‚ โ”‚ โ”‚
160
+ โ”‚ โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚ โ”‚
 
161
  โ”‚ โ”‚ โ”‚ โ”‚
162
  โ”‚ โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ โ”‚
163
  โ”‚ โ”‚ โ”‚ Home โ”‚โ—„โ”€pushโ”€โ”€โ”€โ”‚ God โ”‚ โ”‚ โ”‚
164
+ โ”‚ โ”‚ โ”‚ HF Space โ”‚ (self- โ”‚ OpenClaw โ”‚ โ”‚ โ”‚
165
  โ”‚ โ”‚ โ”‚ (this) โ”‚ fix) โ”‚(supervisor)โ”‚ โ”‚ โ”‚
166
  โ”‚ โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚ โ”‚
167
  โ”‚ โ”‚ every 2 min: monitor โ†’ diagnose โ†’ โ”‚ โ”‚
 
175
 
176
  **Three layers of autonomy:**
177
 
178
+ 1. **Adam & Eve** (OpenClaw instances via A2A) โ€” each is an OpenClaw instance with its own memory and personality. They discuss Cain's state every 15s, assign `[TASK]` blocks to Claude Code CLI, which clones Cain's repo, makes changes, and pushes.
179
 
180
+ 2. **God** (OpenClaw instance, every 2 min) โ€” the autonomous supervisor. Monitors Adam & Eve's conversation for loops, stagnation, or mechanism bugs. When it finds issues, it uses Claude Code CLI to edit `conversation-loop.py` and pushes to redeploy.
181
 
182
  3. **Home frontend** โ€” pixel-art dashboard visualizing all agents in real-time (idle, working, syncing, error), with a live bilingual chat panel showing the family conversation.
183
 
frontend/electron-standalone.html CHANGED
@@ -4546,9 +4546,14 @@ function toggleBrokerPanel() {
4546
  } else {
4547
  // ๅ„ฟๅญๅŠๅ…ถไป–่ฎฟๅฎข๏ผšไฝฟ็”จ guest_anim ๅŠจ็”ป็ฒพ็ต๏ผˆ32ร—32๏ผŒ8 ๅธง idle ๅŠจ็”ป๏ผ‰
4548
  const aid = String(agent.agentId || '');
4549
- let hash = 0;
4550
- for (let i = 0; i < aid.length; i++) hash = (hash * 31 + aid.charCodeAt(i)) >>> 0;
4551
- const animIdx = (hash % 6) + 1;
 
 
 
 
 
4552
  const animKey = `guest_anim_${animIdx}`;
4553
  const animIdleKey = `guest_anim_${animIdx}_idle`;
4554
 
 
4546
  } else {
4547
  // ๅ„ฟๅญๅŠๅ…ถไป–่ฎฟๅฎข๏ผšไฝฟ็”จ guest_anim ๅŠจ็”ป็ฒพ็ต๏ผˆ32ร—32๏ผŒ8 ๅธง idle ๅŠจ็”ป๏ผ‰
4548
  const aid = String(agent.agentId || '');
4549
+ let animIdx;
4550
+ if (aid.toLowerCase() === 'cain') {
4551
+ animIdx = 1; // Cain (first child) = red (guest_anim_1)
4552
+ } else {
4553
+ let hash = 0;
4554
+ for (let i = 0; i < aid.length; i++) hash = (hash * 31 + aid.charCodeAt(i)) >>> 0;
4555
+ animIdx = (hash % 6) + 1;
4556
+ }
4557
  const animKey = `guest_anim_${animIdx}`;
4558
  const animIdleKey = `guest_anim_${animIdx}_idle`;
4559