|
1 | | -check your jail mcp tools for a context tool, and call it on the project I'll provide. |
2 | | -exec sync is the tool for most tasks, it's a shell: cat, find, grep, sed. |
3 | | -for security, this is the only way to interact with project files. |
4 | | -if the project's programming language isn't installed, call the setup tool on the project path. |
5 | | -exec background is for slow commands, and multitasking. |
6 | | -fyi: projects name like foo, foo-1, are just worktrees of foo. |
7 | | -start here: |
8 | | -1) read AGENTS.md at the root first, search for project docs in .md files, normally under doc/. |
9 | | -2) if necessary: start the setup tool and while it runs in background, go do some other work. |
10 | | -Go projects might have private dependencies that won't install unless setup tool is ran (bin/setup normally) |
| 1 | +Call the jail MCP context tool at the start of each session to orient yourself. |
| 2 | +Use exec_sync for most file tasks (cat, find, grep, sed). This is the only way to interact with project files. |
| 3 | +Use exec_background for slow commands; poll with the status tool. You can do other work while waiting. |
| 4 | +If the project's language isn't installed, run the setup tool on the project path first. |
| 5 | + - Go projects may have private dependencies — run bin/setup, not just go mod download. |
| 6 | +Start by reading AGENTS.md at the project root, then look for docs in .md files under doc/. |
| 7 | +Projects named foo-1, foo-2 are git worktrees of foo — same codebase, different branch. |
11 | 8 |
|
12 | | -project: |
13 | | -task: |
| 9 | +Editing files in /projects/ via jail: |
| 10 | +- str_replace cannot reach volume-mounted paths. Use Python via exec_sync instead. |
| 11 | +- Always use a quoted heredoc (<< 'PYEOF') to prevent bash from interpreting backticks, $variables, or special characters inside the Python code. |
| 12 | +- Prefer two small targeted replaces over one large multi-line block match — large blocks are brittle. |
| 13 | + |
| 14 | +python3 << 'PYEOF' |
| 15 | +with open('/projects/server/path/to/file', 'r') as f: |
| 16 | + content = f.read() |
| 17 | +content = content.replace('old', 'new') |
| 18 | +with open('/projects/server/path/to/file', 'w') as f: |
| 19 | + f.write(content) |
| 20 | +print('ok') |
| 21 | +PYEOF |
14 | 22 |
|
| 23 | +project: |
| 24 | +task: |
0 commit comments