Summary
Multi-agent setups need a way to share bootstrap context (rules, persona, instructions) across all agents without duplicating files in each workspace.
Problem
Bootstrap files (SOUL.md, AGENTS.md, etc.) are per-workspace. When running multiple agents that should follow the same rules, there's no built-in mechanism to maintain a single source of truth. The existing bootstrap-extra-files hook restricts files to within the workspace directory and only loads recognized bootstrap basenames.
Proposed Solution
A new bundled hook (shared-bootstrap) that auto-discovers SHARED_*.md files from <stateDir>/shared/ (default ~/.openclaw/shared/) and injects them into every agent's Project Context during agent:bootstrap.
- Zero configuration — drop files in the directory, restart, every agent gets them
- Only files matching
SHARED_*.md are loaded (prefix prevents confusion with per-workspace files)
- Files are sorted alphabetically and appended after workspace bootstrap files
- No subagent filtering — shared files appear in every session type
- Missing directory is silent; unreadable directory or files are fatal errors
Summary
Multi-agent setups need a way to share bootstrap context (rules, persona, instructions) across all agents without duplicating files in each workspace.
Problem
Bootstrap files (
SOUL.md,AGENTS.md, etc.) are per-workspace. When running multiple agents that should follow the same rules, there's no built-in mechanism to maintain a single source of truth. The existingbootstrap-extra-fileshook restricts files to within the workspace directory and only loads recognized bootstrap basenames.Proposed Solution
A new bundled hook (
shared-bootstrap) that auto-discoversSHARED_*.mdfiles from<stateDir>/shared/(default~/.openclaw/shared/) and injects them into every agent's Project Context duringagent:bootstrap.SHARED_*.mdare loaded (prefix prevents confusion with per-workspace files)