memory: record multi-agent dev architecture preferences

This commit is contained in:
2026-03-07 18:18:37 +10:00
parent c04ef70ca7
commit 5755b357a5
2 changed files with 112 additions and 0 deletions
+53
View File
@@ -0,0 +1,53 @@
# Long-term Memory (curated)
## 1) Working model / roles
- Tao prefers to send tasks to **main**; main acts as **PM/architect** and delegates implementation (often to Codex).
- Dedicated agents and intended responsibilities:
- **tech_geek** (Telegram group “技术宅”, workspace `tech_home_group`): tech/home-lab/ops discussions + GitHub (gh CLI / PR / CI / issues) follow-up.
- **travel_assistant**: travel planning and travel-related research/tasks.
- **finance_assistant** (“理财小帮手”): personal finance tasks.
## 2) Dev workflow / merge policy
- **Small changes** (docs/copy/layout/typos/i18n cleanup): Xiao Qiang can merge after self-review/verification, then notify Tao with PR link + summary.
- **Big feature changes**: require Tao review/approval before merge.
## 3) Sub-agents: architecture + token efficiency
- Sub-agents reuse the parent/main agent **bot** for messaging, but each sub-agent has an **independent workspace + SOUL (persona) + MEMORY (memory)**.
- Goal: prevent context/memory mixing, improve focus/efficiency, and save tokens by keeping contexts smaller.
- Current preferred multi-agent architecture for complex development:
- **main** acts as **PM/architect/reviewer**: requirements, task breakdown, prioritization, risk calls, progress updates, and final summaries to Tao.
- Execution agents should be **role-specialized** and do the implementation work.
- **codex_worker** is the dedicated Codex execution agent for coding tasks.
- For complex projects, create more specialized agents as needed (e.g. frontend/backend/test/ops/docs/data) instead of overloading one agent.
- This is the **current default pattern**, but Tao may change the rules as needs evolve.
## 4) ACP/Codex delegation constraints
- Telegram channel plugin currently does **not** support `subagent_spawning` hooks → cannot bind persistent subagent sessions with `thread=true`; use `sessions_spawn(mode="run")` as workaround.
## 5) OCM (OpenClaw Manager) repo policies
- OCM repo path: `~/.openclaw/ocm`.
- Internal-only docs (Project Brief / Architecture / Decisions) must **not** be uploaded to GitHub; keep them under `~/.openclaw/ocm-internal/docs/`.
## 6) Ops / security notes
- Ensure `~/.openclaw/openclaw.json` is not world-readable; prefer permission mode **600**.
## 7) Model policy (current preference)
- Historical temporary preference once was: all subagents **primary** = `openai-codex/gpt-5.2`, **fallback** = `github-copilot/claude-opus-4.6`.
- Current important exception / newer rule: **codex_worker** should use **primary** = `openai-codex/gpt-5.4`, prefer high/extra/xhigh thinking when available, and should **not auto-fallback** to another model. If its primary model is unavailable, report to Tao and let Tao decide the replacement model.
## 8) Watchdog / automation policy
- Tao preference: avoid watchdog-style auto-restart automation.
- The previous watchdog automation was **removed**:
- OpenClaw cron job `Gateway monitor + auto-restart (main)` removed (jobId `139258d6-f675-4f88-b2a7-cbe0b93a0db6`).
- Mac launchd watchdog `ai.openclaw.watchdog` removed.
- Pi-side crontab watchdog removed.
## 9) Webex keep-alive (local script)
- Tao requested a controllable Webex desktop “keep active” option.
- Script installed on Mac: `~/.openclaw/scripts/webex-keepalive.sh` (commands: `start|stop|status`).
- Notes: uses AppleScript/System Events; may require macOS Accessibility permission for Terminal/iTerm. Logs: `~/.openclaw/logs/webex-keepalive.log`, pid: `~/.openclaw/run/webex-keepalive.pid`.
## 10) Local memory library organization
- Local memory dir: `/Users/taodeng/.openclaw/workspace/main/memory/`.
- Added `memory/INDEX.md` to classify daily notes vs topic notes vs automation state JSON (do not rename/move state JSON without updating jobs).
- Plan: create a separate GitHub KB repo (option A) for shareable/curated knowledge; keep private/sensitive items local and only publish redacted content.
+59
View File
@@ -0,0 +1,59 @@
# 2026-03-07
## Memory/Embeddings incident + external API inventory (OpenClaw)
- Issue: `memory_search` (semantic memory retrieval) failed with `429 insufficient_quota` due to embeddings provider quota exhaustion.
- Root cause: OpenClaw `agents.defaults.memorySearch.provider = openai` with `remote.apiKey` present (OpenAI embeddings key). Not related to Brave web search.
### External API / Provider inventory (from ~/.openclaw/openclaw.json)
- Chat/model routing:
- Primary: `openai-codex/gpt-5.4`
- Fallbacks: `openai-codex/gpt-5.2`, `github-copilot/claude-opus-4.6`
- Memory semantic search:
- `memorySearch.enabled = true`
- `memorySearch.provider = openai`
- `memorySearch.remote.apiKey` present
- `memorySearch.sources = [memory, sessions]`
- Web tools:
- `tools.web.search.enabled = true` (Brave Search key present)
- `tools.web.fetch.enabled = true`
- Auth profiles present: `anthropic:manual`, `github-copilot:github`, `openai:manual`, `openai-codex:default`.
## User request
- Tao requested: archive this inventory info and keep it updated whenever APIs/providers are added/removed in the future.
## Comms protocol update (task progress)
- Tao reported a recurring issue: after assigning a task, the agent may go silent (stuck or working) unless Tao explicitly asks.
- Preference selected: progress updates at **milestones** (Option B).
- Policy: acknowledge within ~30s with plan+ETA; then send updates at each milestone; if ETA slips, proactively report block/reason/next-step.
## Memory architecture preference (agents)
- Tao preference: each Agent should have **independent soul + independent memory**; do **not** share memory across agents.
- Disaster recovery preference: restore automation should be maximized; when restoring, default to **safe mode**: rename existing `~/.openclaw` before restoring (Option B).
## Clawkeeper project + gateway safety incident
- Created and published new open-source repo: https://github.com/dtzp555-max/clawkeeper
- Purpose: OpenClaw Memory Ops Kit (doctor + embeddings probe + provider switch + backup plan + verify-backup + restore tooling).
- Added `doctor` to perform a real OpenAI embeddings probe (minimal request) to detect 429/insufficient_quota early.
- Added `backup-plan --json` and `verify-backup <tgz>` to ensure backups include required paths.
- Added `restore-guide` and `restore-apply` with SAFE default: do not restart gateway unless explicitly requested.
- Incident: calling `openclaw gateway restart` during restore testing could leave LaunchAgent in a bad state (not loaded / restart fails), forcing `openclaw gateway install` to recover; can cause temporary messaging disconnects.
- New hard rule from Tao: do not harm the primary Mac gateway during development/testing; use a separate test machine.
## Test machine ("lobster" 232)
- Host: 172.16.2.232 (ubuntu-srv), user: administrator.
- SSH key: ~/.ssh/openclaw_backup_key
- Tao confirmed key was installed; verified login: `ssh -i ~/.ssh/openclaw_backup_key administrator@172.16.2.232 'echo OK'`.
- Policy: perform potentially disruptive OpenClaw install/restart tests on 232 instead of the primary Mac.
## Multi-agent dev workflow preference
- Tao clarified the intended architecture for complex development:
- main = PM / architect / coordinator / reviewer / reporter.
- execution agents do the hands-on implementation.
- Dedicated execution agent for Codex work:
- Name: `codex_worker`
- Workspace: `~/.openclaw/workspaces/codex_worker`
- Agent dir: `~/.openclaw/agents/codex_worker/agent`
- Model target: `openai-codex/gpt-5.4`
- Preference: `codex_worker` should avoid automatic fallback; if GPT-5.4 is unavailable, report to Tao for model decision.
- Preference: execution agents should get the strongest execution model; main should remain strong for PM/summary work, but not necessarily do the coding itself.
- This architecture is the current default, but Tao may revise it as needs change.