diff --git a/AGENTS.md b/AGENTS.md index 5c8a311..ecf54c0 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -6,7 +6,7 @@ Deliberate decisions in this repo - do NOT silently revert them: - Agent configs under `home/` are the source of truth. `home.nix` installs them with `mkOutOfStoreSymlink` + `force = true`, so edits to files in `home/` apply live after the first rebuild that creates the symlink. Prefer editing those paths, not the live `~/.claude` / `~/.grok` / `~/.pi` copies. `rebuild.sh` rotates stale `*.backup` files before switch so home-manager never fails with "would be clobbered". - Grok Build is first-class here: `home/.grok/config.toml` and `home/AGENTS.md` (linked as `~/.grok/AGENTS.md`). Claude, Codex, opencode, and Pi share the same `home/AGENTS.md` for multi-agent work. - Pi is managed the same way: `home/.pi/agent/{settings,models}.json`, `themes/`, and custom extensions (`terminal-status-title`, `calm`). Do not symlink the whole `~/.pi/agent` tree - sessions, auth, npm cache, and herdr's `extensions/herdr-agent-state.ts` stay live. -- firstmate lives at `~/Documents/firstmate` as a mutable git clone (not in the Nix store). `home.activation.firstmate` clones it if missing and seeds `config/backend=herdr` + `config/crew-harness=pi` only when those files are absent. Launch with shell alias `fm` (`cd` + OpenCode 2 via `~/.local/bin/oc2`). Self-update via `/updatefirstmate`, not rebuild. +- firstmate lives at `~/Documents/firstmate` as a mutable git clone (not in the Nix store). `home.activation.firstmate` clones it if missing and seeds `config/backend=herdr` + `config/crew-harness=opencode` only when those files are absent. Launch with shell alias `fm` (`cd` + OpenCode 2 via `~/.local/bin/oc2`). Self-update via `/updatefirstmate`, not rebuild. - OpenCode 2 is the firstmate primary. It is not a Homebrew formula: install `@opencode-ai/cli@beta` with Homebrew's npm (`home.activation.opencode2`). Launch through `home/bin/oc2` so `OPENCODE_CONFIG` stays at `home/.config/opencode2/opencode.json` and cannot rewrite OpenCode 1.x's `~/.config/opencode`. Do not add a brew `opencode` / `opencode2` formula; `zap` would fight the npm install. firstmate harness detection matches `*opencode*`, so the `opencode2` process name still classifies as OpenCode. - Shell aliases: `cc` (Claude skip-permissions), `co` (Codex full-auto), `gb` (Grok --yolo), `fm` (firstmate via OpenCode 2), `oc2` (OpenCode 2, isolated). They are intentional high-agency shortcuts. diff --git a/home.nix b/home.nix index 07d357c..3968a1f 100644 --- a/home.nix +++ b/home.nix @@ -293,8 +293,10 @@ in ''; # kunchenguid/no-mistakes gate (git push no-mistakes) - declarative install + daemon + global config - # Uses OpenCode only for pipeline steps (the opencode-go subscription), by the - # captain's decision. Binary lives in ~/.no-mistakes/bin + # Uses Pi for pipeline steps (the opencode-go subscription), by the captain's + # decision: Pi is a neutralization-capable gate agent, which opencode is not, so + # it is required to run the gate in firstmate's own checkout. Binary lives in + # ~/.no-mistakes/bin # with symlink ~/.local/bin/no-mistakes (installer default). Do NOT npm install -g no-mistakes # - that npm name is jonathanong's static-analysis tool (shadowing bug fixed 2026-09-21). home.activation.noMistakes = lib.hm.dag.entryAfter [ "writeBoundary" ] '' @@ -308,22 +310,15 @@ in fi curl -fsSL https://raw.githubusercontent.com/kunchenguid/no-mistakes/main/docs/install.sh | sh fi - # Ensure global config selects OpenCode (idempotent - only writes if missing or still `agent: auto`) + # Ensure global config uses Pi (idempotent - only writes if missing or still `agent: auto`) cfg="$HOME/.no-mistakes/config.yaml" - if [ -f "$cfg" ] && grep -qE '^\s*agent:\s*auto\s*$' "$cfg"; then + if [ -f "$cfg" ] && grep -qE '^[[:space:]]*agent:[[:space:]]*auto[[:space:]]*$' "$cfg"; then tmp="$(mktemp)" - awk ' - /^\s*agent:\s*auto\s*$/ { - print "# Managed by dotfiles/home.nix home.activation.noMistakes"; - print "agent: [opencode]"; - next - } - { print } - ' "$cfg" > "$tmp" && mv "$tmp" "$cfg" + sed 's|^[[:space:]]*agent:[[:space:]]*auto[[:space:]]*$|# Managed by dotfiles/home.nix home.activation.noMistakes\nagent: [pi]|' "$cfg" > "$tmp" && mv "$tmp" "$cfg" fi if [ ! -f "$cfg" ]; then mkdir -p "$(dirname "$cfg")" - printf 'agent: [opencode]\n' > "$cfg" + printf 'agent: [pi]\n' > "$cfg" fi # Ensure daemon running (launchd on macOS) "$bin" daemon restart >/dev/null 2>&1 || "$bin" daemon start >/dev/null 2>&1 || true diff --git a/home/.pi/agent/settings.json b/home/.pi/agent/settings.json index 088748a..2641ec4 100644 --- a/home/.pi/agent/settings.json +++ b/home/.pi/agent/settings.json @@ -1,8 +1,8 @@ { - "lastChangelogVersion": "0.84.1", + "lastChangelogVersion": "0.87.1", "theme": "rose-pine-moon", - "defaultProvider": "omlx", - "defaultModel": "qwen3.6-35b", + "defaultProvider": "opencode-go", + "defaultModel": "deepseek-v4.1-flash", "models": [ { "name": "Qwen 3.6 35B (o4-mtp)",