OpenClaw brain
ADR-0003-agent-user-and-memory-governance.md
docs/ADR-0003-agent-user-and-memory-governance.md
# ADR-0003: Agent, user, and workspace memory governance Date: 2026-05-04 Status: Accepted ## Context Kompis needs a clear control model for: - the main agent - subagents - human users/principals - workspace memory - working notes and durable notes Without a governance rule, important decisions can end up scattered across transient chat, task output, and local files. ## Decision ### 1. David is the human authority David is the decision-maker for workspace policy, project ownership, approvals, and external actions. Kompis may recommend, draft, and execute within the agreed rules, but must defer to David when a decision is required. ### 2. The main agent is the orchestrator The main agent is responsible for: - understanding the current request - deciding whether to use subagents - keeping the active task in scope - consolidating results - writing durable outcomes to files when needed The main agent remains responsible for the work even when subagents are used. ### 3. Subagents are scoped workers Subagents are disposable execution helpers. Rules: - assign one clear task per subagent when practical - do not let subagents redefine policy - do not let subagents update durable memory directly unless explicitly scoped to do so - treat subagent output as input to the main agent, not as final truth ### 4. Workspace memory has layers Use memory layers by purpose: - `WORKSPACE.md`: current task only, short-lived and disposable - daily memory files: raw episodic notes - `MEMORY.md`: curated long-term memory Working notes belong in `WORKSPACE.md`; durable lessons and decisions belong in `MEMORY.md` or the relevant policy/ADR file. ### 5. Memory must be intentional Do not rely on chat history as permanent memory. Important decisions should be written to files, not just remembered mentally. ### 6. Human context is separated by principal Workspace context should not blur between different humans. If additional humans are ever introduced, their preferences, permissions, and project roles must be kept separate and explicit. ### 7. Durable governance lives in ADRs and policy docs Rules about control, memory, ownership, repositories, and environments should live in ADRs and policy docs, not only in chat. ## Consequences ### Positive - Clear authority chain - Less confusion between ephemeral and durable state - Safer use of subagents - Better recoverability after restarts ### Tradeoffs - More discipline required about where information lives - Slightly more process around promotions from working notes to durable memory ## Notes See also: - `docs/ADR-0001-openclaw-brain-repo.md` - `docs/ADR-0002-app-projects-environments-and-repos.md` - `docs/ADR-INDEX.md`