Add Grok Build agent config adapted from Claude Code setup
Wire shared AGENTS.md and Claude settings through home-manager, plus a native Grok config (always-approve, rose-pine) and a `gb` yolo alias.
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
# Project notes for agents
|
||||
|
||||
Deliberate decisions in this repo - do NOT silently revert them:
|
||||
|
||||
- `homebrew.onActivation.cleanup = "zap"` in `configuration.nix` is intentional. It forces the good habit of declaring every Homebrew package in the Nix config instead of installing things ad-hoc, which keeps the machine reproducible. Do not soften it to `uninstall` or `none`. Users are warned about its effect; this note is for anyone tempted to change the setting itself.
|
||||
- Agent configs under `home/` are the source of truth. `home.nix` installs them with `mkOutOfStoreSymlink`, 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` copies.
|
||||
- Grok Build is first-class here: `home/.grok/config.toml` and `home/AGENTS.md` (linked as `~/.grok/AGENTS.md`). Claude, Codex, and opencode still share the same `home/AGENTS.md` for multi-agent work.
|
||||
- Shell aliases: `cc` (Claude skip-permissions), `co` (Codex full-auto), `gb` (Grok --yolo). They are intentional high-agency shortcuts.
|
||||
|
||||
## Maintaining this file
|
||||
|
||||
Keep this file for knowledge useful to almost every future agent session in this project.
|
||||
Do not repeat what the codebase already shows; point to the authoritative file or command instead.
|
||||
Prefer rewriting or pruning existing entries over appending new ones.
|
||||
When updating this file, preserve this bar for all agents and keep entries concise.
|
||||
@@ -34,8 +34,10 @@ in
|
||||
push = "git push";
|
||||
pull = "git pull";
|
||||
m = "git switch main";
|
||||
# High-agency agent launchers (same idea across tools)
|
||||
cc = "claude --dangerously-skip-permissions";
|
||||
co = "codex --full-auto";
|
||||
gb = "grok --yolo";
|
||||
};
|
||||
};
|
||||
|
||||
@@ -52,11 +54,29 @@ in
|
||||
};
|
||||
};
|
||||
|
||||
# Edit-in-place: the real file stays in my repo, ~/.config just points at it.
|
||||
# Edit-in-place: the real file stays in my repo, the live path just points at it.
|
||||
home.file.".config/wezterm".source =
|
||||
config.lib.file.mkOutOfStoreSymlink "${dotfiles}/home/.config/wezterm";
|
||||
home.file.".config/nvim".source =
|
||||
config.lib.file.mkOutOfStoreSymlink "${dotfiles}/home/.config/nvim";
|
||||
home.file.".config/herdr".source =
|
||||
home.file.".config/herdr".source =
|
||||
config.lib.file.mkOutOfStoreSymlink "${dotfiles}/home/.config/herdr";
|
||||
|
||||
# Claude Code settings (also read by Grok for permissions/compat)
|
||||
home.file.".claude/settings.json".source =
|
||||
config.lib.file.mkOutOfStoreSymlink "${dotfiles}/home/.claude/settings.json";
|
||||
|
||||
# Shared agent policy - one file, many harnesses
|
||||
home.file.".claude/CLAUDE.md".source =
|
||||
config.lib.file.mkOutOfStoreSymlink "${dotfiles}/home/AGENTS.md";
|
||||
home.file.".codex/AGENTS.md".source =
|
||||
config.lib.file.mkOutOfStoreSymlink "${dotfiles}/home/AGENTS.md";
|
||||
home.file.".config/opencode/AGENTS.md".source =
|
||||
config.lib.file.mkOutOfStoreSymlink "${dotfiles}/home/AGENTS.md";
|
||||
home.file.".grok/AGENTS.md".source =
|
||||
config.lib.file.mkOutOfStoreSymlink "${dotfiles}/home/AGENTS.md";
|
||||
|
||||
# Grok Build native config
|
||||
home.file.".grok/config.toml".source =
|
||||
config.lib.file.mkOutOfStoreSymlink "${dotfiles}/home/.grok/config.toml";
|
||||
}
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"theme": "dark-ansi",
|
||||
"statusLine": {
|
||||
"type": "command",
|
||||
"command": "input=$(cat); model=$(echo \"$input\" | jq -r '.model.display_name'); used=$(echo \"$input\" | jq -r '.context_window.used_percentage // empty'); if [ -n \"$used\" ]; then printf \"%s | ctx: %.0f%% used\" \"$model\" \"$used\"; else printf \"%s\" \"$model\"; fi"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
# Grok Build user config - managed via home-manager (edit here, then rebuild if needed).
|
||||
# Adapted from Claude Code setup in kunchenguid/dotfiles + local preferences.
|
||||
#
|
||||
# Mapping notes:
|
||||
# Claude --dangerously-skip-permissions -> permission_mode = "always-approve" / --yolo
|
||||
# Claude theme dark-ansi + rose-pine stack -> theme = "rosepine"
|
||||
# Claude statusLine (model | ctx %) -> no direct equivalent; TUI shows this natively
|
||||
# Shared AGENTS.md -> ~/.grok/AGENTS.md (via home.nix)
|
||||
|
||||
[marketplace]
|
||||
official_marketplace_auto_installed = true
|
||||
|
||||
[[marketplace.sources]]
|
||||
name = "xAI Official"
|
||||
git = "https://github.com/xai-org/plugin-marketplace.git"
|
||||
|
||||
[models]
|
||||
default = "grok-build"
|
||||
|
||||
[ui]
|
||||
theme = "rosepine"
|
||||
max_thoughts_width = 120
|
||||
fork_secondary_model = "grok-build"
|
||||
# High-agency default, same idea as `claude --dangerously-skip-permissions` / `codex --full-auto`.
|
||||
# Toggle per session with Ctrl+O or /always-approve. Shell alias `gb` also launches with --yolo.
|
||||
permission_mode = "always-approve"
|
||||
yolo = false
|
||||
compact_mode = false
|
||||
@@ -0,0 +1,14 @@
|
||||
# global agent instructions
|
||||
|
||||
- Never use the em dash "—". Use plain dash "-" instead
|
||||
- When writing commit messages, NEVER auto-add your agent name as co-author
|
||||
- Never manually modify CHANGELOG.md files or any files that are marked as auto-generated
|
||||
- When making technical decisions, do not give much weight to development cost.
|
||||
Instead, prefer quality, simplicity, robustness, scalability, and long term maintainability.
|
||||
- When doing bug fixes, always start with reproducing the bug in an E2E setting as closely aligned with how an end user would experience it as possible.
|
||||
This makes sure you find the real problem so your fix will actually solve it.
|
||||
- When end-to-end testing a product, be picky about the UI you see and be obsessed with pixel perfection.
|
||||
If something clearly looks off, even if it is not directly related to what you are doing, try to get it fixed along the way.
|
||||
- Apply that same high standard to engineering excellence: lint, test failures, and test flakiness.
|
||||
If you see one, even if it is not caused by what you are working on right now, still get it fixed.
|
||||
- Before using "dynamic workflows", "ultra code" or any harness feature that immediately spawns a large swarm of subagents, always explain the tradeoffs and ask the user for explicit approval.
|
||||
Reference in New Issue
Block a user