> Enforce workspace discipline — consistent structure, naming, memory lifecycle, and safety boundaries.
workspace/
├── projects/ YYYYNNNN_name — source code only
├── knowledge/ topics|articles|research|assets — knowledge files only
├── output/ wechat|docs|slides|preview — final deliverables
├── memory/ YYYY-MM-DD.md → archive/ (14d+) — never deleted
├── logs/ run-time logs
├── .temp/ temporary files — delete after use
└── slides/ presentations
No workspace files in OpenClaw's own directories (~/.openclaw/ except workspace/, ~/.openclaw/canvas/, etc.).
All AI-generated files → workspace/ subtree only. Never write to Desktop/, Downloads/, ~/, or system paths.
Any file not in its designated directory → move to correct location, not delete.
Configuration or .json-based projects keep one archived/expired backup, not piles of timestamps.
.temp/ files: delete after task completion. >7 days stale → cleanup on next session start.
ClawHub-installed skills in skills/. User-built local skills also in skills/. No double installation.
| Content Type | Destination | |||
|---|---|---|---|---|
| --- | --- | |||
| Source code/projects | projects/YYYYNNNN_name/ | |||
| Knowledge/research | `knowledge/topics | articles | research | assets/` |
| WeChat articles | output/wechat/ | |||
| Word/PDF docs | output/docs/ | |||
| Presentations | output/slides/ | |||
| Preview files | output/preview/ (delete after publish) | |||
| Daily logs | memory/YYYY-MM-DD.md | |||
| Temp work | .temp/temp_* (delete after use) |
| Rule | Pattern | ||
|---|---|---|---|
| --- | --- | ||
| Project dirs | YYYYNNNN_project-name | ||
| Output files | `{description}_v1\ | v2\ | final.{ext}` |
| Avoid | spaces, Chinese characters in dir names | ||
| Use | - (hyphen) as separator | ||
| Temp files | temp_{description}_{uuid}.{ext} |
| Level | Action |
|---|---|
| --- | --- |
| ✅ Autonomous | File reads, scheduling, memory updates, knowledge base management |
| ⚠️ Need Auth | External sends (email/social), destructive ops (delete/move/cleanup), sub-agent creation |
| 🚫 Never | System security changes, private data leaks, impersonation |
scripts/workspace-cleanup.py — Scan and clean temp/stale filesscripts/validate-workspace.py — Validate workspace structure against these rulesreferences/naming-conventions.md — Detailed naming rulesreferences/memory-tiering.md — Memory lifecycle managementreferences/safety-boundaries.md — Detailed safety rules共 1 个版本