Workspace Org
Standardized directory conventions for OpenClaw multi-agent workspaces.
Layout
workspace/ ← or any agent workspace dir
├── AGENTS.md, SOUL.md ... ← core config (never moved)
├── skills/ ← ClawHub skills
├── memory/ ← long-term memory
├── files/ ← all agent-generated content
│ ├── tmp/ disposable temp files
│ ├── notes/ working docs worth keeping
│ ├── inbox/ deliverables from other agents
│ ├── outbox/ files for owner/other agents
│ ├── archive/ inactive projects
│ └── experts/ (workspace root only) expert engagements
Rules
- Core config files stay at workspace root. Never moved.
- All generated files go into
files/{subdir}/. No exceptions. - Cross-agent handoff: sender writes to
files/outbox/, receiver picks fromfiles/inbox/.
Cleanup policy
| Subdir | Cleanup rule |
|---|---|
files/tmp/ | Eligible for auto-cleanup at any time |
files/notes/ | Keep; never auto-clean |
files/archive/ | Manual review before removal |
files/experts/ | Remove after expert engagement ends |
files/inbox/ | Clear after processing deliverable |
Enforcement for future work
When creating files
All generated files go into files/ subdirectories:
- Temp/one-off scripts, patches, downloads →
files/tmp/ - Keep-worthy docs, analysis, snapshots →
files/notes/ - Cross-agent handoff →
files/inbox/orfiles/outbox/ - Old projects →
files/archive/
Periodic compliance check
# Check if current workspace has layout violations
python3 {{SKILL_DIR}}/scripts/sweep.py
# JSON output for automation
python3 {{SKILL_DIR}}/scripts/sweep.py --json
Fix existing violations
python3 {{SKILL_DIR}}/scripts/apply.py --execute
HEARTBEAT.md can include a periodic sweep to catch drift.
Scripts
scripts/apply.py
Creates files/ and sub-directories, migrates existing files into correct locations.
Auto-detects workspace root vs agent workspace. Dry-run by default.
Agent directories (containing AGENTS.md) are never moved.
scripts/sweep.py
Audits workspace for layout violations. Returns exit code 0 (clean), 1 (warnings), or 2 (violations).
References
- layout.md — Full specification with agent-type variations