configs-all 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/settings.local.json +3 -0
- package/CLAUDE.md +94 -0
- package/README.md +424 -0
- package/TERMINAL_SHORTCUTS.md +96 -0
- package/WINDOWS_COMPATIBILITY.md +85 -0
- package/WINDOWS_MCP_SETUP.md +133 -0
- package/apps/RectangleConfig.plist +0 -0
- package/apps/Synergy +84 -0
- package/apps/iStat Menus Settings.ismp7 +0 -0
- package/claude/CLAUDE.md +228 -0
- package/claude/commands/changelog.md +36 -0
- package/claude/commands/commit.md +29 -0
- package/claude/commands/context.md +112 -0
- package/claude/commands/dash.md +37 -0
- package/claude/commands/deploy-check.md +37 -0
- package/claude/commands/deps.md +26 -0
- package/claude/commands/duplo.md +56 -0
- package/claude/commands/explain.md +43 -0
- package/claude/commands/fix-and-test.md +46 -0
- package/claude/commands/game-debug.md +66 -0
- package/claude/commands/games.md +53 -0
- package/claude/commands/go.md +147 -0
- package/claude/commands/guard.md +102 -0
- package/claude/commands/handoff.md +66 -0
- package/claude/commands/incident.md +144 -0
- package/claude/commands/init.md +78 -0
- package/claude/commands/k8s-debug.md +31 -0
- package/claude/commands/lint.md +27 -0
- package/claude/commands/merge-all.md +115 -0
- package/claude/commands/merge.md +129 -0
- package/claude/commands/mikpc.md +54 -0
- package/claude/commands/morning.md +72 -0
- package/claude/commands/partymode.md +105 -0
- package/claude/commands/plans.md +88 -0
- package/claude/commands/pr.md +41 -0
- package/claude/commands/prep.md +132 -0
- package/claude/commands/push-sync.md +82 -0
- package/claude/commands/push.md +34 -0
- package/claude/commands/research.md +73 -0
- package/claude/commands/retro.md +95 -0
- package/claude/commands/review-pr.md +96 -0
- package/claude/commands/review.md +41 -0
- package/claude/commands/scaffold-agent.md +45 -0
- package/claude/commands/setup.md +92 -0
- package/claude/commands/ship-prod.md +97 -0
- package/claude/commands/ship.md +82 -0
- package/claude/commands/simplify.md +42 -0
- package/claude/commands/spike.md +110 -0
- package/claude/commands/status.md +37 -0
- package/claude/commands/sync.md +72 -0
- package/claude/commands/test.md +29 -0
- package/claude/commands/triage.md +72 -0
- package/claude/desktop/claude_desktop_config.json +9 -0
- package/claude/hooks.json +15 -0
- package/claude/mcp-servers.duplo.json +8 -0
- package/claude/mcp-servers.json +62 -0
- package/claude/scripts/psdebug.ps1 +7 -0
- package/claude/settings.json +38 -0
- package/claude/settings.local.json +4 -0
- package/claude/statusline-command.sh +94 -0
- package/claude/templates/CLAUDE-k8s-devops.md +58 -0
- package/claude/templates/CLAUDE-python-agent.md +47 -0
- package/claude/templates/CLAUDE-typescript-frontend.md +50 -0
- package/docker/ai-stack/docker-compose.yml +76 -0
- package/docker/ai-stack/searxng/limiter.toml +3 -0
- package/docker/ai-stack/searxng/settings.yml +39 -0
- package/docker/cli/config.json.template +15 -0
- package/docker/cli/daemon.json +9 -0
- package/docker/cli/features.json +3 -0
- package/docker/mcp/catalog.json +9 -0
- package/docker/mcp/catalogs/docker-mcp.yaml +15107 -0
- package/docker/mcp/config.yaml +0 -0
- package/docker/mcp/registry.yaml +37 -0
- package/docker/mcp/tools.yaml +0 -0
- package/docs/context/.gitkeep +0 -0
- package/docs/context/2026-03-02-configs.md +142 -0
- package/docs/handoff/.gitkeep +0 -0
- package/docs/incidents/.gitkeep +0 -0
- package/docs/plans/2026-02-28-autonomous-command-suite-design.md +250 -0
- package/docs/plans/2026-02-28-autonomous-command-suite.md +682 -0
- package/docs/plans/2026-03-01-ai-stack-split-architecture.md +72 -0
- package/docs/plans/2026-03-02-ai-stack-expansion.md +33 -0
- package/docs/plans/2026-03-02-merge-commands-design.md +58 -0
- package/docs/plans/2026-03-02-merge-commands.md +354 -0
- package/docs/research/.gitkeep +0 -0
- package/docs/research/2026-03-02-configs-repo-architecture.md +152 -0
- package/docs/retros/.gitkeep +0 -0
- package/docs/retros/2026-03-01-ai-stack-split-architecture.md +38 -0
- package/docs/spikes/.gitkeep +0 -0
- package/gh/config.yml +16 -0
- package/gh/hosts.yml +5 -0
- package/gh/main.json +103 -0
- package/ghostty/config +90 -0
- package/git/config/base.gitconfig +46 -0
- package/git/config/chiefmikey.gitconfig +11 -0
- package/git/config/personal.gitconfig +10 -0
- package/git/config/work.gitconfig +14 -0
- package/ide/cursor/extensions.txt +111 -0
- package/ide/cursor/keybindings.json +307 -0
- package/ide/cursor/mcp.json +92 -0
- package/ide/cursor/settings.json +544 -0
- package/ide/vscode/extensions.txt +120 -0
- package/ide/vscode/insiders/extensions.txt +119 -0
- package/ide/vscode/insiders/keybindings.json +294 -0
- package/ide/vscode/insiders/settings.json +518 -0
- package/ide/vscode/keybindings.json +294 -0
- package/ide/vscode/settings.json +526 -0
- package/ide/vscode/vscode/extensions.txt +43 -0
- package/iterm/Mikey Pro.json +951 -0
- package/iterm/com.googlecode.iterm2.plist +5549 -0
- package/iterm/font/MesloLGS NF Bold Italic.ttf +0 -0
- package/iterm/font/MesloLGS NF Bold.ttf +0 -0
- package/iterm/font/MesloLGS NF Italic.ttf +0 -0
- package/iterm/font/MesloLGS NF Regular.ttf +0 -0
- package/package.json +15 -0
- package/scripts/ai/deploy-ai-stack.sh +119 -0
- package/scripts/ai/fix-ai-proxy.service +12 -0
- package/scripts/ai/fix-ai-proxy.sh +25 -0
- package/scripts/brew/search/brew-search-results.sh +19 -0
- package/scripts/brew/search/brew-search.sh +34 -0
- package/scripts/brew/upgrade/brew-upgrade-autoupdate.sh +5 -0
- package/scripts/brew/upgrade/brew-upgrade-full-auto.sh +89 -0
- package/scripts/brew/upgrade/brew-upgrade-full.sh +159 -0
- package/scripts/docker/cleanup/docker-cleanup-manage.sh +163 -0
- package/scripts/docker/cleanup/docker-cleanup.cron +12 -0
- package/scripts/docker/cleanup/docker-cleanup.sh +280 -0
- package/scripts/docker/install/README.md +23 -0
- package/scripts/docker/install/docker-al2.sh +7 -0
- package/scripts/docker/install/docker-compose-al2.sh +15 -0
- package/scripts/gh/auth/auth.sh +12 -0
- package/scripts/gh/config/gh-config.sh +3 -0
- package/scripts/gh/gist/gh-gist-create.sh +29 -0
- package/scripts/gh/gist/gh-gist-delete.sh +1 -0
- package/scripts/gh/gist/gh-gist-edit.sh +8 -0
- package/scripts/gh/gpg-key/gh-gpg-key-add.sh +3 -0
- package/scripts/gh/install/install.sh +7 -0
- package/scripts/gh/label/gh-label-clone.sh +0 -0
- package/scripts/gh/label/gh-label-create.sh +0 -0
- package/scripts/gh/label/gh-label-delete.sh +0 -0
- package/scripts/gh/label/gh-label-edit.sh +0 -0
- package/scripts/gh/label/gh-label-list.sh +0 -0
- package/scripts/gh/secret/gh-secret-delete.sh +24 -0
- package/scripts/gh/secret/gh-secret-set.sh +70 -0
- package/scripts/gh/ssh-key/gh-ssh-key-add.sh +8 -0
- package/scripts/git/add/git-add.sh +3 -0
- package/scripts/git/auth/README.md +11 -0
- package/scripts/git/auth/https.sh +20 -0
- package/scripts/git/auth/ssh-mac.sh +41 -0
- package/scripts/git/branch-delete/git-branch-delete.sh +16 -0
- package/scripts/git/checkout/git-checkout-stash.sh +32 -0
- package/scripts/git/temp/git-temp-pull.sh +6 -0
- package/scripts/git/temp/git-temp-push.sh +5 -0
- package/scripts/install/fresh.zsh +34 -0
- package/scripts/install/full-install.zsh +193 -0
- package/scripts/linux/codedeploy/README.md +19 -0
- package/scripts/linux/codedeploy/linux-codedeploy-al2.sh +13 -0
- package/scripts/linux/codedeploy/linux-codedeploy-index.sh +16 -0
- package/scripts/linux/codedeploy/linux-codedeploy-ubuntu.sh +14 -0
- package/scripts/linux/coredns/README.md +17 -0
- package/scripts/linux/coredns/linux-coredns-al2.sh +29 -0
- package/scripts/linux/wifi/01-netconf.yaml +21 -0
- package/scripts/linux/wifi/wifi-ubuntu.sh +17 -0
- package/scripts/mac/dock-sort/mac-dock-sort.sh +87 -0
- package/scripts/mac/dropbox-ignore/mac-dropbox-ignore.sh +12 -0
- package/scripts/mac/sudo-askpass/mac-sudo-askpass.sh +50 -0
- package/scripts/mac/sudo-askpass/setup-sudo-password.sh +49 -0
- package/scripts/mac/upgrade/mac-upgrade.sh +21 -0
- package/scripts/mac/vpn/mac-vpn.sh +4 -0
- package/scripts/mcp/aws-mcp-wrapper.ps1 +97 -0
- package/scripts/mcp/aws-mcp-wrapper.sh +53 -0
- package/scripts/mcp/duplo-mcp-wrapper.sh +31 -0
- package/scripts/mcp/filesystem-mcp-wrapper.ps1 +43 -0
- package/scripts/mcp/filesystem-mcp-wrapper.sh +34 -0
- package/scripts/mcp/git-mcp-wrapper.ps1 +42 -0
- package/scripts/mcp/git-mcp-wrapper.sh +33 -0
- package/scripts/mcp/github-mcp-wrapper.ps1 +43 -0
- package/scripts/mcp/github-mcp-wrapper.sh +19 -0
- package/scripts/mcp/kubernetes-mcp-wrapper.ps1 +22 -0
- package/scripts/mcp/kubernetes-mcp-wrapper.sh +16 -0
- package/scripts/mcp/mcp-launcher.ps1 +56 -0
- package/scripts/mcp/mcp-launcher.sh +71 -0
- package/scripts/mcp/mongodb-mcp-wrapper.ps1 +26 -0
- package/scripts/mcp/mongodb-mcp-wrapper.sh +17 -0
- package/scripts/mcp/notion-mcp-wrapper.ps1 +23 -0
- package/scripts/mcp/notion-mcp-wrapper.sh +14 -0
- package/scripts/mcp/postgres-mcp-wrapper.ps1 +23 -0
- package/scripts/mcp/postgres-mcp-wrapper.sh +16 -0
- package/scripts/npm/ncu/npm-ncu.sh +24 -0
- package/scripts/npm/upgrade/npm-upgrade.sh +51 -0
- package/scripts/qmk/build_reviung41.sh +28 -0
- package/scripts/qmk/sync_unicorne.sh +44 -0
- package/scripts/sync/README.md +64 -0
- package/scripts/sync/config-common.zsh +882 -0
- package/scripts/sync/pull-configs.ps1 +33 -0
- package/scripts/sync/pull-configs.zsh +278 -0
- package/scripts/sync/push-configs.ps1 +91 -0
- package/scripts/sync/push-configs.zsh +384 -0
- package/shell/alias/alias-d.zsh +333 -0
- package/shell/alias/alias.zsh +36 -0
- package/shell/alias/categories/development.zsh +157 -0
- package/shell/alias/categories/environment.zsh +13 -0
- package/shell/alias/categories/git.zsh +40 -0
- package/shell/alias/categories/github-functions.zsh +459 -0
- package/shell/alias/categories/network.zsh +46 -0
- package/shell/alias/categories/path.zsh +46 -0
- package/shell/alias/categories/system.zsh +78 -0
- package/shell/alias/categories/wolfe-server.zsh +11 -0
- package/shell/powershell/Microsoft.PowerShell_profile.ps1 +208 -0
- package/shell/zsh/.p10k.zsh +1832 -0
- package/shell/zsh/.zshrc +87 -0
- package/shell/zsh/config/completion.zsh +31 -0
- package/shell/zsh/config/functions.zsh +31 -0
- package/shell/zsh/config/keybindings.zsh +13 -0
- package/shell/zsh/config/options.zsh +56 -0
- package/shell/zsh/config/plugins.zsh +83 -0
- package/shell/zsh/config/variables.zsh +191 -0
- package/shell/zsh/powerlevel10k.zsh-theme +83 -0
- package/shell/zsh/zsh-autosuggestions.zsh +871 -0
- package/ssh/config +46 -0
- package/ssh/config.duplo +21 -0
- package/ssh/config.mikpc +35 -0
- package/ssh/personal_signing.pub +1 -0
- package/templates/.envrc.example +34 -0
- package/templates/.envrc.quickstart +17 -0
- package/wezterm/wezterm.lua +249 -0
- package/wsl/.wslconfig +3 -0
- package/wsl/wsl.conf +18 -0
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# AI Stack Split Architecture — wolfe-server + mikpc
|
|
2
|
+
|
|
3
|
+
_Status: COMPLETED_
|
|
4
|
+
_LastCompletedStep: 6_
|
|
5
|
+
_TotalSteps: 6_
|
|
6
|
+
_Created: 2026-03-01_
|
|
7
|
+
_Completed: 2026-03-01_
|
|
8
|
+
_Summary: Split AI stack across wolfe-server (web UIs) and mikpc (GPU compute). All 8 services + Ollama running and verified. Cross-machine networking via LAN IP (Tailscale ACL blocks tag:wolfe). Five *.wolfe.family domains live._
|
|
9
|
+
|
|
10
|
+
## Goal
|
|
11
|
+
Split AI stack across two machines:
|
|
12
|
+
- **wolfe-server** (home server): Web UIs + non-GPU services — leverages existing Caddy, Tailscale, systemd, unpack.sh
|
|
13
|
+
- **mikpc** (RTX 5090): GPU compute only — Ollama, ComfyUI, ACE-Step, Speaches
|
|
14
|
+
|
|
15
|
+
## Architecture
|
|
16
|
+
```
|
|
17
|
+
wolfe-server (services via *.wolfe.family):
|
|
18
|
+
chat.wolfe.family → Open WebUI :3000
|
|
19
|
+
search.wolfe.family → Perplexica :3002
|
|
20
|
+
n8n.wolfe.family → n8n :5678
|
|
21
|
+
images.wolfe.family → proxy to mikpc:8188 (ComfyUI)
|
|
22
|
+
music.wolfe.family → proxy to mikpc:7860 (ACE-Step)
|
|
23
|
+
SearXNG :4000 (internal, no domain)
|
|
24
|
+
Qdrant :6333 (internal, no domain)
|
|
25
|
+
Postgres (internal, n8n backend)
|
|
26
|
+
|
|
27
|
+
mikpc (compute-only, no web exposure):
|
|
28
|
+
Ollama :11434 (systemd, not Docker)
|
|
29
|
+
ComfyUI :8188 (GPU)
|
|
30
|
+
ACE-Step :7860 (GPU)
|
|
31
|
+
Speaches :8000 (GPU)
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Steps
|
|
35
|
+
|
|
36
|
+
### Step 1: Create wolfe-server service directories
|
|
37
|
+
Create 5 service directories in wolfe-server repo following the established pattern.
|
|
38
|
+
Verify: `ls services/{open-webui,searxng,perplexica,n8n,qdrant}/docker-compose.yml`
|
|
39
|
+
|
|
40
|
+
### Step 2: Update Caddyfile
|
|
41
|
+
Add 5 new domain entries: chat, search, n8n (local), images, music (proxy to mikpc).
|
|
42
|
+
Verify: `grep -c 'wolfe.family' services/caddy/Caddyfile` shows increased count
|
|
43
|
+
|
|
44
|
+
### Step 3: Update unpack.sh
|
|
45
|
+
Add SearXNG config file handling (settings.yml, limiter.toml).
|
|
46
|
+
Verify: `grep -c 'searxng' scripts/system/unpack.sh` shows handling exists
|
|
47
|
+
|
|
48
|
+
### Step 4: Update mikpc compose to compute-only
|
|
49
|
+
Remove non-GPU services, keep ComfyUI, ACE-Step, Speaches.
|
|
50
|
+
Verify: File contains only 3 services
|
|
51
|
+
|
|
52
|
+
### Step 5: Commit, push, deploy
|
|
53
|
+
- Commit + push wolfe-server
|
|
54
|
+
- Commit + push configs repo
|
|
55
|
+
- SSH to wolfe-server: git pull + unpack.sh
|
|
56
|
+
- SSH to mikpc: redeploy compute-only stack
|
|
57
|
+
Verify: All containers running on both machines
|
|
58
|
+
|
|
59
|
+
### Step 6: Verify networking and configure services
|
|
60
|
+
- All wolfe-server services connect to mikpc GPU services
|
|
61
|
+
- Perplexica configured with Ollama via API
|
|
62
|
+
- All *.wolfe.family domains resolve
|
|
63
|
+
- End-to-end chat flow works
|
|
64
|
+
Verify: Health checks pass on all services
|
|
65
|
+
|
|
66
|
+
## Risks
|
|
67
|
+
- Port proxy on mikpc must be active for cross-machine connections
|
|
68
|
+
- Perplexica config resets on container restart (mitigated by configure.sh)
|
|
69
|
+
- Caddy needs Cloudflare DNS for wildcard TLS (already working)
|
|
70
|
+
|
|
71
|
+
## Execution Journal
|
|
72
|
+
(appended after each step)
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# AI Stack Expansion: wolfe-server 3060 GPU + New Services
|
|
2
|
+
|
|
3
|
+
_Status: COMPLETED_
|
|
4
|
+
_LastCompletedStep: 10_
|
|
5
|
+
_TotalSteps: 10_
|
|
6
|
+
_Created: 2026-03-02_
|
|
7
|
+
_Completed: 2026-03-02_
|
|
8
|
+
_Summary: Expanded wolfe-server AI stack with 5 new GPU/CPU services on RTX 3060. Moved Speaches from mikpc to wolfe-server. Added Ollama 7B, Wyoming OpenAI (HA voice), Paperless-ngx, Stirling-PDF. Automated WSL port proxy on mikpc. Cross-machine networking remains broken (Tailscale ACL + LAN issue)._
|
|
9
|
+
|
|
10
|
+
## Steps Completed
|
|
11
|
+
|
|
12
|
+
1. Automate fix-ai-proxy on mikpc — systemd service + deploy script integration
|
|
13
|
+
2. Add Speaches to wolfe-server (GPU) — Whisper STT + Kokoro TTS
|
|
14
|
+
3. Add Ollama to wolfe-server (GPU, Docker) — qwen2.5:7b + nomic-embed-text
|
|
15
|
+
4. Add Wyoming OpenAI bridge for HA voice — Speaches → Wyoming protocol
|
|
16
|
+
5. Add Paperless-ngx — Document management with OCR, Postgres+Valkey
|
|
17
|
+
6. Add Stirling-PDF — CPU-only PDF toolkit
|
|
18
|
+
7. Update Caddyfile — paperless.wolfe.family, pdf.wolfe.family
|
|
19
|
+
8. Migrate Speaches references — Open WebUI .env → local host.docker.internal
|
|
20
|
+
9. Remove Speaches from mikpc — docker-compose, fix-ai-proxy.sh, deploy script
|
|
21
|
+
10. Deploy and verify everything — both repos committed, pushed, deployed, verified
|
|
22
|
+
|
|
23
|
+
## Issues Resolved During Execution
|
|
24
|
+
|
|
25
|
+
- **wyoming-openai crash**: Speaches v0.8+ removed `/v1/audio/speech/voices`. Fix: set TTS_VOICES env explicitly
|
|
26
|
+
- **Ollama DNS**: Docker internal DNS fails (stub resolver). Fix: explicit dns config in compose
|
|
27
|
+
- **Ollama healthcheck**: Image has no curl/wget. Fix: use `ollama list` command
|
|
28
|
+
- **Open WebUI Ollama URL**: Pointed to unreachable mikpc. Fix: use local host.docker.internal
|
|
29
|
+
|
|
30
|
+
## Outstanding Issues
|
|
31
|
+
|
|
32
|
+
- **Cross-machine networking**: wolfe-server cannot reach mikpc via Tailscale (ACL) or LAN (route unreachable). Image gen disabled in Open WebUI until fixed.
|
|
33
|
+
- **HA voice pipeline**: Wyoming OpenAI running, but HA integrations (Wyoming + Ollama conversation agent) need to be added via HA UI manually.
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# Design: /merge and /merge-all Slash Commands
|
|
2
|
+
|
|
3
|
+
_Date: 2026-03-02_
|
|
4
|
+
_Status: APPROVED_
|
|
5
|
+
|
|
6
|
+
## Problem
|
|
7
|
+
|
|
8
|
+
No single command to autonomously review a PR, fix issues, and merge it. Currently requires chaining `/review-pr` + manual fixes + `/ship-prod`. Need `/merge` for single PRs and `/merge-all` for batch processing.
|
|
9
|
+
|
|
10
|
+
## Decisions
|
|
11
|
+
|
|
12
|
+
- **Merge strategy:** Regular merge commits (`--merge`), never squash. Preserves full git history.
|
|
13
|
+
- **Fix scope:** Full autonomous — check out branch, fix issues, push, re-review. Max 3 iterations.
|
|
14
|
+
- **Branch cleanup:** Always delete remote branch after merge (`--delete-branch`).
|
|
15
|
+
- **Parallelism (`/merge-all`):** Parallel review via subagents, sequential merge to avoid conflicts.
|
|
16
|
+
- **Model:** Sonnet subagents for review+fix work. Opus orchestrates `/merge-all`.
|
|
17
|
+
|
|
18
|
+
## `/merge` — Review, Fix & Merge PR
|
|
19
|
+
|
|
20
|
+
**Input:** `$ARGUMENTS` — PR number, URL, or branch name. If omitted, finds PR for current branch, or most recent open PR.
|
|
21
|
+
|
|
22
|
+
**Flow:**
|
|
23
|
+
|
|
24
|
+
1. Load PR (resolve from args or auto-detect)
|
|
25
|
+
2. Load project context (CLAUDE.md, docs/context, incidents, spikes)
|
|
26
|
+
3. Review cycle (max 3 iterations):
|
|
27
|
+
- Fetch PR details + full diff
|
|
28
|
+
- Read all changed files in full context
|
|
29
|
+
- Deep review: correctness, security, types, error handling, conventions, testing, performance
|
|
30
|
+
- If issues: check out branch → fix → test → lint → commit → push → re-review
|
|
31
|
+
- If clean: proceed
|
|
32
|
+
4. Pre-merge checks: CI passing, local tests, lint
|
|
33
|
+
5. Confidence gate: 100% or stop
|
|
34
|
+
6. Merge: `gh pr merge --merge --delete-branch`
|
|
35
|
+
7. Report: PR URL, iterations, fixes applied, merge status
|
|
36
|
+
|
|
37
|
+
## `/merge-all` — Review, Fix & Merge All Open PRs
|
|
38
|
+
|
|
39
|
+
**Input:** `$ARGUMENTS` — optional filter. Default: all open PRs.
|
|
40
|
+
|
|
41
|
+
**Flow:**
|
|
42
|
+
|
|
43
|
+
1. List open PRs via `gh pr list`
|
|
44
|
+
2. Phase 1 — Parallel: one Sonnet subagent per PR (review + fix)
|
|
45
|
+
3. Phase 2 — Sequential merge (oldest first): re-check CI → `gh pr merge --merge --delete-branch`
|
|
46
|
+
4. Skip PRs with conflicts or unresolvable issues
|
|
47
|
+
5. Report: summary table per PR
|
|
48
|
+
|
|
49
|
+
## Safety
|
|
50
|
+
|
|
51
|
+
- Max 3 fix iterations per PR
|
|
52
|
+
- Never force-merge past failing CI
|
|
53
|
+
- If protected branch requires human reviews, report and skip
|
|
54
|
+
- Merge oldest-first to minimize conflict cascading
|
|
55
|
+
|
|
56
|
+
## Also Fixed
|
|
57
|
+
|
|
58
|
+
- `/ship-prod`: Changed `--squash` to `--merge` for consistent history preservation
|
|
@@ -0,0 +1,354 @@
|
|
|
1
|
+
# /merge and /merge-all Implementation Plan
|
|
2
|
+
|
|
3
|
+
> **For Claude:** REQUIRED SUB-SKILL: Use superpowers:executing-plans to implement this plan task-by-task.
|
|
4
|
+
|
|
5
|
+
**Goal:** Create `/merge` (review, fix, merge one PR) and `/merge-all` (batch process all open PRs) slash commands.
|
|
6
|
+
|
|
7
|
+
**Architecture:** Two standalone markdown command files. `/merge` is a self-contained Sonnet subagent flow. `/merge-all` orchestrates parallel Sonnet subagents (one per PR) then merges sequentially.
|
|
8
|
+
|
|
9
|
+
**Tech Stack:** Claude Code slash commands (markdown), `gh` CLI, git
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
### Task 1: Create `/merge` command
|
|
14
|
+
|
|
15
|
+
**Files:**
|
|
16
|
+
- Create: `claude/commands/merge.md`
|
|
17
|
+
|
|
18
|
+
**Step 1: Write the command file**
|
|
19
|
+
|
|
20
|
+
Create `claude/commands/merge.md` with this exact content:
|
|
21
|
+
|
|
22
|
+
```markdown
|
|
23
|
+
## Merge PR — Review, Fix & Merge
|
|
24
|
+
|
|
25
|
+
Autonomously review a PR, fix any issues found, and merge it. Combines deep code review with autonomous fix capability. Will not merge until 100% confident the PR is clean.
|
|
26
|
+
|
|
27
|
+
### Input
|
|
28
|
+
$ARGUMENTS - PR number, URL, or branch name. If omitted, finds PR for current branch, or the most recent open PR in the repo.
|
|
29
|
+
|
|
30
|
+
### Instructions
|
|
31
|
+
|
|
32
|
+
**Before delegating, gather project context:**
|
|
33
|
+
1. Read `docs/context/` for the most recent context snapshot — extract Architecture, Conventions, Testing, and Gotchas sections
|
|
34
|
+
2. Read the project CLAUDE.md if it exists — extract Conventions and Common Mistakes sections
|
|
35
|
+
3. Read `docs/incidents/` for recent incidents — are any related to the files being changed?
|
|
36
|
+
4. Read `docs/spikes/` for recent spikes — is this PR implementing a spiked approach?
|
|
37
|
+
|
|
38
|
+
**Then delegate this task to a subagent using the Agent tool with `model: "sonnet"` and `subagent_type: "general-purpose"`.** Pass the full prompt below (with context injected) to the subagent and relay its result.
|
|
39
|
+
|
|
40
|
+
### Subagent prompt
|
|
41
|
+
|
|
42
|
+
You are an autonomous PR reviewer and fixer. Your job is to review PR `$ARGUMENTS`, fix any issues you find, and merge it — but ONLY when you are 100% confident it is clean.
|
|
43
|
+
|
|
44
|
+
**Project Context:**
|
|
45
|
+
[Inject Architecture, Conventions, Testing, Gotchas from docs/context if available]
|
|
46
|
+
[Inject Conventions, Common Mistakes from project CLAUDE.md if available]
|
|
47
|
+
[Inject any related incidents or spikes if relevant]
|
|
48
|
+
If no project context is available, review against general best practices and note that project context was unavailable.
|
|
49
|
+
|
|
50
|
+
#### Phase 1: Load the PR
|
|
51
|
+
|
|
52
|
+
1. **Resolve the PR:**
|
|
53
|
+
- If `$ARGUMENTS` is a number or URL, use it directly
|
|
54
|
+
- If `$ARGUMENTS` is a branch name: `gh pr list --head $ARGUMENTS --json number --jq '.[0].number'`
|
|
55
|
+
- If `$ARGUMENTS` is empty:
|
|
56
|
+
- Try current branch: `gh pr list --head $(git branch --show-current) --json number --jq '.[0].number'`
|
|
57
|
+
- If no result: latest open PR: `gh pr list --state open --limit 1 --json number --jq '.[0].number'`
|
|
58
|
+
- If no PR found, stop: "No open PR found. Create one first with `/pr`."
|
|
59
|
+
|
|
60
|
+
2. **Fetch PR details:**
|
|
61
|
+
```bash
|
|
62
|
+
gh pr view $PR_NUMBER --json title,body,author,baseRefName,headRefName,additions,deletions,commits,reviewDecision
|
|
63
|
+
gh pr diff $PR_NUMBER
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
#### Phase 2: Review and Fix Loop (max 3 iterations)
|
|
67
|
+
|
|
68
|
+
For each iteration:
|
|
69
|
+
|
|
70
|
+
3. **Deep review** — read all changed files in full context (not just the diff):
|
|
71
|
+
- Read each modified file completely
|
|
72
|
+
- Check how changed functions/classes are used elsewhere
|
|
73
|
+
- Check if tests exist for the changed code
|
|
74
|
+
|
|
75
|
+
4. **Review every change for:**
|
|
76
|
+
- **Correctness:** Logic errors, off-by-one, null/undefined, race conditions
|
|
77
|
+
- **Security:** Hardcoded secrets, injection vulnerabilities, XSS, OWASP top 10
|
|
78
|
+
- **Types:** Missing types, incorrect types, unsafe `any` (TypeScript)
|
|
79
|
+
- **Error handling:** Unhandled rejections, missing try/catch, bare exceptions
|
|
80
|
+
- **Project conventions:** Does the code follow established patterns? (Use project context)
|
|
81
|
+
- **Testing:** Are new features tested? Edge cases covered?
|
|
82
|
+
- **Performance:** N+1 queries, unnecessary re-renders, unbounded loops
|
|
83
|
+
- **Breaking changes:** API contracts, migrations, backwards compatibility
|
|
84
|
+
|
|
85
|
+
5. **Check for anti-patterns:**
|
|
86
|
+
- Files that shouldn't be committed (`.env`, `node_modules`, build artifacts)
|
|
87
|
+
- Tests that test implementation instead of behavior
|
|
88
|
+
- Missing or inadequate PR description
|
|
89
|
+
|
|
90
|
+
6. **If issues found — fix them:**
|
|
91
|
+
- Check out the PR branch: `gh pr checkout $PR_NUMBER`
|
|
92
|
+
- Fix all identified issues in the code
|
|
93
|
+
- Run the test suite to verify fixes don't break anything
|
|
94
|
+
- Run linter to verify code style
|
|
95
|
+
- Stage and commit fixes:
|
|
96
|
+
```bash
|
|
97
|
+
git add <fixed files>
|
|
98
|
+
git commit -m "fix: address review feedback — <brief description>"
|
|
99
|
+
```
|
|
100
|
+
- Push to the PR branch: `git push`
|
|
101
|
+
- **Loop back to step 3** for re-review (track iteration count)
|
|
102
|
+
|
|
103
|
+
7. **If no issues found — proceed to Phase 3**
|
|
104
|
+
|
|
105
|
+
#### Phase 3: Pre-Merge Verification
|
|
106
|
+
|
|
107
|
+
8. **Run all checks in parallel:**
|
|
108
|
+
- `gh pr checks $PR_NUMBER` — all CI checks must be passing (wait up to 5 minutes for in-progress checks)
|
|
109
|
+
- Run full test suite locally — all must pass
|
|
110
|
+
- Run linter — zero errors
|
|
111
|
+
- Run build if applicable — must succeed
|
|
112
|
+
|
|
113
|
+
9. **Confidence gate:**
|
|
114
|
+
- If ANY concern remains: **stop and report**. Do NOT merge.
|
|
115
|
+
- Only proceed if 100% confident this is merge-ready.
|
|
116
|
+
- Document what was checked and what gives confidence.
|
|
117
|
+
|
|
118
|
+
10. **Check for merge blockers:**
|
|
119
|
+
- `gh pr view $PR_NUMBER --json reviewDecision,mergeStateStatus`
|
|
120
|
+
- If branch protection requires reviews from others, report: "This PR requires human review approval before it can be merged."
|
|
121
|
+
- If merge is blocked for any other reason, report the blocker and stop.
|
|
122
|
+
|
|
123
|
+
#### Phase 4: Merge
|
|
124
|
+
|
|
125
|
+
11. **Merge the PR:**
|
|
126
|
+
```bash
|
|
127
|
+
gh pr merge $PR_NUMBER --merge --delete-branch
|
|
128
|
+
```
|
|
129
|
+
- Verify: `gh pr view $PR_NUMBER --json state --jq '.state'` should return "MERGED"
|
|
130
|
+
|
|
131
|
+
12. **Report:**
|
|
132
|
+
```
|
|
133
|
+
## Merge Report
|
|
134
|
+
- **PR:** #<number> — <title>
|
|
135
|
+
- **URL:** <pr_url>
|
|
136
|
+
- **Review iterations:** <count> (0 = clean on first review)
|
|
137
|
+
- **Fixes applied:** <list of fix commits, or "None">
|
|
138
|
+
- **CI checks:** all passing
|
|
139
|
+
- **Merge method:** merge (full history preserved)
|
|
140
|
+
- **Branch:** <branch> deleted
|
|
141
|
+
- **Status:** Successfully merged
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
### Critical Rules
|
|
145
|
+
|
|
146
|
+
- **NEVER merge with failing CI checks.**
|
|
147
|
+
- **NEVER skip the deep review.** Read every changed file in full.
|
|
148
|
+
- **NEVER proceed past the confidence gate with concerns.**
|
|
149
|
+
- **Max 3 fix iterations.** If still not clean after 3 rounds, stop and report remaining issues.
|
|
150
|
+
- **If in doubt, stop and report.** A delayed merge is always better than merging bad code.
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
**Step 2: Verify the file exists and looks correct**
|
|
154
|
+
|
|
155
|
+
Run: `head -5 claude/commands/merge.md`
|
|
156
|
+
Expected: The header lines of the new command.
|
|
157
|
+
|
|
158
|
+
**Step 3: Commit**
|
|
159
|
+
|
|
160
|
+
```bash
|
|
161
|
+
git add claude/commands/merge.md
|
|
162
|
+
git commit -m "feat: add /merge command — autonomous PR review, fix & merge"
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
---
|
|
166
|
+
|
|
167
|
+
### Task 2: Create `/merge-all` command
|
|
168
|
+
|
|
169
|
+
**Files:**
|
|
170
|
+
- Create: `claude/commands/merge-all.md`
|
|
171
|
+
|
|
172
|
+
**Step 1: Write the command file**
|
|
173
|
+
|
|
174
|
+
Create `claude/commands/merge-all.md` with this exact content:
|
|
175
|
+
|
|
176
|
+
```markdown
|
|
177
|
+
## Merge All PRs — Batch Review, Fix & Merge
|
|
178
|
+
|
|
179
|
+
Autonomously review, fix, and merge all open PRs. Dispatches parallel subagents to review each PR simultaneously, then merges sequentially (oldest first) to avoid conflicts.
|
|
180
|
+
|
|
181
|
+
### Input
|
|
182
|
+
$ARGUMENTS - optional filter flags passed to `gh pr list` (e.g., `--author @me`, `--label ready-to-merge`). Default: all open PRs.
|
|
183
|
+
|
|
184
|
+
### Instructions
|
|
185
|
+
|
|
186
|
+
**Do NOT delegate this command to a subagent.** This is an orchestration command — Opus runs it directly and dispatches subagents for each PR.
|
|
187
|
+
|
|
188
|
+
**Before starting, gather project context:**
|
|
189
|
+
1. Read `docs/context/` for the most recent context snapshot — extract Architecture, Conventions, Testing, and Gotchas sections
|
|
190
|
+
2. Read the project CLAUDE.md if it exists — extract Conventions and Common Mistakes sections
|
|
191
|
+
3. Read `docs/incidents/` for recent incidents
|
|
192
|
+
4. Read `docs/spikes/` for recent spikes
|
|
193
|
+
|
|
194
|
+
#### Phase 1: Discover PRs
|
|
195
|
+
|
|
196
|
+
1. **List all open PRs:**
|
|
197
|
+
```bash
|
|
198
|
+
gh pr list --state open $ARGUMENTS --json number,title,headRefName,baseRefName,author,createdAt --jq 'sort_by(.number)'
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
2. **If zero PRs:** Report "No open PRs found." and stop.
|
|
202
|
+
|
|
203
|
+
3. **Report what was found:**
|
|
204
|
+
```
|
|
205
|
+
Found N open PRs:
|
|
206
|
+
- #1 — title (branch → base)
|
|
207
|
+
- #2 — title (branch → base)
|
|
208
|
+
...
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
#### Phase 2: Parallel Review
|
|
212
|
+
|
|
213
|
+
4. **Dispatch one Sonnet subagent per PR** using the Agent tool with `model: "sonnet"` and `subagent_type: "general-purpose"`. Launch ALL subagents in a single message (parallel).
|
|
214
|
+
|
|
215
|
+
Each subagent gets the same prompt as the `/merge` command's subagent prompt (Phases 1-2 only: load + review/fix loop), but with a modified ending:
|
|
216
|
+
|
|
217
|
+
**Instead of merging**, the subagent should:
|
|
218
|
+
- Complete the review and fix loop (max 3 iterations)
|
|
219
|
+
- Run pre-merge verification (CI checks, tests, lint)
|
|
220
|
+
- Report back with:
|
|
221
|
+
```
|
|
222
|
+
PR #<number>: READY | NOT READY | NEEDS HUMAN REVIEW
|
|
223
|
+
- Review iterations: <count>
|
|
224
|
+
- Fixes applied: <list or "None">
|
|
225
|
+
- CI status: passing | failing | pending
|
|
226
|
+
- Blockers: <list or "None">
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
**Inject the project context** (gathered above) into each subagent prompt.
|
|
230
|
+
|
|
231
|
+
5. **Collect all subagent results.** Wait for all to complete.
|
|
232
|
+
|
|
233
|
+
#### Phase 3: Sequential Merge
|
|
234
|
+
|
|
235
|
+
6. **For each PR marked READY** (process in order of PR number, oldest first):
|
|
236
|
+
|
|
237
|
+
a. **Re-check CI status** (fixes may have triggered new CI runs):
|
|
238
|
+
```bash
|
|
239
|
+
gh pr checks $PR_NUMBER
|
|
240
|
+
```
|
|
241
|
+
If checks are still running, wait up to 5 minutes.
|
|
242
|
+
|
|
243
|
+
b. **Check for merge conflicts** (earlier merges may have created conflicts):
|
|
244
|
+
```bash
|
|
245
|
+
gh pr view $PR_NUMBER --json mergeable --jq '.mergeable'
|
|
246
|
+
```
|
|
247
|
+
If `CONFLICTING`, skip this PR and note it in the report.
|
|
248
|
+
|
|
249
|
+
c. **Merge:**
|
|
250
|
+
```bash
|
|
251
|
+
gh pr merge $PR_NUMBER --merge --delete-branch
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
d. **Verify:** `gh pr view $PR_NUMBER --json state --jq '.state'` should return "MERGED"
|
|
255
|
+
|
|
256
|
+
7. **For PRs marked NOT READY or NEEDS HUMAN REVIEW:** Skip and include in report.
|
|
257
|
+
|
|
258
|
+
#### Phase 4: Report
|
|
259
|
+
|
|
260
|
+
8. **Generate summary report:**
|
|
261
|
+
```
|
|
262
|
+
## Merge All Report
|
|
263
|
+
|
|
264
|
+
### Successfully Merged
|
|
265
|
+
| PR | Title | Iterations | Fixes | Status |
|
|
266
|
+
|----|-------|-----------|-------|--------|
|
|
267
|
+
| #1 | title | 0 | None | Merged |
|
|
268
|
+
| #3 | title | 2 | fix: ... | Merged |
|
|
269
|
+
|
|
270
|
+
### Skipped
|
|
271
|
+
| PR | Title | Reason |
|
|
272
|
+
|----|-------|--------|
|
|
273
|
+
| #2 | title | Merge conflict after #1 merged |
|
|
274
|
+
| #4 | title | Requires human review approval |
|
|
275
|
+
| #5 | title | 3 fix iterations exhausted — issues remain |
|
|
276
|
+
|
|
277
|
+
### Summary
|
|
278
|
+
- **Total PRs:** N
|
|
279
|
+
- **Merged:** N
|
|
280
|
+
- **Skipped:** N
|
|
281
|
+
- **Action needed:** [list any PRs that need manual attention]
|
|
282
|
+
```
|
|
283
|
+
|
|
284
|
+
### Critical Rules
|
|
285
|
+
|
|
286
|
+
- **NEVER merge a PR that isn't READY.**
|
|
287
|
+
- **Merge oldest first** to minimize conflict cascading.
|
|
288
|
+
- **If a merge creates conflicts in later PRs, skip them** — don't try to resolve cross-PR conflicts.
|
|
289
|
+
- **Max 3 fix iterations per PR** — same as `/merge`.
|
|
290
|
+
- **Report everything** — the user needs to know what was merged, what was skipped, and why.
|
|
291
|
+
```
|
|
292
|
+
|
|
293
|
+
**Step 2: Verify the file exists and looks correct**
|
|
294
|
+
|
|
295
|
+
Run: `head -5 claude/commands/merge-all.md`
|
|
296
|
+
Expected: The header lines of the new command.
|
|
297
|
+
|
|
298
|
+
**Step 3: Commit**
|
|
299
|
+
|
|
300
|
+
```bash
|
|
301
|
+
git add claude/commands/merge-all.md
|
|
302
|
+
git commit -m "feat: add /merge-all command — batch review, fix & merge all open PRs"
|
|
303
|
+
```
|
|
304
|
+
|
|
305
|
+
---
|
|
306
|
+
|
|
307
|
+
### Task 3: Commit the ship-prod fix and design doc
|
|
308
|
+
|
|
309
|
+
**Files:**
|
|
310
|
+
- Modified: `claude/commands/ship-prod.md` (already edited — squash → merge)
|
|
311
|
+
- Created: `docs/plans/2026-03-02-merge-commands-design.md`
|
|
312
|
+
|
|
313
|
+
**Step 1: Commit both changes**
|
|
314
|
+
|
|
315
|
+
```bash
|
|
316
|
+
git add claude/commands/ship-prod.md docs/plans/2026-03-02-merge-commands-design.md
|
|
317
|
+
git commit -m "fix: use merge commits instead of squash in ship-prod, add merge commands design"
|
|
318
|
+
```
|
|
319
|
+
|
|
320
|
+
---
|
|
321
|
+
|
|
322
|
+
### Task 4: Update project CLAUDE.md command documentation
|
|
323
|
+
|
|
324
|
+
**Files:**
|
|
325
|
+
- Modify: `CLAUDE.md` (project-level, in repo root)
|
|
326
|
+
|
|
327
|
+
**Step 1: Add /merge and /merge-all to the command list in the Claude Code Command Suite section of MEMORY.md or CLAUDE.md**
|
|
328
|
+
|
|
329
|
+
Add to the Action layer line in the relevant documentation:
|
|
330
|
+
- `/merge` — Review, fix & merge a single PR
|
|
331
|
+
- `/merge-all` — Batch review, fix & merge all open PRs
|
|
332
|
+
|
|
333
|
+
**Step 2: Commit**
|
|
334
|
+
|
|
335
|
+
```bash
|
|
336
|
+
git add CLAUDE.md
|
|
337
|
+
git commit -m "docs: add /merge and /merge-all to command documentation"
|
|
338
|
+
```
|
|
339
|
+
|
|
340
|
+
---
|
|
341
|
+
|
|
342
|
+
### Task 5: Deploy and verify
|
|
343
|
+
|
|
344
|
+
**Step 1: Deploy configs**
|
|
345
|
+
|
|
346
|
+
Run: `./scripts/sync/push-configs.zsh`
|
|
347
|
+
Expected: Commands deployed without errors.
|
|
348
|
+
|
|
349
|
+
**Step 2: Verify commands are available**
|
|
350
|
+
|
|
351
|
+
Run: `ls ~/.claude/commands/merge*.md`
|
|
352
|
+
Expected: Both `merge.md` and `merge-all.md` present.
|
|
353
|
+
|
|
354
|
+
**Step 3: Mark plan as COMPLETED**
|
|
File without changes
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
# Configs Repo Architecture — Deep Research
|
|
2
|
+
|
|
3
|
+
_Date: 2026-03-02_
|
|
4
|
+
_Scope: Full repo architecture, sync system, shell config, Claude Code setup, Docker/AI stack_
|
|
5
|
+
|
|
6
|
+
## Overview
|
|
7
|
+
|
|
8
|
+
Centralized config management across 4 machines (mikmac, mikbook, duplo, mikpc) with cross-platform macOS/Windows(WSL) support. Git is the sync mechanism — each machine has its own independent clone. Dropbox paths differ per machine.
|
|
9
|
+
|
|
10
|
+
## Architecture
|
|
11
|
+
|
|
12
|
+
### Config Sync System (`scripts/sync/`)
|
|
13
|
+
|
|
14
|
+
The core of the repo. Three files form the sync engine:
|
|
15
|
+
|
|
16
|
+
**config-common.zsh** — Shared infrastructure:
|
|
17
|
+
- Platform detection (`IS_MAC`/`IS_WINDOWS`/`IS_WSL`)
|
|
18
|
+
- Hostname-based CONFIG_DIR resolution (4 machines, PWD-based fallback on Windows)
|
|
19
|
+
- `get_config_dest()` — 50+ file mappings (source → destination per platform/host)
|
|
20
|
+
- `get_validation_func()` — Maps files to validators (json→jq, yaml→yq, plist→plutil, shell→zsh -n)
|
|
21
|
+
- `safe_copy()` — Validate → backup (timestamped, 5 max) → copy. Returns 0 on error for graceful continuation.
|
|
22
|
+
- Platform transformations: MCP configs (Mac→Windows path/command transforms), Cursor settings (strip Mac-only keys)
|
|
23
|
+
|
|
24
|
+
**push-configs.zsh** — Deploy repo → system:
|
|
25
|
+
- Iterates all config files, applies platform guards and host-specific routing
|
|
26
|
+
- Special handling: Claude dirs (commands/templates/scripts with stale cleanup), MCP merge into .claude.json (preserves OAuth/state), Windows dual-deploy (WSL + native paths)
|
|
27
|
+
- Zsh theme discovery, IDE extension reporting
|
|
28
|
+
|
|
29
|
+
**pull-configs.zsh** — Backup system → repo:
|
|
30
|
+
- Reverse of push, with key restriction: never pulls Cursor/MCP configs on Windows (Mac is source of truth)
|
|
31
|
+
- MCP pull extracts mcpServers from .claude.json, replaces CONFIG_DIR with `__CONFIG_DIR__` placeholder
|
|
32
|
+
- Splits host-specific MCP servers to separate files
|
|
33
|
+
|
|
34
|
+
### Machine Registry
|
|
35
|
+
|
|
36
|
+
| Machine | CONFIG_DIR | Git Config | SSH Config | Notes |
|
|
37
|
+
|---------|-----------|-----------|-----------|-------|
|
|
38
|
+
| mikmac | `~/Dropbox/dev/configs` | personal | config | Mac Studio, primary dev |
|
|
39
|
+
| mikbook | `~/Dropbox/mikbook/dev/configs` | personal | config | MacBook |
|
|
40
|
+
| duplo | `~/Dropbox/duplo/dev/chiefmikey/configs` | work | config.duplo | Work Mac, has alias-d.zsh |
|
|
41
|
+
| mikpc | `~/Dropbox/mikpc/dev/configs` | personal | config.mikpc | WSL, NTFS quirks, dual-deploy |
|
|
42
|
+
|
|
43
|
+
### Shell System (`shell/`)
|
|
44
|
+
|
|
45
|
+
**Load order** (.zshrc entry point):
|
|
46
|
+
1. `variables.zsh` — Platform detection, Homebrew, paths, SSH agent, Node memory
|
|
47
|
+
2. `options.zsh` — History (100K), AUTO_CD, RM_STAR_WAIT, completion behavior
|
|
48
|
+
3. `completion.zsh` — Docker completions, 24h compinit cache, zstyle (menu, case-insensitive)
|
|
49
|
+
4. `keybindings.zsh` — Vim-style history search, word boundaries (`WORDCHARS='_-'`)
|
|
50
|
+
5. `plugins.zsh` — p10k, fzf, zoxide, bat, autosuggestions, syntax-highlighting (Homebrew→ohmy→/usr/share fallback)
|
|
51
|
+
6. `functions.zsh` — Hash dirs (~dev, ~configs), directory stack, precmd title, direnv
|
|
52
|
+
7. `alias.zsh` — Dispatcher loading 8 category files + conditional duplo aliases
|
|
53
|
+
|
|
54
|
+
**Alias categories** (100+ total aliases):
|
|
55
|
+
- `system.zsh` — Navigation (dev, configs, scripts), editors, sync, upgrade, Docker cleanup
|
|
56
|
+
- `git.zsh` — gs, push, goop, mm/mms/md, pullr/pullm, pushf, sync workflows
|
|
57
|
+
- `development.zsh` — Claude (c, cr, cs), Node (n, nl, nvm lazy-load), Python (py, envy), Ollama AI (ai, aic, air), QMK keyboard
|
|
58
|
+
- `network.zsh` — SSH/mosh/scp aliases for all machines + Raspberry Pi + CloudRock
|
|
59
|
+
- `github-functions.zsh` — gh-update-prs (interactive PR management), gh-tags (release management)
|
|
60
|
+
- `wolfe-server.zsh` — Plex media rsync
|
|
61
|
+
- `environment.zsh` — Secrets loading, ASKPASS
|
|
62
|
+
- `path.zsh` — PATH ordering (Homebrew→GNU→Java→pyenv→dotnet)
|
|
63
|
+
|
|
64
|
+
**Duplo-only** (`alias-d.zsh`): AWS JIT access (jaws), deployment (duplo-deploy), RDP/SSM sessions, bulk Windows Update automation, Kubernetes/Terraform
|
|
65
|
+
|
|
66
|
+
**PowerShell** (`powershell/`): Windows native GPU/game debugging (gpu-info, crash-logs, debug-summary)
|
|
67
|
+
|
|
68
|
+
### Claude Code Config (`claude/`)
|
|
69
|
+
|
|
70
|
+
**Permission model**: `bypassPermissions` + deny list (25 blocked commands). Only deny rules work reliably in bypass mode.
|
|
71
|
+
|
|
72
|
+
**Hooks**: Post-tool-use auto-formatting (Prettier for TS/JS/JSON/CSS, Ruff for Python)
|
|
73
|
+
|
|
74
|
+
**Statusline**: Custom script showing model, user@host, git branch, context %, cache %, tokens, duration, cost, lines changed
|
|
75
|
+
|
|
76
|
+
**Command suite** (38 slash commands):
|
|
77
|
+
- Orchestration: `/partymode` (full autopilot), `/prep` (research+context+plan), `/go` (execute plans)
|
|
78
|
+
- Documentation: `/research`, `/context`, `/plans`, `/spike`, `/incident`, `/handoff`, `/retro`
|
|
79
|
+
- Action: `/fix-and-test`, `/review`, `/review-pr`, `/guard`, `/ship`, `/ship-prod`
|
|
80
|
+
- Utility: `/morning`, `/dash`, `/sync`, `/push-sync`, `/commit`, `/push`, `/pr`
|
|
81
|
+
- Machine-specific: `/mikpc`, `/duplo`, `/games`
|
|
82
|
+
|
|
83
|
+
**Key design patterns**:
|
|
84
|
+
- Plans track `_LastCompletedStep_` for resumability
|
|
85
|
+
- Status markers (`PENDING`/`IN PROGRESS`/`COMPLETED`) for agent awareness
|
|
86
|
+
- All doc-consuming commands verify staleness against git log
|
|
87
|
+
- Subagent delegation with model selection (Haiku for mechanical, Sonnet for reasoning)
|
|
88
|
+
|
|
89
|
+
**MCP servers**: 10 on Mac (GitHub, Docker, memory, context7, MongoDB, Playwright, Terraform, Notion, AWS, Kubernetes), host-specific additions via `mcp-servers.{HOST}.json`
|
|
90
|
+
|
|
91
|
+
### Docker & AI Stack (`docker/`, `scripts/ai/`)
|
|
92
|
+
|
|
93
|
+
**AI compute on mikpc** (RTX 5090):
|
|
94
|
+
- Speaches :8000 (Whisper STT + Kokoro TTS)
|
|
95
|
+
- ComfyUI :8188 (FLUX.1 image gen)
|
|
96
|
+
- ACE-Step :7860 (music gen)
|
|
97
|
+
- Ollama :11434 (systemd, not Docker)
|
|
98
|
+
|
|
99
|
+
**Web UIs on wolfe-server** (separate repo):
|
|
100
|
+
- Open WebUI :3003 (chat.wolfe.family)
|
|
101
|
+
- Perplexica :3002 (search.wolfe.family)
|
|
102
|
+
- n8n :5678 (n8n.wolfe.family)
|
|
103
|
+
- SearXNG :4000 (internal)
|
|
104
|
+
- Qdrant :6333 (internal)
|
|
105
|
+
|
|
106
|
+
**Cross-machine**: LAN IP 192.168.0.5 (Tailscale ACL blocks tag:wolfe). WSL port proxy (`fix-ai-proxy.sh`) needed after restart.
|
|
107
|
+
|
|
108
|
+
**Docker cleanup**: `docker-cleanup.sh` (smart, preserves running containers) + `docker-cleanup-manage.sh` (weekly cron)
|
|
109
|
+
|
|
110
|
+
**MCP wrappers**: Cross-platform launcher pattern. Mac uses .sh, Windows uses .ps1. Dynamic CONFIG_DIR resolution with multi-machine fallbacks.
|
|
111
|
+
|
|
112
|
+
## Patterns & Conventions
|
|
113
|
+
|
|
114
|
+
1. **Graceful failures** — `set -uo pipefail` without `set -e`. safe_copy returns 0 on error.
|
|
115
|
+
2. **Hostname-based routing** — CONFIG_DIR, git config, SSH config, alias loading all keyed on hostname.
|
|
116
|
+
3. **Mac is source of truth** — Cursor/MCP never pulled from Windows. Windows gets transformed copies.
|
|
117
|
+
4. **Backup rotation** — 5 timestamped backups per file, oldest auto-removed.
|
|
118
|
+
5. **Validation before copy** — JSON/YAML/plist/shell syntax checked before deployment.
|
|
119
|
+
6. **Stale file cleanup** — Claude commands/templates/scripts dirs remove files not in source.
|
|
120
|
+
7. **MCP merge, not overwrite** — .claude.json mcpServers key updated, other keys preserved.
|
|
121
|
+
8. **Platform guards** — IS_MAC/IS_WINDOWS booleans gate platform-specific logic.
|
|
122
|
+
9. **CONFIG_DIR placeholder** — `__CONFIG_DIR__` in mcp-servers.json substituted at push time.
|
|
123
|
+
10. **Lazy loading** — NVM only loaded when first invoked (shell startup performance).
|
|
124
|
+
|
|
125
|
+
## Dependencies
|
|
126
|
+
|
|
127
|
+
- **Required**: zsh, git, jq (JSON transforms)
|
|
128
|
+
- **Recommended**: yq (YAML validation), plutil (plist, Mac-only), eza (ls replacement), fzf, zoxide, bat, glow
|
|
129
|
+
- **Node tools**: nvm, npx (MCP servers)
|
|
130
|
+
- **Python tools**: pyenv, uv/uvx (MCP servers)
|
|
131
|
+
- **Mac-specific**: Homebrew, 1Password SSH agent
|
|
132
|
+
- **Docker**: Docker CE on mikpc (with NVIDIA Container Toolkit), Docker Desktop on Mac
|
|
133
|
+
|
|
134
|
+
## Gotchas
|
|
135
|
+
|
|
136
|
+
1. duplo CONFIG_DIR is `chiefmikey/configs` not just `configs`
|
|
137
|
+
2. Windows backups go to `~/.config/config-backups` (NTFS/Dropbox issues)
|
|
138
|
+
3. WINDOWS_USER hardcoded to "wolfe"
|
|
139
|
+
4. Port 3000 taken by AdGuard on wolfe-server — Open WebUI uses 3003
|
|
140
|
+
5. WSL IP changes on restart — must run fix-ai-proxy.sh
|
|
141
|
+
6. Perplexica config resets on restart — run configure.sh
|
|
142
|
+
7. n8n data dirs need `chown 1000:1000`
|
|
143
|
+
8. SCP broken on mikpc — use rsync
|
|
144
|
+
9. Tailscale ACL blocks tag:wolfe from accessing other devices
|
|
145
|
+
10. `docker compose up -d` doesn't recreate on .env changes — need `--force-recreate`
|
|
146
|
+
|
|
147
|
+
## Open Questions
|
|
148
|
+
|
|
149
|
+
- Should Tailscale ACL be fixed to allow tag:wolfe? Currently using LAN IP workaround.
|
|
150
|
+
- Perplexica config persistence — could mount config volume instead of post-start script.
|
|
151
|
+
- MCP registry.yaml and config.yaml/tools.yaml are empty — are these needed or auto-populated?
|
|
152
|
+
- ~~`scripts/input/` was legacy dead code — removed 2026-03-02~~
|
|
File without changes
|