fix: enforce workspace isolation to prevent agent pollution (#57) (#72)

Problem: After installing Agent Reach, agents may clone repos, create
files, or write output into the workspace directory, gradually polluting
the user's project. Over time this degrades the agent experience.

Fix:
- SKILL.md: add Workspace Rules section — never create files in workspace
- install.md: add Directory Rules table, explicit boundary about workspace
- install.md: all git clone commands now target ~/.agent-reach/tools/
- update.md: add workspace warning
- cli.py: install creates ~/.agent-reach/tools/ directory

All agent-facing docs now enforce: /tmp for temp, ~/.agent-reach/ for
persistent data, workspace stays untouched.

Co-authored-by: Panniantong <panniantong@users.noreply.github.com>
This commit is contained in:
Pnant
2026-03-04 18:40:31 +08:00
committed by GitHub
parent 27d3d545e6
commit b4d189b536
4 changed files with 38 additions and 2 deletions
+14 -2
View File
@@ -13,7 +13,19 @@ description: >
# Agent Reach
Install and configure upstream tools for 12+ platforms. After setup, call them directly — no wrapper layer.
Install and configure upstream tools for 13+ platforms. After setup, call them directly — no wrapper layer.
## ⚠️ Workspace Rules
**Never create files, clone repos, or write output in the agent workspace.** Use these directories instead:
| Purpose | Directory |
|---------|-----------|
| Temporary output (subtitles, downloads) | `/tmp/` |
| Upstream tool repos | `~/.agent-reach/tools/` |
| Config & tokens | `~/.agent-reach/` |
Violating this will pollute the user's workspace and degrade their agent experience over time.
## Setup
@@ -277,7 +289,7 @@ asyncio.run(search())
```bash
# Read a WeChat article (returns Markdown with images)
cd /path/to/wechat-article-for-ai && python3 main.py "https://mp.weixin.qq.com/s/ARTICLE_ID"
cd ~/.agent-reach/tools/wechat-article-for-ai && python3 main.py "https://mp.weixin.qq.com/s/ARTICLE_ID"
# Run as MCP server (for AI agent integration)
python3 mcp_server.py