You finally got your AI agent set up. It's writing code, drafting emails, doing research โ it's amazing. Then you open Finder and realize: where did all these files come from?
There are random Markdown files in your home directory. A research-output.md sitting in /tmp/. Three different versions of the same report scattered across folders you didn't create. Your AI agent is brilliant โ and also a messy teenager who leaves clothes on the floor.
You're not alone. This is one of the most common frustrations for people getting started with AI agents like OpenClaw, Claude Code, or any LLM-powered coding assistant. The agent does great work, but it has no idea where to put things.
The Hidden Folder Problem
Here's something most new OpenClaw users don't realize: by default, your working files live in ~/.openclaw/ โ that's a hidden folder. On macOS, you literally can't see it in Finder unless you press Cmd + Shift + Period to reveal hidden files.
Think about that. Your AI agent is doing all this work, generating files, saving research, building projects โ and you can't even see the output without a keyboard shortcut.
The fix is simple: move your working files out of the hidden directory and into a visible one.
For example, instead of:
~/.openclaw/workspace/ โ hidden, invisible in Finder
Use:
~/openclaw/workspace/ โ visible, right there in your home folder
Keep the core config files (gateway token, openclaw.json) in ~/.openclaw/ where they belong. But your actual work โ projects, research, agent configs, memory โ should live somewhere you can see it. You wouldn't hide your desk in a closet. Don't hide your workspace either.
The Real Problem: No Rules, No Structure
Even after you move your workspace to a visible folder, you still have the messy teenager problem. Your agent doesn't know the difference between a marketing asset and a QA report. It doesn't know that research belongs in one folder and session logs belong in another. Without rules, every file ends up wherever the agent happens to drop it.
This is where two concepts change everything: the FILE-MAP and the Files Agent.
Introducing FILE-MAP.md
A FILE-MAP is a simple Markdown file that lives at the root of your workspace. It's a contract โ a single source of truth that says: this is where things go.
Here's what a basic FILE-MAP looks like:
# FILE-MAP.md โ Workspace Directory Convention
## Root: ~/openclaw/workspace/
| Directory | Purpose |
|----------------|--------------------------------------|
| websites/ | All web properties and deployed apps |
| agents/ | Agent configs โ one subfolder each |
| marketing/ | Campaign assets and copy |
| market-research/ | Executive briefs and analysis |
| testing/ | QA reports and audit results |
| memory/ | Daily session logs (YYYY-MM-DD.md) |
| scratch/ | Temp work โ cleaned every 30 days |
## Rules
1. Never use /tmp/ โ use scratch/ instead
2. No loose files at workspace root
3. Every file has a home
That's it. It's not complicated. But it gives your agent a map to follow instead of dumping files wherever.
The Files Agent: Your Digital Marie Kondo
Here's where it gets powerful. Instead of just having a FILE-MAP that you hope your agent follows, you create a dedicated Files Agent โ a specialized agent whose entire job is enforcing file organization.
The Files Agent:
- Owns the FILE-MAP and keeps it updated
- Audits the workspace periodically for misplaced files
- Proposes moves โ it never auto-deletes, it flags and asks
- Enforces rules like "no loose files at root" and "never write to /tmp/"
- Manages the scratch/ cleanup โ anything untouched for 30 days gets flagged
Think of it as a bouncer for your file system. Every file that comes in gets checked: "Do you belong here? Let me show you to your table."
The Directory Structure That Works
After weeks of real-world use, here's the structure we landed on:
~/openclaw/workspace/
โโโ websites/ # Deployed web apps and sites
โโโ agents/ # Agent configs (qa/, ux/, research/, files/)
โโโ marketing/ # Campaign assets
โโโ market-research/ # Briefs, competitor analysis, reports
โโโ testing/ # QA and audit reports
โโโ memory/ # Session logs (YYYY-MM-DD.md)
โโโ scratch/ # Temp files (30-day cleanup policy)
โโโ FILE-MAP.md # The single source of truth
โโโ MEMORY.md # Persistent cross-session memory
The key insight: separate concerns by purpose, not by project. Agent configs go in agents/. Test results go in testing/. Websites go in websites/. When you need to find something, you know exactly which folder to open.
Tips from the Community
The AI agent community is converging on similar patterns. The AGENTS.md standard (adopted by 40,000+ open-source projects) puts agent instructions in a single discoverable file at the project root โ the same principle as FILE-MAP but for code guidance. LangChain recommends a modular directory structure with clear separation between tools, state, and agent logic.
And the number one tip from Reddit threads and Discord channels? Start organizing early. The longer you wait, the worse the mess gets. Set up your FILE-MAP in the first week, not the third month.
Get Started in 5 Minutes
- Move your workspace out of the hidden
~/.openclaw/folder - Create a FILE-MAP.md at your workspace root
- Define 5-7 top-level folders based on what you actually do
- Add a
scratch/folder for temp work (with a cleanup policy) - Tell your agent about the FILE-MAP in its system prompt or AGENTS.md
Your Clawbot doesn't have to be a messy teenager. Give it rules, give it structure, and it'll keep your workspace cleaner than you ever could.
Want the Full Playbook?
Download the Tidy Clawbot PDF for templates, a ready-to-use FILE-MAP, and step-by-step Files Agent setup.
