Compare commits

...
Author SHA1 Message Date
Lap Tran 84c26cca45 no-mistakes(document): Document git prerequisite for the security-audit skill install 2026-10-24 21:02:35 -04:00
Lap Tran 75088e1f15 fix(home): put /usr/bin on the security-audit activation PATH
The Skills CLI spawns git to clone the skill. The activation block only
prepended /opt/homebrew/bin, so git at /usr/bin/git was not resolvable and
the rebuild failed with "spawn git ENOENT". Prepend /usr/bin too.
2026-10-24 20:55:01 -04:00
hermes d01d13ff1c Merge pull request 'Add security-audit skill install and restore paid Go crew dispatch' (#9) from fm/dotfiles-security-audit-skill into main 2026-10-24 20:45:55 -04:00
Lap Tran 788a97a61d no-mistakes(document): Prune incident narrative and duplicate skill commands 2026-10-24 20:34:29 -04:00
Lap Tran aaeadb50d5 no-mistakes(test): Name only runtime-later activation blocks in opencode2 comment 2026-10-24 20:23:10 -04:00
Lap Tran b1869a1afd no-mistakes(review): Correct Grok scope and opencode path claims in skill docs 2026-10-24 20:12:10 -04:00
Lap Tran 1a3c38406a Add security-audit skill install and restore paid Go crew dispatch
Install cloudflare/security-audit through the Skills CLI with Homebrew npx
so the multi-file skill stays upstream-identical. The universal target
~/.agents/skills is read by OpenCode, Codex, Pi, and Grok; the CLI also
links it into ~/.claude/skills for Claude Code. Skip when installed, warn
instead of failing when GitHub is unreachable, and never target the
read-only ~/.config/opencode/skills store link.

Return crew dispatch to opencode-go/deepseek-v4.1-flash in both the UI
rule and the default, per the captain's 2026-10-21 order, and correct the
AGENTS.md routing note.

Stop opencode2's activation from calling exit 0: activation blocks are
inlined into one flat script, so it silently skipped every later block
(securityAuditSkill, setupLaunchAgents, syncMusic).
2026-10-24 19:54:36 -04:00
hermes b37ee69be1 Merge pull request 'Add OpenSuperWhisper local voice input' (#8) from fm/dotfiles-opensuperwhisper into main 2026-10-24 17:58:13 -04:00
Lap Tran 86844a3646 no-mistakes(document): Fix OpenSuperWhisper cask comment and Settings model label 2026-10-24 15:56:33 -04:00
Lap Tran 16677278ba no-mistakes(review): Seed OpenSuperWhisper model path only, stop overwriting app settings 2026-10-24 15:46:06 -04:00
Lap Tran 4a4ce6c585 Add OpenSuperWhisper local voice input
Install the opensuperwhisper cask and add home.activation.openSuperWhisper
to download the Whisper V3 Large turbo model once, verify its SHA256, and
set the app defaults. Model and defaults stay outside the Nix store; macOS
TCC grants remain manual. Document first-run steps, permissions, and the
default shortcut in readme.md and AGENTS.md.
2026-10-24 15:30:10 -04:00
hermes 7603df3666 Merge pull request 'Switch crew dispatch to free DeepSeek V4.1 Flash' (#7) from fm/dotfiles-crew-dispatch-free-model into main 2026-10-21 10:03:10 -04:00
Lap Tran 7f5bf7b111 no-mistakes(review): Update AGENTS.md crew-routing note for free DeepSeek Flash 2026-10-20 21:53:02 -04:00
Lap Tran 738c1de3f9 Switch crew dispatch to free DeepSeek V4.1 Flash 2026-10-20 21:27:50 -04:00
Lap Tran ee43a5cd8f Route firstmate crews to paid Go DeepSeek V4.1 Flash
The free DeepSeek tier is metered, and exhausting it stalls a crew mid-task:
one build sat waiting for free quota to reset hours later. Crews now run
opencode-go/deepseek-v4.1-flash on the OpenCode Go subscription, which
OpenCode documents as zero-retention and not used for training.

The AGENTS.md line documenting crew routing is updated to match.
2026-10-16 16:50:14 -04:00
Lap Tran b2081fa14f Update lazy.nvim and record Pi changelog marker
lazy.nvim moved to 85c7ff3 after a plugin-manager update on this machine.
Both files are tracked so a fresh setup installs the same versions instead
of drifting to whatever is newest.

Also restore the trailing newline on settings.json, which a tool rewrote
without one.
2026-10-16 16:39:31 -04:00
Lap Tran efe174ba64 Route firstmate crews to the free DeepSeek model
Crews were routed to the paid OpenCode Go account. They now use the free
DeepSeek V4.1 Flash model, which OpenCode documents as zero-retention and
not used for training, so no repository code or prompt leaves retention.

The AGENTS.md line documenting crew routing is updated to match, and now
records which free models to avoid: the muse-spark contributor models train
on prompts, the exo-free, mimo and nemotron free models may use data to
improve the model, and cat-jam-free retains for 30 days.
2026-10-16 16:39:29 -04:00
Lap Tran b31fadd85a config: OpenCode Go deepseek routing, no-mistakes review split, settings
Route firstmate crews and both OpenCode sessions to opencode-go/deepseek-v4.1-flash. Split the no-mistakes pipeline so the implementer and fixer run deepseek-v4.1-flash and the reviewer runs opencode-go/glm-5.3-flash. Add Pi context-window overrides for the deepseek models, Pi package updates, a lavish-axi Claude SessionStart hook, and the AGENTS.md response-style rules.
2026-10-08 18:27:59 -04:00
hermes acbad2d954 Merge pull request 'fix: ignore herdr agent socket and session snapshots' (#6) from fm/fm-dotfiles-herdr-ignore-gap into main 2026-10-06 17:58:45 -04:00
hermes 26790706c8 Merge pull request 'fix(opencode): set 256k context limit for Muse Spark models' (#5) from fm/fm-crew-context-256k into main 2026-10-06 17:20:30 -04:00
hermes 96e8d4ce51 Merge pull request 'Route firstmate crews to opencode harness' (#4) from fm/fm-crew-opencode-routing into main 2026-10-06 17:18:21 -04:00
Lap Tran 9eaba6aae6 fix(opencode): set 256k context limit for Muse Spark models 2026-10-06 17:14:13 -04:00
Lap Tran 2e7bee5f61 feat: route firstmate crews to opencode harness
crew-dispatch.json: UI/image rule and default select opencode;
models (muse-spark-1.3-contributor, deepseek-v4.1-flash), providers,
and reasons unchanged. AGENTS.md records opencode crews and the
spawn-owned opencode-store login instead of Pi ambient auth.
2026-10-06 11:18:16 -04:00
Lap Tran e8447c3c28 fix: ignore herdr agent socket and session snapshots
*.sock never matched herdr.sock.agent and nothing covered
session-snapshots/, so both dirtied the working tree. The
home.activation.herdrConfigDir cleanup list already names them;
this brings .gitignore in line so a tree containing those runtime
paths reads clean.
2026-10-06 11:15:17 -04:00
hermes ca3c7fa45a Merge pull request 'fix: keep herdr runtime state out of the dotfiles working tree' (#3) from fm/fm-clone-runtime-dirt-dotfiles into main 2026-10-06 10:25:44 -04:00
Lap Tran 2bcaf5fd32 no-mistakes(document): Point herdr state-file rationale at the cleanup list 2026-10-05 23:19:25 -04:00
Lap Tran b0d7087a46 fix(rebuild): rotate herdr config.toml backup as a file target
~/.config/herdr moved from a whole-directory home.file target to a file
target, so rebuild.sh must follow. Treat ~/.config/herdr/config.toml as a
managed file backup target and stop listing ~/.config/herdr as a directory
target, otherwise a real config.toml backed up to config.toml.backup would
fail the next switch with "would be clobbered".
2026-10-05 22:58:29 -04:00
Lap Tran 1eb147f3d3 no-mistakes(document): Record herdr config-dir invariant; flag stale rebuild.sh rotation 2026-10-05 22:49:57 -04:00
Lap Tran b6095c8a20 no-mistakes(review): home: add herdr-client.log and sessions to herdr cleanup 2026-10-05 22:32:40 -04:00
Lap Tran d5fc8758a5 no-mistakes(review): home: move herdr migration after writeBoundary before linkGeneration 2026-10-05 22:24:32 -04:00
Lap Tran bafec48ceb no-mistakes(review): home: narrow herdr cleanup and respect DRY_RUN via run 2026-10-05 22:14:44 -04:00
Lap Tran d5eb744fb4 no-mistakes(review): Purge leaked herdr runtime files from dotfiles repo on activation 2026-10-05 22:00:15 -04:00
Lap Tran 6e1ee6ef67 fix(home): stop herdr writing runtime state into the repo
herdr resolves its config directory as ~/.config/herdr and writes all of its
runtime state beside config.toml: herdr.sock, herdr-client.sock,
herdr-server.log, .plugins.lock, session.json and session-snapshots/. It offers
no option to relocate that directory, so linking the whole directory into this
repo made ~/.config/herdr resolve into the tracked tree and left every clone
permanently dirty with herdr's live sockets and snapshots.

Link only config.toml and let ~/.config/herdr be a real directory, so herdr's
state lands in $HOME instead of the working tree.

home-manager links a file by resolving the existing directory symlink, which
would move this repo's own tracked config.toml to config.toml.backup and leave
a symlink inside the tree. Add a one-time activation step that drops the stale
symlink before home-manager checks link targets; it is a no-op once
~/.config/herdr is a real directory.
2026-10-05 21:25:29 -04:00
Lap Tran 6e0bc81e85 chore(codex): route Codex to OpenCode Go without clobbering ChatGPT auth
The ChatGPT desktop app owns and rewrites ~/.codex/config.toml, so symlinking
that file into the repo leaked the app's own config (model, [desktop],
[plugins], [mcp_servers]) into git and got clobbered on launch.

- Stop symlinking ~/.codex/config.toml; keep it app-owned and merge the repo
  fragment home/.codex/config.toml into it on every activation
  (home.activation.codexOpenCodeGo + home/bin/codex-opencode-go-sync).
- Replace requires_openai_auth with a command-backed token
  (~/.local/bin/opencode-go-token reads the key from the opencode store), so
  ~/.codex/auth.json stays in ChatGPT mode and ChatGPT sign-in coexists with Go.
- Add the Codex 0.160+ profile file home/.codex/luna.config.toml (gpt-6-luna).
- Declare the chatgpt + codex casks; document the decision in AGENTS.md.

Verified: default deepseek-v4.1-flash and --profile luna both return over the Go
Responses API while auth.json remains in chatgpt mode.
2026-10-04 15:07:33 -04:00
hermes 1f13c6eb1a Merge pull request 'chore(pi): select Pi as no-mistakes gate agent and DeepSeek V4.1 Flash default' (#2) from fm/dotfiles-pi-defaults into main 2026-09-30 21:59:42 -04:00
18 changed files with 466 additions and 31 deletions

No files matched your search

+2
View File
@@ -6,5 +6,7 @@ home/.config/beets/state.pickle
home/.config/herdr/.plugins.lock
home/.config/herdr/*.log
home/.config/herdr/*.sock
home/.config/herdr/herdr.sock.agent
home/.config/herdr/session.json
home/.config/herdr/release-notes.json
home/.config/herdr/session-snapshots/
+4 -1
View File
@@ -6,9 +6,12 @@ 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=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.
- herdr stores runtime state beside its config, so `~/.config/herdr` stays a real directory and only `config.toml` is symlinked; `home.activation.herdrConfigDir` migrates the old whole-directory symlink and clears leaked artifacts. Do not symlink the whole directory - rationale and artifact list are in `home.nix`.
- Codex runs on the OpenCode Go subscription. The ChatGPT app owns and rewrites the live `~/.codex/config.toml`, so it is NOT symlinked; `home.activation.codexOpenCodeGo` merges the repo fragment `home/.codex/config.toml` into it on every rebuild, and the app's own sections (`[desktop]`, `[plugins]`, `[mcp_servers]`, ...) survive. Auth is command-backed via `~/.local/bin/opencode-go-token` (prints the key from the opencode store), so `~/.codex/auth.json` stays in ChatGPT mode and ChatGPT sign-in coexists with Go. Only Go models that speak the Responses API work (`deepseek-v4.1-flash`, `gpt-6-luna`, `gpt-5.6-luna`, `grok-4.7/4.6`); GLM/Kimi/MiMo/LongCat are chat-completions-only and need a proxy. Desktop Codex is now the `chatgpt` cask - do not use the deprecated `codex-app` cask.
- 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. Crew routing is `home/.config/firstmate/crew-dispatch.json` (symlinked in): per the captain's order 2026-10-21, every coding crewmate and scout uses `opencode` + `opencode-go/deepseek-v4.1-flash` through the OpenCode CLI. The free `deepseek-v4.1-flash-free` order of 2026-10-20 resumes when that lane resets. The validation pipeline stays on Pi with `opencode-go/deepseek-v4.1-flash` steps and the `opencode-go/glm-5.3-flash` reviewer. Avoid the `muse-spark-*-contributor` models, which train on prompts, and the `exo-free`, `mimo-*-free`, and `nemotron-*-free` models, whose data may be used to improve the model. `cat-jam-free` retains for 30 days. Crews inherit the primary's OpenCode login through the spawn-owned symlink (the isolated worker data root links the primary `<XDG_DATA_HOME>/opencode/auth.json`; no `~/.pi/agent/auth.json` reliance). Launch with shell alias `fm` (`cd` + OpenCode 2 via `~/.local/bin/oc2`); the primary stays OpenCode 2, only crews run on the opencode harness. 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.
- OpenSuperWhisper is installed by the `opensuperwhisper` cask, and `home.activation.openSuperWhisper` downloads its Whisper model (`ggml-large-v3-turbo.bin` under the app's Application Support directory, never the Nix store) and seeds the model selection only when it is missing or dangling. All other app settings (trigger, language, paste behavior) belong to the app and must not be rewritten by a rebuild, so `modifierOnlyHotkey = rightOption` on this machine stays the effective trigger. Microphone/Accessibility/Input Monitoring grants stay manual because macOS TCC cannot be declarative; do not kill a running app to apply defaults. The model is local-only.
## Maintaining this file
+5
View File
@@ -60,8 +60,13 @@
"treehouse"
];
casks = [
# Codex desktop home: the standalone Codex.app was folded into the ChatGPT
# app (2026-07); the deprecated `codex-app` cask must not be used.
"chatgpt"
"codex" # Codex CLI; shares ~/.codex/config.toml with the desktop app
"docker-desktop"
"grok-build"
"opensuperwhisper" # local Whisper dictation; model seed in home.nix
"puremac"
"utm"
"wezterm"
+173 -10
View File
@@ -81,11 +81,52 @@ in
source = config.lib.file.mkOutOfStoreSymlink "${dotfiles}/home/.config/nvim";
force = true;
};
home.file.".config/herdr" = {
source = config.lib.file.mkOutOfStoreSymlink "${dotfiles}/home/.config/herdr";
# herdr treats ~/.config/herdr as both its config directory and its state
# directory: it writes its sockets, logs, lock files and session state beside
# config.toml, and it offers no option to relocate them. Keep that directory a
# real directory and link only the config file - a whole-directory symlink into
# this repo makes every running herdr server dirty the working tree. The exact
# artifact list is the cleanup below, so it cannot drift from the code.
home.file.".config/herdr/config.toml" = {
source = config.lib.file.mkOutOfStoreSymlink "${dotfiles}/home/.config/herdr/config.toml";
force = true;
};
# Migration from the previous whole-directory symlink at ~/.config/herdr.
# home-manager links ~/.config/herdr/config.toml by following the existing
# ~/.config/herdr symlink, which would move this repo's own tracked config.toml
# to config.toml.backup and leave a symlink inside the tree. Drop the stale
# symlink in the write phase, after writeBoundary and before linkGeneration:
# checkLinkTargets already skips this target because the file is force = true,
# and linkGeneration then creates the real directory. A real directory (the
# post-migration state) is left untouched, so this is idempotent. The old
# whole-directory symlink also left herdr runtime state (sockets, logs,
# session.json, session-snapshots/, ...) in this repo; that state now resolves
# to the real directory, so remove the known runtime artifacts by name.
# config.toml and any other repo content in that directory are never touched.
# Removing a live socket or log only drops the path - the running herdr server
# keeps its own file handles.
home.activation.herdrConfigDir = lib.hm.dag.entryBetween [ "linkGeneration" ] [ "writeBoundary" ] ''
set -euo pipefail
if [ -L "$HOME/.config/herdr" ]; then
run ${pkgs.coreutils}/bin/rm "$HOME/.config/herdr"
fi
repoHerdr="${dotfiles}/home/.config/herdr"
if [ -d "$repoHerdr" ]; then
run ${pkgs.coreutils}/bin/rm -rf \
"$repoHerdr/herdr.sock" \
"$repoHerdr/herdr-client.sock" \
"$repoHerdr/herdr.sock.agent" \
"$repoHerdr/herdr-server.log" \
"$repoHerdr/herdr-client.log" \
"$repoHerdr/.plugins.lock" \
"$repoHerdr/session.json" \
"$repoHerdr/release-notes.json" \
"$repoHerdr/session-snapshots" \
"$repoHerdr/sessions"
fi
'';
# Beets music library manager - managed by nixpkgs package, config symlinked below.
home.file.".config/beets" = {
source = config.lib.file.mkOutOfStoreSymlink "${dotfiles}/home/.config/beets";
@@ -107,6 +148,21 @@ in
source = config.lib.file.mkOutOfStoreSymlink "${dotfiles}/home/AGENTS.md";
force = true;
};
# Codex provider routing -> OpenCode Go. ~/.codex/config.toml is deliberately
# NOT symlinked: the ChatGPT desktop app owns and rewrites that file. The repo
# fragment home/.codex/config.toml is merged into it by
# home.activation.codexOpenCodeGo instead. The provider's command-backed auth
# runs this helper, which reads the key from the opencode store.
home.file.".local/bin/opencode-go-token" = {
source = config.lib.file.mkOutOfStoreSymlink "${dotfiles}/home/bin/opencode-go-token";
force = true;
};
# Codex 0.160+ profiles live in $CODEX_HOME/<name>.config.toml. The app does not
# touch these, so they can be symlinked normally.
home.file.".codex/luna.config.toml" = {
source = config.lib.file.mkOutOfStoreSymlink "${dotfiles}/home/.codex/luna.config.toml";
force = true;
};
home.file.".config/opencode/AGENTS.md" = {
source = config.lib.file.mkOutOfStoreSymlink "${dotfiles}/home/AGENTS.md";
force = true;
@@ -246,21 +302,35 @@ in
ln -sfn "${dotfiles}/home/bin/sync-music" "$HOME/.local/bin/sync-music"
'';
# Codex (desktop app + CLI) -> OpenCode Go. The ChatGPT app owns and rewrites
# ~/.codex/config.toml, so it must not be a symlink into the repo. Merge the
# repo fragment into the live file on every activation instead; the app's own
# sections survive. See home/bin/codex-opencode-go-sync.
home.activation.codexOpenCodeGo = lib.hm.dag.entryAfter [ "writeBoundary" ] ''
set -euo pipefail
mkdir -p "$HOME/.codex"
${pkgs.python3.withPackages (ps: [ ps.tomlkit ])}/bin/python3 \
"${dotfiles}/home/bin/codex-opencode-go-sync" \
"${dotfiles}/home/.codex/config.toml" \
"$HOME/.codex/config.toml"
'';
# OpenCode 2 is not on Homebrew (beta). Install via Homebrew's npm, never
# Nix's npm (EACCES on the store). Skip when already present so a rebuild
# does not pull a new beta under a live TUI.
# does not pull a new beta under a live TUI. Activation blocks are inlined
# into one flat script, so never `exit 0` here: that would skip every later
# block (securityAuditSkill, setupLaunchAgents, syncMusic).
home.activation.opencode2 = lib.hm.dag.entryAfter [ "writeBoundary" ] ''
set -euo pipefail
npm=/opt/homebrew/bin/npm
bin=/opt/homebrew/bin/opencode2
if [ -x "$bin" ]; then
exit 0
if [ ! -x "$bin" ]; then
if [ ! -x "$npm" ]; then
echo "opencode2: /opt/homebrew/bin/npm missing (declare node in homebrew.brews)" >&2
exit 1
fi
"$npm" install -g --allow-scripts=@opencode-ai/cli @opencode-ai/cli@beta
fi
if [ ! -x "$npm" ]; then
echo "opencode2: /opt/homebrew/bin/npm missing (declare node in homebrew.brews)" >&2
exit 1
fi
"$npm" install -g --allow-scripts=@opencode-ai/cli @opencode-ai/cli@beta
'';
# backpass (kunchenguid/backpass) - gradient descent for agent memory: reads
@@ -320,7 +390,100 @@ in
mkdir -p "$(dirname "$cfg")"
printf 'agent: [pi]\n' > "$cfg"
fi
# Ensure the captain's model split (idempotent and additive, so hand edits survive).
# Implementer, pipeline default, and pipeline fixer run deepseek-v4.1-flash;
# the review role runs glm-5.3-flash, so review never uses the implementing model.
if ! grep -qE '^[[:space:]]*agent_config:' "$cfg"; then
printf 'agent_config:\n pi:\n model: opencode-go/deepseek-v4.1-flash\n' >> "$cfg"
fi
if ! grep -qE '^[[:space:]]*review_agents:' "$cfg"; then
printf 'review_agents:\n reviewer:\n agent: pi\n model: opencode-go/glm-5.3-flash\n' >> "$cfg"
fi
# Ensure daemon running (launchd on macOS)
"$bin" daemon restart >/dev/null 2>&1 || "$bin" daemon start >/dev/null 2>&1 || true
'';
# cloudflare/security-audit - vulnerability-hunting skill for the coding agents.
# Installed by the upstream Skills CLI through Homebrew's npx, because the skill
# is a multi-file bundle and an upstream refresh must stay byte-identical.
# Scope: the CLI's "universal" target is ~/.agents/skills, which Codex, Pi, and
# OpenCode read as a user-level skill directory; Claude Code reads
# ~/.claude/skills, so the CLI also links the skill there. Grok Build is out of
# scope for this install: its skill directory is ~/.grok/skills, and the CLI
# only populates it when `grok` is named in --agent. Never target
# ~/.config/opencode/skills: home-manager owns that path with force = true and
# mkOutOfStoreSymlink into the mutable dotfiles checkout, so a rebuild would
# clobber the CLI's link and CLI writes would land in the git checkout. Skip
# when installed, like opencode2/backpass, so a rebuild never pulls a new skill
# version mid-session. The skill's own README still requires an OS-enforced
# sandbox before it may run target-controlled builds, tests, browsers, or
# fuzzers; this machine has none, so those leads stay `needs_validation`.
# Install and refresh commands, plus the sandbox note, are in readme.md.
home.activation.securityAuditSkill = lib.hm.dag.entryAfter [ "writeBoundary" ] ''
set -euo pipefail
# Activation PATH lacks /opt/homebrew/bin, so npx's `#!/usr/bin/env node`
# shebang fails. It also lacks /usr/bin, so the Skills CLI cannot spawn
# /usr/bin/git and the clone fails with "spawn git ENOENT". Prepend both -
# replacing PATH breaks the rest of the HM activation (nix-env, gettext).
export PATH="/opt/homebrew/bin:/usr/bin:$PATH"
npx=/opt/homebrew/bin/npx
# Canonical copy plus the Claude Code link: rerun when either is missing so a
# half-removed install heals, then skip while both exist. No `exit 0` here:
# activation blocks are inlined into one flat script, and later blocks must
# still run.
if [ ! -f "$HOME/.agents/skills/security-audit/SKILL.md" ] \
|| [ ! -e "$HOME/.claude/skills/security-audit" ]; then
if [ ! -x "$npx" ]; then
echo "securityAuditSkill: /opt/homebrew/bin/npx missing (declare node in homebrew.brews)" >&2
exit 1
fi
# A rebuild must not fail when GitHub or npm is unreachable: the skill is an
# enhancement, so warn and keep the rest of the switch going.
if ! "$npx" --yes skills add https://github.com/cloudflare/security-audit-skill \
--skill security-audit --global \
--agent claude-code codex pi opencode --yes; then
echo "securityAuditSkill: WARNING: skill install failed (network or Skills CLI unavailable); rebuild continues." >&2
echo "securityAuditSkill: rerun ./rebuild.sh or install manually with the command in readme.md." >&2
fi
fi
'';
# OpenSuperWhisper - local voice-first prompting (cask in configuration.nix).
# The app reads its model from its own Application Support directory, so the
# 1.6 GB Whisper model is downloaded here once and kept outside the Nix store.
# A failed download must not fail the switch: warn, drop the partial file, and
# let the app's Settings download it later. Only a missing or unusable model
# selection is seeded; every other setting belongs to the app and survives the
# rebuild. Never write hasCompletedOnboarding - onboarding must still run so the
# captain can grant Microphone/Accessibility (macOS TCC grants are manual by
# design). A running app picks up new defaults on its next launch; do not kill
# it here.
home.activation.openSuperWhisper = lib.hm.dag.entryAfter [ "writeBoundary" ] ''
set -euo pipefail
supportDir="$HOME/Library/Application Support/ru.starmel.OpenSuperWhisper"
modelDir="$supportDir/whisper-models"
modelPath="$modelDir/ggml-large-v3-turbo.bin"
modelUrl="https://huggingface.co/ggerganov/whisper.cpp/resolve/main/ggml-large-v3-turbo.bin?download=true"
modelSha="1fc70f774d38eb169993ac391eea357ef47c88757ef72ee5943879b7e8e2bc69"
curl="${pkgs.curl}/bin/curl"
mkdir -p "$modelDir"
if [ ! -f "$modelPath" ]; then
tmp="$(${pkgs.coreutils}/bin/mktemp "$modelDir/.ggml-large-v3-turbo.XXXXXX")"
if "$curl" -fL --retry 3 --connect-timeout 30 -o "$tmp" "$modelUrl" \
&& printf '%s %s\n' "$modelSha" "$tmp" | ${pkgs.coreutils}/bin/sha256sum -c - >/dev/null 2>&1; then
mv "$tmp" "$modelPath"
else
echo "openSuperWhisper: WARNING: could not download or verify the Whisper model." >&2
echo "openSuperWhisper: the app still works; download \"Whisper V3 Large\" in Settings later." >&2
${pkgs.coreutils}/bin/rm -f "$tmp"
fi
fi
defaults=/usr/bin/defaults
selectedModel="$("$defaults" read ru.starmel.OpenSuperWhisper selectedWhisperModelPath 2>/dev/null || true)"
if [ -f "$modelPath" ] && { [ -z "$selectedModel" ] || [ ! -f "$selectedModel" ]; }; then
"$defaults" write ru.starmel.OpenSuperWhisper selectedWhisperModelPath -string "$modelPath"
fi
'';
}
+14
View File
@@ -3,5 +3,19 @@
"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"
},
"hooks": {
"SessionStart": [
{
"matcher": "",
"hooks": [
{
"type": "command",
"command": "lavish-axi",
"timeout": 10
}
]
}
]
}
}
+27
View File
@@ -0,0 +1,27 @@
# Codex -> OpenCode Go subscription (fragment, NOT the live config).
#
# The ChatGPT desktop app owns and rewrites ~/.codex/config.toml, so home-manager
# must not symlink this file into place. Instead
# home.activation.codexOpenCodeGo merges the keys below into the live file on
# every rebuild (home/bin/codex-opencode-go-sync). The app's own sections
# ([desktop], [plugins], [mcp_servers], [marketplaces], ...) are preserved.
#
# No secret lives here. Auth is command-backed: the provider runs
# ~/.local/bin/opencode-go-token, which prints the key from the opencode auth
# store. That leaves ~/.codex/auth.json in ChatGPT mode, so the ChatGPT app and
# the Go subscription coexist in the same Codex install.
#
# Only models Go serves over the Responses API work here. Verified 2026-10-03:
# deepseek-v4.1-flash, gpt-6-luna, gpt-5.6-luna, grok-4.7, grok-4.6.
model = "deepseek-v4.1-flash"
model_provider = "opencode-go"
# Switch models with `codex --profile luna` (settings in luna.config.toml; Codex
# 0.160+ no longer accepts a [profiles.*] table here).
[model_providers.opencode-go]
name = "OpenCode Go"
base_url = "https://opencode.ai/zen/go/v1"
wire_api = "responses" # Codex only supports the Responses API
[model_providers.opencode-go.auth]
command = "/Users/laptran/.local/bin/opencode-go-token"
+7
View File
@@ -0,0 +1,7 @@
# Codex profile: gpt-6-luna on OpenCode Go.
#
# Codex 0.160+ reads profiles from $CODEX_HOME/<name>.config.toml, so this file
# is symlinked in as ~/.codex/luna.config.toml. Select it with
# `codex --profile luna` (or `codex --profile luna exec ...`).
model = "gpt-6-luna"
model_provider = "opencode-go"
+15 -13
View File
@@ -1,20 +1,22 @@
{
"rules": [
{
"when": "Well-specified implementation with clear acceptance criteria: pure functions, tests, repositories, adapters, or external-fetch integration.",
"use": [{ "harness": "opencode", "model": "opencode-go/deepseek-v4.1-flash", "provider": "opencode-go" }],
"why": "DeepSeek V4.1 Flash is the default OpenCode Go implementation worker; it is fast, economical, and strong on agentic coding tasks."
},
{
"when": "UI work where supplied screenshots or other image context materially affect the implementation or verification.",
"use": [{ "harness": "opencode", "model": "opencode-go/glm-5.3-flash", "provider": "opencode-go" }],
"why": "GLM-5.3-Flash is the Go worker with image input; use it when visual context matters."
},
{
"when": "Ambiguous investigation, difficult debugging, architectural tradeoffs, or broad changes with high uncertainty or blast radius.",
"use": [{ "harness": "opencode", "model": "opencode-go/gpt-6-luna", "provider": "opencode-go" }],
"why": "Reserve GPT-6 Luna for work that benefits from stronger reasoning than the fast implementation tier."
"use": [
{
"harness": "opencode",
"model": "opencode-go/deepseek-v4.1-flash",
"provider": "opencode-go"
}
],
"why": "Captain's order 2026-10-21: paid Go for every crewmate and scout after the free lane hit 'Free usage exceeded' with a 10.5 hour retry, which ended five sessions in forty minutes. The free deepseek-v4.1-flash-free order of 2026-10-20 resumes when that lane resets; paid Go had 5 percent of its monthly window left, projected empty 2026-10-22T05:43Z."
}
],
"default": [{ "harness": "opencode", "model": "opencode-go/deepseek-v4.1-flash", "provider": "opencode-go" }]
"default": [
{
"harness": "opencode",
"model": "opencode-go/deepseek-v4.1-flash",
"provider": "opencode-go"
}
]
}
+1 -1
View File
@@ -1,7 +1,7 @@
{
"diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" },
"gitsigns.nvim": { "branch": "main", "commit": "31d6fb2d618bca1482b9f274751ead5f03461408" },
"lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" },
"lazy.nvim": { "branch": "main", "commit": "85c7ff3711b730b4030d03144f6db6375044ae82" },
"neogit": { "branch": "master", "commit": "f8674ec894315c02449b61c9de9a116c5aafeb90" },
"oil.nvim": { "branch": "master", "commit": "b73018b75affd13fa38e2fc94ef753b465f770d7" },
"plenary.nvim": { "branch": "master", "commit": "74b06c6c75e4eeb3108ec01852001636d85a932b" },
+40 -1
View File
@@ -1,6 +1,6 @@
{
"$schema": "https://opencode.ai/config.json",
"model": "opencode-go/gpt-6-luna",
"model": "opencode-go/deepseek-v4.1-flash",
"instructions": ["AGENTS.md"],
"provider": {
"omlx": {
@@ -22,6 +22,31 @@
}
}
},
"opencode": {
"models": {
"muse-spark-1.3-contributor-free": {
"limit": {
"context": 256000,
"input": 256000,
"output": 128000
}
},
"muse-spark-1.3": {
"limit": {
"context": 256000,
"input": 256000,
"output": 128000
}
},
"muse-spark-1.2": {
"limit": {
"context": 256000,
"input": 256000,
"output": 128000
}
}
}
},
"opencode-go": {
"models": {
"gpt-6-luna": {
@@ -37,6 +62,20 @@
"input": 256000,
"output": 128000
}
},
"muse-spark-1.3-contributor": {
"limit": {
"context": 256000,
"input": 256000,
"output": 128000
}
},
"muse-spark-1.2-contributor": {
"limit": {
"context": 256000,
"input": 256000,
"output": 128000
}
}
}
}
+1 -1
View File
@@ -1,6 +1,6 @@
{
"$schema": "https://opencode.ai/config.json",
"model": "opencode-go/gpt-6-luna",
"model": "opencode-go/deepseek-v4.1-flash",
"autoupdate": false,
"providers": {
"omlx": {
+32
View File
@@ -38,6 +38,38 @@
"contextWindow": 272000
}
}
},
"opencode-go": {
"modelOverrides": {
"deepseek-v4-flash": {
"contextWindow": 256000
},
"deepseek-v4-flash-vision-exp": {
"contextWindow": 256000
},
"deepseek-v4-pro": {
"contextWindow": 256000
},
"deepseek-v4.1-flash": {
"contextWindow": 256000
}
}
},
"opencode": {
"modelOverrides": {
"deepseek-v4-flash": {
"contextWindow": 256000
},
"deepseek-v4-flash-vision-exp": {
"contextWindow": 256000
},
"deepseek-v4-pro": {
"contextWindow": 256000
},
"deepseek-v4.1-flash": {
"contextWindow": 256000
}
}
}
}
}
+3 -3
View File
@@ -1,5 +1,5 @@
{
"lastChangelogVersion": "0.87.1",
"lastChangelogVersion": "1.0.4",
"theme": "rose-pine-moon",
"defaultProvider": "opencode-go",
"defaultModel": "deepseek-v4.1-flash",
@@ -17,8 +17,8 @@
},
"packages": [
"npm:pi-context",
"npm:pi-web-access@0.14.0",
"npm:@ryan_nookpi/pi-extension-codex-fast-mode@0.2.6",
"npm:pi-web-access@0.36.0",
"npm:@ryan_nookpi/pi-extension-codex-fast-mode@0.2.8",
"git:github.com/algal/pi-openai-server-compaction@c6d593087709e9481223dc6c6c2269b371b5e055",
"../../.automaton/plugins/pi-read-tweet"
],
+16
View File
@@ -12,3 +12,19 @@
- 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.
## Response style (ASD-STE100, evidence-backed 2026-10-06)
Source: 10 randomly sampled interactive transcripts from the past week (seed 20261006; population was 11: 8 Codex sessions Oct 3-4, 3 opencode backpass sessions Oct 5). The sampled assistant texts repeatedly violated the same STE rules at the exact points where the conversation stalled or confused. Follow these rules in every assistant response:
- Short sentences: max 20 words per instruction, 25 per explanation (STE 5.1/6.3). Observed worst case was a 57-word status sentence; split it instead.
- One instruction per sentence; use a vertical list for multi-step directions (STE 5.2/4.3).
- Instructions in the imperative; status in simple present or past. Report results, do not narrate intentions ("Let me X" appeared ~20 times in one session) (STE 5.3/3.2).
- Active voice with a named agent. "Commands are being rejected" hid who rejects them (STE 3.6).
- Condition before command: "If X, do Y" (STE 5.4). A buried proxy precondition sent the user to a dead URL first.
- One name per thing for the whole response (STE 1.11/9.4). Observed rotation: proxy/server/relay and page/app/calculator for single objects.
- Plain verbs, no phrasal verbs or jargon verbs: fall back, fill in, queued, wiring, smoke-test (STE 9.3).
- No -ing forms as verbs or subjects, no contractions, no dropped objects ("Confirming:" with no object; "isn't running") (STE 3.5/4.2).
- Only can/will/must as modals. The would/could/should sentences were exactly the untested claims that later confused (STE 3.2).
- Max three words per noun stack; define thread slang on first use (STE 2.1/1.10).
- No semicolons, including inside JSON rationale strings; write two sentences (STE 8.1).
- American spelling ("colour-coded" slipped through) and keep the articles a/the (STE 1.14/4.5).
+66
View File
@@ -0,0 +1,66 @@
#!/usr/bin/env python3
"""Reconcile the OpenCode Go fragment into Codex's live config.
Codex (the ChatGPT desktop app and the CLI) both read ~/.codex/config.toml, and
the ChatGPT app owns and rewrites that file. So home-manager must not symlink it.
Instead this script merges the repo fragment (argv[1]) into the live file
(argv[2]) on every activation:
* only the keys the fragment defines are forced (fragment wins),
* the whole model_providers.opencode-go table is replaced, so stale keys such
as a previous `requires_openai_auth = true` are dropped,
* everything the app wrote itself ([desktop], [plugins], [mcp_servers],
[marketplaces], ...) is preserved.
Run with a Python that has tomlkit (home.activation.codexOpenCodeGo does).
"""
import copy
import os
import sys
import tomlkit
def _table(doc, key):
if key not in doc:
doc[key] = tomlkit.table()
return doc[key]
def main() -> int:
fragment_path, live_path = sys.argv[1], sys.argv[2]
with open(fragment_path) as fh:
fragment = tomlkit.parse(fh.read())
if os.path.exists(live_path):
with open(live_path) as fh:
live = tomlkit.parse(fh.read())
else:
live = tomlkit.document()
# Root keys the fragment owns.
for key in ("model", "model_provider"):
if key in fragment:
live[key] = fragment[key]
# Replace the fragment provider tables wholesale (drops stale keys).
incoming = fragment.get("model_providers") or {}
target = _table(live, "model_providers")
for name, table in incoming.items():
target[name] = copy.deepcopy(table)
# Codex 0.160+ rejects the legacy [profiles.*] table; profiles now live in
# $CODEX_HOME/<name>.config.toml. Drop one if an older config left it behind.
if "profiles" in live:
del live["profiles"]
with open(live_path, "w") as fh:
fh.write(tomlkit.dumps(live))
return 0
if __name__ == "__main__":
raise SystemExit(main())
+17
View File
@@ -0,0 +1,17 @@
#!/bin/sh
# Print the OpenCode Go API key on stdout.
#
# Codex uses this as its command-backed provider auth
# ([model_providers.opencode-go.auth].command). That keeps ~/.codex/auth.json
# untouched in ChatGPT mode, so the ChatGPT desktop app and the OpenCode Go
# subscription coexist in the same Codex install. The key is never committed; it
# is read live from the opencode auth store (the same source oc2 and Hermes use).
set -eu
auth="${XDG_DATA_HOME:-$HOME/.local/share}/opencode/auth.json"
py="$(command -v python3 || true)"
if [ -z "$py" ]; then
py=/usr/bin/python3
fi
exec "$py" -c 'import json, sys; print(json.load(open(sys.argv[1]))["opencode-go"]["key"])' "$auth"
+40
View File
@@ -14,3 +14,43 @@ The firstmate crew dispatch + Gitea PR helper are wired by `darwin-rebuild`, but
git remote set-url origin http://unraid.local:3003/transnet/investor-flow
Verify: `fm` launches OpenCode 2 as the first mate (isolated `~/.config/opencode2`); `oc2 --version` prints an OpenCode 2 version; `pi --list-models mimo` shows `opencode-go/mimo-v2.5-pro`; `tea pulls list --repo transnet/investor-flow` works.
## security-audit skill (agent security reviews)
`home.activation.securityAuditSkill` installs Cloudflare's `security-audit` skill from `https://github.com/cloudflare/security-audit-skill` so the coding agents can run a structured vulnerability audit. The exact command:
```bash
/opt/homebrew/bin/npx --yes skills add https://github.com/cloudflare/security-audit-skill \
--skill security-audit --global \
--agent claude-code codex pi opencode --yes
```
The install needs Homebrew's `node`, which `configuration.nix` already declares, plus the system Git at `/usr/bin/git` for the clone. Renew or update the skill by hand with:
```bash
/opt/homebrew/bin/npx --yes skills update security-audit --global --yes
```
Agent scope: the Skills CLI installs the bundle once under `~/.agents/skills/security-audit`, the universal user-level directory that Codex, Pi, and OpenCode read, and it links that directory into `~/.claude/skills` for Claude Code. Grok Build is out of scope for this install: its skill directory is `~/.grok/skills`, and the CLI only populates it when `grok` is named in `--agent`. The install leaves `~/.config/opencode/skills` alone because home-manager owns that path with `force = true` and `mkOutOfStoreSymlink` into the mutable dotfiles checkout: a rebuild would clobber the CLI's link, and CLI writes would land in the git checkout. That is why the install uses the shared directory instead.
The activation is idempotent and non-interactive: it skips the install when both the canonical copy and the Claude Code link exist, and a failed download only warns so the rebuild still completes. Trigger it in an agent with "security audit this codebase".
Sandbox limitation: the skill's README requires an OS-enforced sandbox (no external network, sanitized environment, resource limits, scratch-only writes) before it may run target-controlled builds, tests, browser automation, emulators, fuzzers, or fixtures. This Nix setup installs the skill only and creates no sandbox. Without one, the workflow keeps such leads as `needs_validation` rather than executing target code.
## OpenSuperWhisper (local voice input)
Hold a shortcut, speak, release, and the transcript pastes into the focused app. Everything runs on the Mac: no audio or transcript leaves the machine.
First run:
1. The `opensuperwhisper` cask is installed and `home.activation.openSuperWhisper` pre-downloads the model to `~/Library/Application Support/ru.starmel.OpenSuperWhisper/whisper-models/ggml-large-v3-turbo.bin`. It selects "Whisper V3 Large" only when no model is selected or the selected file is gone, so a model you pick in the app stays selected.
2. Open the app. Onboarding should already show "Whisper V3 Large" as downloaded.
3. Grant **Microphone**, **Accessibility**, and **Input Monitoring** when macOS asks. Input Monitoring is needed because the trigger is Right Option, a single modifier key.
4. Keep the Right Option trigger (or change it in the app's settings). Hold it, speak, release. Auto-paste puts the text into the focused terminal or editor.
Notes:
- A fresh install starts with Option plus backtick instead of Right Option, and that combination needs no Input Monitoring. The activation never writes the trigger, the language, or the paste settings, so whatever you choose in the app survives the next rebuild.
- The model is local-only (about 1.6 GB). If the download failed during the rebuild, rerun `./rebuild.sh` or download the large Turbo V3 model ("Turbo V3 large" in the app's Settings) by hand.
- Voice is for prompts and prose. Type URLs, file paths, and exact identifiers yourself.
- The first-run steps above are manual on purpose: macOS TCC permissions cannot be granted declaratively.
+3 -1
View File
@@ -39,11 +39,14 @@ managed=(
"$HOME/.claude/settings.json"
"$HOME/.claude/CLAUDE.md"
"$HOME/.codex/AGENTS.md"
"$HOME/.codex/luna.config.toml"
"$HOME/.config/herdr/config.toml"
"$HOME/.config/opencode/AGENTS.md"
"$HOME/.config/opencode/opencode.json"
"$HOME/.config/opencode2/opencode.json"
"$HOME/.config/opencode2/AGENTS.md"
"$HOME/.local/bin/oc2"
"$HOME/.local/bin/opencode-go-token"
"$HOME/.pi/agent/settings.json"
"$HOME/.pi/agent/models.json"
"$HOME/.pi/agent/AGENTS.md"
@@ -60,7 +63,6 @@ done
for path in \
"$HOME/.config/wezterm" \
"$HOME/.config/nvim" \
"$HOME/.config/herdr" \
"$HOME/.config/opencode/skills" \
"$HOME/.pi/agent/themes" \
"$HOME/.pi/agent/extensions/calm"