diff --git a/CLAUDE.md b/CLAUDE.md
index 0fc192af..af75dddb 100644
--- a/CLAUDE.md
+++ b/CLAUDE.md
@@ -84,6 +84,7 @@ The `.zshrc` file sources other configuration files in this order:
- Incremental, case-smart search with highlighting
- No swap/backup files
- Line numbers and always-visible status line
+- Uses Catppuccin mocha (dark) theme only; light mode switching not implemented
**Dark Mode Theme Switching** (home/.bin/toggle-btop-theme)
- Automatically switches btop theme based on macOS appearance
diff --git a/LaunchAgents/com.user.dark-notify.plist b/LaunchAgents/com.user.dark-notify.plist
index 23074806..dbf1873a 100644
--- a/LaunchAgents/com.user.dark-notify.plist
+++ b/LaunchAgents/com.user.dark-notify.plist
@@ -8,7 +8,7 @@
ProgramArguments
- /opt/homebrew/bin/dark-notify
+ __HOMEBREW_PREFIX__/bin/dark-notify
-c
__HOME__/.bin/toggle-btop-theme
diff --git a/bootstrap.sh b/bootstrap.sh
index 8ec31079..066f4241 100755
--- a/bootstrap.sh
+++ b/bootstrap.sh
@@ -1,4 +1,5 @@
#!/usr/bin/env bash
+set -euo pipefail
# ==============================================================================
# Bootstrap Script - Install Dotfiles
@@ -96,18 +97,28 @@ install_launch_agents() {
# Install dark-notify LaunchAgent (only if dark-notify is installed)
if command -v dark-notify >/dev/null 2>&1; then
local plist="com.user.dark-notify.plist"
+ local homebrew_prefix
+ if command -v brew >/dev/null 2>&1 && homebrew_prefix="$(brew --prefix 2>/dev/null)"; then
+ : # homebrew_prefix set by condition
+ elif [[ "$(uname -m)" == "arm64" ]]; then
+ homebrew_prefix="/opt/homebrew"
+ else
+ homebrew_prefix="/usr/local"
+ fi
local new_plist_content
- new_plist_content=$(sed "s|__HOME__|$HOME|g" "LaunchAgents/$plist")
+ new_plist_content=$(sed -e "s|__HOME__|$HOME|g" -e "s|__HOMEBREW_PREFIX__|$homebrew_prefix|g" "LaunchAgents/$plist")
local dest_plist="$launch_agents_dir/$plist"
# Only update and reload if plist content changed
local tmp_plist
tmp_plist=$(mktemp)
+ trap 'rm -f "$tmp_plist"' EXIT
echo "$new_plist_content" > "$tmp_plist"
if [[ ! -f "$dest_plist" ]] || ! cmp -s "$tmp_plist" "$dest_plist"; then
echo "Installing LaunchAgent: $plist"
mv "$tmp_plist" "$dest_plist"
+ trap - EXIT
# Reload the agent
launchctl bootout "gui/$(id -u)/com.user.dark-notify" 2>/dev/null || true
@@ -117,6 +128,7 @@ install_launch_agents() {
"$HOME/.bin/toggle-btop-theme"
else
rm -f "$tmp_plist"
+ trap - EXIT
fi
else
echo "Skipping dark-notify LaunchAgent (dark-notify not installed)"
@@ -205,7 +217,7 @@ sync_dotfiles() {
install_launch_agents
# Reload zsh configuration
- if [[ -n "$ZSH_VERSION" ]]; then
+ if [[ -n "${ZSH_VERSION:-}" ]]; then
source ~/.zshrc 2>/dev/null || echo "Restart your terminal or run: source ~/.zshrc"
fi
}
diff --git a/home/.claude/commands/im-lost.md b/home/.claude/commands/im-lost.md
index 5d8055b3..234c2bb0 100644
--- a/home/.claude/commands/im-lost.md
+++ b/home/.claude/commands/im-lost.md
@@ -20,13 +20,15 @@ git status --short
# Recent commits on this branch (vs main)
git log main..HEAD --oneline 2>/dev/null || git log -3 --oneline
-# Check for open PR on current branch
-gh pr view --json number,title,state,statusCheckRollup,reviewDecision,comments 2>/dev/null
+# Check for open PR on current branch (includes linked issue)
+gh pr view --json number,title,state,statusCheckRollup,reviewDecision,comments,body 2>/dev/null
# Check active todos
# (Read from conversation context)
```
+Parse the PR body for issue references (e.g., "Fixes #123", "Closes #45", or issue URLs). If found, fetch the linked issue for additional context.
+
### 2. Determine Workflow Position
Based on gathered state, identify the current step:
@@ -51,6 +53,7 @@ Present in this format:
**Branch:** [branch-name]
**Status:** [uncommitted changes summary or "clean"]
**PR:** [#N - title (CI status, N comments)] or "none"
+**Issue:** [#N - title] or "none"
### Workflow Position
@@ -67,11 +70,11 @@ Present in this format:
### Context
-[2-3 sentences summarizing recent work based on branch name, commits, and PR description]
+[2-3 sentences summarizing recent work based on branch name, commits, PR description, and linked issue if any. Reference the issue number when describing what problem is being solved.]
### Suggested Next Action
-[One concrete action to take, with the command to run if applicable]
+[One concrete action to take, with the command to run if applicable. If working on an issue, frame the action in terms of completing that issue.]
```
### 4. Guidelines
@@ -81,3 +84,4 @@ Present in this format:
- If on main with no changes, suggest running `/status-report` to find work
- If stuck between steps, pick the earlier one
- Reference active todos if any exist in the conversation
+- If working on an issue, always mention the issue number in Context and Suggested Next Action
diff --git a/home/.claude/commands/pr-feedback.md b/home/.claude/commands/pr-feedback.md
index 067a32be..be68e2d2 100644
--- a/home/.claude/commands/pr-feedback.md
+++ b/home/.claude/commands/pr-feedback.md
@@ -62,11 +62,17 @@ Before presenting interactive questions, output ALL feedback items ordered by se
> Fix JSON interface to handle missing fields
**Opinion**: Agree - breaking change needs fix
-#### #2. [Suggestion] `utils.ts:89` (Local)
+#### #2. [Important] `bootstrap.sh:42` (Local)
+> Validate input before processing
+**Opinion**: Agree - defensive programming
+
+#### #3. [Suggestion] `utils.ts:89` (Remote)
> Add error handling for missing PR
**Opinion**: Disagree - edge case, unlikely to occur
```
+**Important**: Items MUST be numbered in severity order - all Critical items first, then Important, then Suggestion. The `#N` numbering follows this order.
+
**Source indicators**: `(Local)` = from pr-review-toolkit, `(Remote)` = from external reviewers
Numbers match the `#N` headers in the AskUserQuestion step.
diff --git a/home/.exports b/home/.exports
index 3a0c468d..019de0f5 100644
--- a/home/.exports
+++ b/home/.exports
@@ -2,6 +2,9 @@
# Environment Variables
# ==============================================================================
+# Variables expected in ~/.extra (not tracked):
+# GITHUB_TOKEN - Required for Claude Code GitHub MCP server
+
# PATH configuration
if [ -d "$HOME/.local/bin" ]; then
export PATH="$HOME/.local/bin:$PATH"
diff --git a/home/.zshrc b/home/.zshrc
index 90490a99..4171fba8 100644
--- a/home/.zshrc
+++ b/home/.zshrc
@@ -18,6 +18,7 @@ zstyle ':completion:*' use-cache on
zstyle ':completion:*' cache-path ~/.zsh/cache
# History
+HISTFILE=~/.zsh_history
HISTSIZE=32768
SAVEHIST=32768
setopt APPEND_HISTORY
diff --git a/preferences/iTerm Profile.json b/preferences/iTerm Profile.json
index b79519a6..f9f8cb15 100644
--- a/preferences/iTerm Profile.json
+++ b/preferences/iTerm Profile.json
@@ -649,4 +649,4 @@
"Alpha Component" : 1,
"Green Component" : 0.37254901960784315
}
-}
\ No newline at end of file
+}
diff --git a/uninstall.sh b/uninstall.sh
index 77087630..163eec03 100755
--- a/uninstall.sh
+++ b/uninstall.sh
@@ -1,4 +1,5 @@
#!/usr/bin/env bash
+set -euo pipefail
# ==============================================================================
# Uninstall Script - Remove Dotfiles