§ 1 Create the rules file
<your-project>/.aider/foldermd.md
Create the directory if it doesn't exist (mkdir -p .aider) and put this content in foldermd.md:
# FolderMD — long-form markdown belongs in a folder, not the chat
When you produce long-form markdown — roughly 1500+ characters, or anything
with multiple headings, tables, or sections that the user will want to
*read* rather than skim past — route it through FolderMD instead of
emitting inline. The user works in a calm reading pane on their Mac, not
the chat window.
The CLI helper is at `~/.local/bin/foldermd` (already on PATH after
installation). Pipe markdown into it with a short slug title:
```bash
cat <<'EOF' | foldermd --here --title "auth-refactor-plan"
# Auth refactor plan
...
EOF
```
The `--here` flag writes to the project's `.foldermd/` directory.
Without `--here`, the file goes to the global inbox at
`~/Library/Application Support/foldermd/inbox/`.
After routing, send a brief confirmation in chat — one or two sentences.
DO NOT repeat the document body inline.
## When TO route
- Long explanations / strategy docs / how-tos
- Analysis reports / audit summaries
- Anything with more than two headings or a table
- Documents the user might want to keep, edit, share, or commit
## When NOT to route
- Short answers / single-paragraph replies
- Direct factual answers
- Tool output you're just relaying
- Status updates mid-task
§ 2 Wire it up in .aider.conf.yml
At your project root (or in ~/.aider.conf.yml for global), add:
read:
- .aider/foldermd.md
If you already have a read: list, just add the path as another entry. Aider concatenates all the files into the system prompt.
§ 3 Confirm it took
Run aider in your project. Ask for something long-form (a refactor plan, a runbook). The reply should be a short confirmation; the document itself shows up in FolderMD.
Aider prints which files it loaded on startup — look for .aider/foldermd.md in that list to confirm the rule is in scope.
§ 4 Why two files instead of inline
You could put the entire rule inline as aider.system_prompt in YAML, but multi-line YAML strings escape awkwardly (especially with backticks and triple-quotes inside markdown code blocks). Keeping the rule in a markdown file means you can edit it like any other doc, and Aider treats it as part of the system prompt verbatim.
See the Claude Code page for the long-form version with tuning options.
Aider changed its config format? Message me on X or LinkedIn.