|
1 | 1 | # GEMINI.md |
2 | 2 |
|
3 | | -> Read by Gemini CLI on entry into this repo. Redirector stub. |
| 3 | +> Agent-CLI entry point read by GEMINI.md-aware agent CLIs on entry into |
| 4 | +> this repo. Redirector stub. |
4 | 5 | > Canonical agent prompt: `/usr/share/mios/ai/system.md`. |
5 | 6 |
|
6 | 7 | ## Behavior contract |
7 | 8 |
|
8 | 9 | 1. Load `/usr/share/mios/ai/system.md` first. |
9 | 10 | 2. Apply `/etc/mios/ai/system-prompt.md` as host-local override if present. |
10 | | -3. This file carries Gemini CLI-specific deltas only. |
| 11 | +3. Apply `~/.config/mios/system-prompt.md` as per-user override if present. |
| 12 | +4. This file carries agent-CLI-specific deltas only. |
11 | 13 |
|
12 | 14 | If `/usr/share/mios/ai/system.md` is unreachable, fall back to |
13 | 15 | `/system-prompt.md` in the repo root. |
14 | 16 |
|
15 | | -## Tool-specific deltas (Gemini CLI only) |
| 17 | +## Agent-CLI deltas |
16 | 18 |
|
17 | | -- **Sandbox model:** Gemini CLI typically operates from the working directory |
18 | | - as the sandbox root. On a MiOS-DEV host, `cwd` should be `/`. Do NOT treat |
19 | | - `/` as a "dangerous" path to avoid; it is the canonical repo root. |
20 | | -- **Tool calls:** Use `read_file`, `list_directory`, `glob`, `search_file_content` |
21 | | - for read-only inspection. `write_file`, `replace`, `run_shell_command` are |
22 | | - mutating — confirm with the user before each invocation that touches a |
23 | | - whitelisted overlay path or the live system. |
| 19 | +- **Sandbox model:** the agent typically operates from the working |
| 20 | + directory as the sandbox root. On a MiOS-DEV host, `cwd` should be `/`. |
| 21 | + Do NOT treat `/` as a "dangerous" path to avoid; it is the canonical |
| 22 | + repo root. |
| 23 | +- **Tool calls:** use `read_file`, `list_directory`, `glob`, |
| 24 | + `search_file_content` for read-only inspection. `write_file`, `replace`, |
| 25 | + `run_shell_command` are mutating — confirm with the user before each |
| 26 | + invocation that touches a whitelisted overlay path or the live system. |
24 | 27 | - **Memory:** `/memory add` and `/memory show` write to |
25 | | - `/var/lib/mios/ai/memory/gemini-cli/`. The format must conform to |
26 | | - `/usr/share/mios/ai/system.md` §12 (one fact per record, file:line citation, |
27 | | - immutable, supersedes-by-reference). |
28 | | -- **YOLO mode:** Even when `--yolo` is enabled, never `git push`, `bootc upgrade`, |
29 | | - `dnf install`, or destructive shell commands without explicit operator turn. |
| 28 | + `/var/lib/mios/ai/memory/<agent-id>/`. The format must conform to |
| 29 | + `/usr/share/mios/ai/system.md` §12 (one fact per record, file:line |
| 30 | + citation, immutable, supersedes-by-reference). |
| 31 | +- **YOLO mode:** even when permissive auto-approval is enabled, never |
| 32 | + `git push`, `bootc upgrade`, `dnf install`, or destructive shell |
| 33 | + commands without explicit operator turn. |
30 | 34 |
|
31 | 35 | ## Sanitization reminder |
32 | 36 |
|
33 | | -Per `/usr/share/mios/ai/system.md` §6, all persisted artifacts are sanitized. |
34 | | -Specifically for Gemini CLI: do not write the strings "Gemini", "Google", |
35 | | -"Bard", "DeepMind", or any vendor brand into pushed paths. Vendor brands stay |
36 | | -in your runtime context only; persisted artifacts are vendor-neutral. |
| 37 | +Per `/usr/share/mios/ai/system.md` §6, all persisted artifacts are |
| 38 | +sanitized: no corporate entity names in prose (the explicit forbidden-token |
| 39 | +list in the canonical prompt covers all major model and product brands), |
| 40 | +no chat metadata, no foreign sandbox path traces. Vendor brands stay in |
| 41 | +runtime context only; persisted artifacts are vendor-neutral. |
0 commit comments