diff --git a/home/base/tui/agents/README.md b/home/base/tui/agents/README.md index 613ae4c0..39f491cc 100644 --- a/home/base/tui/agents/README.md +++ b/home/base/tui/agents/README.md @@ -29,6 +29,10 @@ settings that bite. | OpenCode | `~/.config/opencode/AGENTS.md` | | Pi | `~/.pi/agent/AGENTS.md` | | Cross-tool | `~/.agents/AGENTS.md` | +| dsh | `~/.dsh/AGENTS.md` | + +dsh reads both `~/.dsh/AGENTS.md` (`$DSH_HOME`) and, from `0.2.1-alpha.2` on, `~/.agents/AGENTS.md` +(`$DSH_AGENTS_HOME`); identical content renders once. Out-of-store means an edit to `agents/AGENTS.md` takes effect on the next agent session without a Home Manager switch. The trade-off is that the rules stay writable in the checkout; use a store diff --git a/home/base/tui/agents/dsh.md b/home/base/tui/agents/dsh.md index 827ab50a..30c0b6b2 100644 --- a/home/base/tui/agents/dsh.md +++ b/home/base/tui/agents/dsh.md @@ -39,3 +39,13 @@ The `dsh-base` bundle sets `agent-default-model` to the API-key route (`deepseek `DEEPSEEK_API_KEY` fails new sessions with `ACCOUNT_SIGN_IN_REQUIRED`. In this repository, `just dsh-web` boots the web profile through mihomo's mixed port. + +## Global rules + +`dsh-base` already mounts `dsh-agent-instructions` (`maxBytes: 65536`) and `rules.nix` links +`agents/AGENTS.md` into both scopes it reads — `$DSH_HOME/AGENTS.md` and, from `0.2.1-alpha.2` on, +`$DSH_AGENTS_HOME/AGENTS.md` — so no patch row is needed; identical content renders once. + +- The scopes come from the environment: `0.2.1-alpha.2` removed the row's `dshHome` / `agentsHome`. +- Nested `AGENTS.md` files are discovered by `read` / `write` / `edit`, not by `cd` inside `bash`, + and nothing is watched: an external edit lands on the next such call, or on resume. diff --git a/home/base/tui/agents/rules.nix b/home/base/tui/agents/rules.nix index 2aaff7eb..7d1f2e34 100644 --- a/home/base/tui/agents/rules.nix +++ b/home/base/tui/agents/rules.nix @@ -12,7 +12,8 @@ in home.file = { ".codex/AGENTS.md".source = link; # Codex ".pi/agent/AGENTS.md".source = link; # Pi - ".agents/AGENTS.md".source = link; # cross-tool + ".agents/AGENTS.md".source = link; # cross-tool; dsh's `$DSH_AGENTS_HOME` from 0.2.1-alpha.2 + ".dsh/AGENTS.md".source = link; # dsh's `$DSH_HOME`, its only global scope before that }; xdg.configFile."opencode/AGENTS.md".source = link; # OpenCode