Skip to content

Add Pi Launcher and default Claude to Opus - #44

Closed
mehulbhagwani wants to merge 27 commits into
kunchenguid:mainfrom
mehulbhagwani:fm/dotfiles-opus-pilauncher
Closed

mehulbhagwani wants to merge 27 commits into
kunchenguid:mainfrom
mehulbhagwani:fm/dotfiles-opus-pilauncher

Conversation

@mehulbhagwani

Copy link
Copy Markdown

Summary

  • Set Claude Code's default model to Opus.
  • Declare Kun's Pi Launcher cask in nix-darwin Homebrew so rebuilds install it.
  • Update the Pi setup documentation to match.

Validation

  • passed.
  • passed.
  • {
    "hooks": {
    "SessionStart": [
    {
    "matcher": "^(startup|resume|clear|compact|fork)$",
    "hooks": [
    {
    "type": "command",
    "command": "bash "$HOME/.claude/hooks/herdr-agent-state.sh" session",
    "timeout": 10
    }
    ]
    },
    {
    "matcher": "",
    "hooks": [
    {
    "type": "command",
    "command": "gh-axi",
    "timeout": 10
    }
    ]
    },
    {
    "matcher": "",
    "hooks": [
    {
    "type": "command",
    "command": "chrome-devtools-axi",
    "timeout": 10
    }
    ]
    },
    {
    "matcher": "",
    "hooks": [
    {
    "type": "command",
    "command": "lavish-axi",
    "timeout": 10
    }
    ]
    }
    ]
    },
    "statusLine": {
    "type": "command",
    "command": "bash "$HOME/dotfiles/home/.claude/statusline.sh"",
    "padding": 0
    },
    "enabledPlugins": {
    "productivity@knowledge-work-plugins": true,
    "product-management@knowledge-work-plugins": true,
    "marketing@knowledge-work-plugins": true,
    "sales@knowledge-work-plugins": true,
    "data@knowledge-work-plugins": true
    },
    "extraKnownMarketplaces": {
    "knowledge-work-plugins": {
    "source": {
    "source": "github",
    "repo": "anthropics/knowledge-work-plugins"
    }
    }
    },
    "model": "opus",
    "skipDangerousModePermissionPrompt": true,
    "theme": "dark-ansi",
    "agentPushNotifEnabled": true
    } and passed.
  • ok - zero coupling: no forbidden identifiers, attribution limited to license headers, state file untracked and unmanaged
    skip: installed @earendil-works/pi-coding-agent package not found for TypeScript check
    ok - static wiring: Home Manager auto-load intact, TypeScript typechecks, existing JS extension parses
    skip: installed @earendil-works/pi-coding-agent package not found
    skip: node or installed Pi package not found for rendering contract
    skip: node or installed Pi package not found for working-ship contract
    skip: node or installed Pi package not found for adapter degradation could not complete its real Pi smoke test because Pi 0.85.1 is not installed in this environment.

No live rebuild was run.

mehulbhagwani and others added 27 commits July 19, 2026 17:42
…uild

Adoption of the config onto an existing (non-fresh) Mac:

- flake.nix: user = mehul; add home-manager backupFileExtension so the first
  switch moves pre-existing dotfiles aside instead of aborting.
- configuration.nix: Homebrew cleanup "zap" -> "none" and nix-homebrew
  autoMigrate = true, so adopting the existing /opt/homebrew never uninstalls
  already-installed brews/casks. Declare herdr.
- home.nix: port existing PATH (~/.local/bin, ~/.npm-global/bin), nvm and brew
  shellenv into the managed zsh; keep wezterm/nvim/herdr edit-in-place symlinks;
  wire the shared-AGENTS.md trick for claude/codex/opencode.
- home/AGENTS.md: merge CARL integration block with the general guidelines
  (drop the lines that clashed with lazy/YAGNI mode and the dead OPINIONS/VOICE
  refs).
- rebuild.sh: call darwin-rebuild by absolute path (sudo's PATH excludes
  /run/current-system/sw/bin).
User explicitly confirmed Kun's aliases including cc = claude
--dangerously-skip-permissions.

- home.nix: restore Kun's zsh aliases; symlink ~/OPINIONS.md and ~/VOICE.md.
- home/AGENTS.md: restore the full guideline set and OPINIONS/VOICE references.
- add home/OPINIONS.md and home/VOICE.md stubs.
- OPINIONS.md: full operating contract, MBSA architecture, engineering /
  infra / product / design / business defaults, decision table, anti-patterns.
- VOICE.md: baseline voice + per-context registers (internal, public, client,
  feedback, bad news, legal), formatting, sign-offs, avoid-list, final check.
- normalized em dashes and curly quotes to plain per the files' own rules.
AGENTS.md: 5.1K -> 2.8K, 14 flat bullets -> 9 grouped, no rules lost.
- fix false header: mkOutOfStoreSymlink resolves through the store to
  this file, so edits are live; rebuild.sh is only for home.nix changes
- merge duplicate UI/engineering rules into one "broken windows" rule
- compress batched-E2E, research-before-asking, and grilling rules
- move heavy ops (browser E2E, swarms, long Markdown) to VERIFY.md
  behind a pointer
- carry over concise-replies, batched-E2E, research-first, ponytail,
  and grilling rules from wsl-dotfiles
- PAUL -> GSD on the codebase-brain pointer (PAUL retired 2026-07-28)
- add gh/curl URL quoting rule (zsh globs ? and &)

wezterm: font_size 15.0 -> 13.0
Restructure the global agent instructions into two parts:

1. My own standards, grouped rather than a flat list: absolute rules,
   how to make decisions, the quality bar, working practice, tooling.
   All nine original rules are preserved. The em dash rule now names the
   character as U+2014 so stating the rule does not violate it.
2. The Firstmate supervisor contract, incorporated whole, with headings
   nested one level and a scope note: it governs in full inside a
   Firstmate operational home, and elsewhere only its judgment carries
   over, not its dispatch and teardown machinery.

Also records the graphify and archify skills under tooling.

This file is symlinked as the global instructions for Claude, Codex and
OpenCode alike, so it applies to all three.
The quality bar only forced end-to-end work for bug fixes, where the
point is finding the real cause. Nothing required verifying that a
change actually works before it ships, so a green pipeline could stand
in for having seen the thing run.

Add that as its own rule, ahead of the bug-fix one: verify a user-facing
change the way a user reaches it, through the real running product. When
that is genuinely not possible, the escape is disclosure, naming what
was verified instead, never silence.
…ckages

Adds the HyperWhisper dictation app as a cask, and brings the brews and
casks lists in line with what is actually installed on the machine.

With onActivation.cleanup = "zap", anything left undeclared is removed on
the next rebuild, so tmux and baby-menu are declared here rather than
silently uninstalled.
… tool to Brave

The -axi command line tools are global npm packages standing on a node that
was only a transitive dependency of pi-coding-agent. Declaring node removes
that trapdoor. opencode had config wired in home.nix but no binary, and
direnv was missing entirely, so both are declared and the direnv shell hook
is added.

Brave is adopted as a managed cask because chrome-devtools-axi now drives it
instead of Chrome. chrome-devtools-mcp takes an --executablePath, so the
bridge passes Brave's binary and skips --channel, which only selects Chrome
distributions. That patch lives in a global npm package, so
scripts/chrome-devtools-axi-brave.sh re-applies it idempotently from
home-manager activation and survives npm update -g.
Installed on the machine but not in the config, so the zap cleanup would
have removed it on the next rebuild.
…tools

The -axi tools are global npm packages, so neither Nix nor Homebrew knows
they exist and a rebuild on a fresh Mac produced a machine without any of
them. scripts/npm-globals.sh installs the missing ones from home-manager
activation and leaves installed ones untouched, so it never downgrades or
churns a working machine. It runs before the Brave patch so a freshly
installed chrome-devtools-axi gets patched in the same pass.

OrbStack ships docker, compose, kubectl and orb inside its app bundle but
only wires ~/.orbstack/bin once the app has been launched, which left the
CLI unreachable. Putting the bundle directories on the session path gives a
working CLI with no launch and no click.

Also drops a stale AGENTS.md backup that was left untracked in the repo.
… hyperfine, watchexec, repomix

Checked each against the existing setup before adding: no global git
pager/diff.tool set, .zshrc is fully home-manager generated with no
separate legacy history config, node is a plain formula nothing expects
mise to manage, and no existing .sops.yaml. None collide.

git-lfs's filters are registered globally (git lfs install), which has no
effect on any existing repo until it opts in via .gitattributes.

atuin and delta are installed but not yet wired into the shell or git
config, since that changes daily-use behavior (history search, diff
rendering) rather than just adding a binary.
…, unstick pi-calm test

flake.nix had two real fixes sitting uncommitted: the user variable was
still the template placeholder "kunchen" instead of this machine's actual
"rac" (bootstrap.sh's own rewrite, just never committed), and
backupFileExtension was missing, which lets Homebrew-created files be moved
aside instead of aborting the whole activation.

ripgrep, fd, fzf and jq were declared in both home.packages and the brews
list. Homebrew is first on PATH here, so the Nix copies were shadowed dead
weight; dropped from home.packages.

tests/pi-calm.test.sh pins a proof version and skips its real TUI smoke
test unless the installed Pi matches, so the extension is graded against a
known-good render rather than a moving target. Homebrew's autoUpdate had
carried the installed Pi to 0.85.1 past the 0.82.0 pin, so the smoke test
was silently failing closed. Confirmed the TUI still renders correctly
against 0.85.1 (boat art, resize, /calm persistence, transcript scrubbing
all still pass) before bumping the pin, rather than assuming it.
- home/.claude/statusline.sh: directory, branch and status as in starship,
  then model, context left, 5-hour and 7-day limits left with reset times;
  no cost line (subscription plan)
- settings.json: point statusLine at the script; default model sonnet;
  agent push notifications on
- herdr config and the Pi herdr-agent-state extension used by the fleet
Keeps Kun Chen's copyright on the original work and the calm extension, and the
homebrew tap references that install his software; everything about whose setup
this is now names its owner.
…re the two lines conflict

main's unique files (OPINIONS.md, VOICE.md and the rest) come in unchanged; conflicting
configs (AGENTS.md, home.nix, flake.nix, configuration.nix, herdr and wezterm configs)
keep the branch's versions, which are what this machine currently runs.
Land the working branch on main (main merged in, branch kept on conflicts)
… settings

Point Homebrew at claude-code@latest so Opus 5.5 is not stuck on the stable cask, and uninstall unlisted packages instead of zapping their app data. Drop the Claude model pin so the picker can offer newer models. Keep Herdr symbol status indicators. Rewrite Pi package and skill paths with ~ and record the installed Pi version.
…teps

The locked Homebrew 6.0.1 rejected bottle post-install steps named run and remove. Current nix-homebrew carries Homebrew 7, which knows those steps.
hosts.nix names both machines. rebuild and bootstrap pick the host from the logged-in user or Computer Name instead of rewriting a single user line. The old mac label is gone so a switch cannot apply the wrong machine.
A rebuild clones the Kun skills this machine uses and links them for Claude and Pi, and updates the declared npm CLIs including gnhf and m87 instead of leaving old copies in place.
Home Manager activation has a minimal PATH, so kun-sync died with git not found after the brew step had already succeeded. Prepend the Homebrew prefix, and trust kunchenguid/tap before a switch so baby-menu is not refused.
…-Enter

Option-Enter is taken by the window zoom shortcut, so a press never reaches Pi as a follow-up and the draft is steered instead. Follow-up is now Control-Enter. HandBrake stays installed across rebuilds; baby-menu does not.
Control-Enter arrives as a plain Enter in this terminal, so the draft is sent instead of queued.
Pi still opened on gpt-5.5 by default, while Luna is the everyday
OpenAI model on this machine and the one every Pi worker is pinned to.
@github-actions github-actions Bot closed this Sep 27, 2026

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for taking an interest in these dotfiles.
This repo is public so you can read it, learn from it, and fork it freely, but it is Kun's personal setup and does not accept pull requests or feature requests.
If you want to adapt something, please fork the repo and make it yours.
If you found a bug, please open a bug report issue instead of sending a patch.
Pull requests are auto-closed here so the repo can stay personal and predictable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant