shipwright-cli 2.0.0 → 2.1.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/README.md +160 -72
- package/completions/_shipwright +59 -7
- package/completions/shipwright.bash +24 -4
- package/completions/shipwright.fish +80 -2
- package/dashboard/server.ts +208 -0
- package/docs/tmux-research/TMUX-ARCHITECTURE.md +567 -0
- package/docs/tmux-research/TMUX-AUDIT.md +925 -0
- package/docs/tmux-research/TMUX-BEST-PRACTICES-2025-2026.md +829 -0
- package/docs/tmux-research/TMUX-QUICK-REFERENCE.md +543 -0
- package/docs/tmux-research/TMUX-RESEARCH-INDEX.md +438 -0
- package/package.json +2 -2
- package/scripts/lib/helpers.sh +7 -0
- package/scripts/sw +116 -2
- package/scripts/sw-activity.sh +1 -1
- package/scripts/sw-adaptive.sh +1 -1
- package/scripts/sw-adversarial.sh +1 -1
- package/scripts/sw-architecture-enforcer.sh +1 -1
- package/scripts/sw-auth.sh +1 -1
- package/scripts/sw-autonomous.sh +128 -38
- package/scripts/sw-changelog.sh +1 -1
- package/scripts/sw-checkpoint.sh +1 -1
- package/scripts/sw-ci.sh +1 -1
- package/scripts/sw-cleanup.sh +1 -1
- package/scripts/sw-code-review.sh +62 -1
- package/scripts/sw-connect.sh +1 -1
- package/scripts/sw-context.sh +1 -1
- package/scripts/sw-cost.sh +44 -3
- package/scripts/sw-daemon.sh +155 -27
- package/scripts/sw-dashboard.sh +1 -1
- package/scripts/sw-db.sh +958 -118
- package/scripts/sw-decompose.sh +1 -1
- package/scripts/sw-deps.sh +1 -1
- package/scripts/sw-developer-simulation.sh +1 -1
- package/scripts/sw-discovery.sh +1 -1
- package/scripts/sw-docs-agent.sh +1 -1
- package/scripts/sw-docs.sh +1 -1
- package/scripts/sw-doctor.sh +49 -1
- package/scripts/sw-dora.sh +1 -1
- package/scripts/sw-durable.sh +1 -1
- package/scripts/sw-e2e-orchestrator.sh +1 -1
- package/scripts/sw-eventbus.sh +1 -1
- package/scripts/sw-feedback.sh +23 -15
- package/scripts/sw-fix.sh +1 -1
- package/scripts/sw-fleet-discover.sh +1 -1
- package/scripts/sw-fleet-viz.sh +1 -1
- package/scripts/sw-fleet.sh +1 -1
- package/scripts/sw-github-app.sh +1 -1
- package/scripts/sw-github-checks.sh +4 -4
- package/scripts/sw-github-deploy.sh +1 -1
- package/scripts/sw-github-graphql.sh +1 -1
- package/scripts/sw-guild.sh +1 -1
- package/scripts/sw-heartbeat.sh +1 -1
- package/scripts/sw-hygiene.sh +1 -1
- package/scripts/sw-incident.sh +45 -6
- package/scripts/sw-init.sh +150 -24
- package/scripts/sw-instrument.sh +1 -1
- package/scripts/sw-intelligence.sh +1 -1
- package/scripts/sw-jira.sh +1 -1
- package/scripts/sw-launchd.sh +1 -1
- package/scripts/sw-linear.sh +1 -1
- package/scripts/sw-logs.sh +1 -1
- package/scripts/sw-loop.sh +204 -19
- package/scripts/sw-memory.sh +18 -1
- package/scripts/sw-mission-control.sh +1 -1
- package/scripts/sw-model-router.sh +1 -1
- package/scripts/sw-otel.sh +1 -1
- package/scripts/sw-oversight.sh +76 -1
- package/scripts/sw-pipeline-composer.sh +1 -1
- package/scripts/sw-pipeline-vitals.sh +1 -1
- package/scripts/sw-pipeline.sh +261 -12
- package/scripts/sw-pm.sh +70 -5
- package/scripts/sw-pr-lifecycle.sh +1 -1
- package/scripts/sw-predictive.sh +8 -1
- package/scripts/sw-prep.sh +1 -1
- package/scripts/sw-ps.sh +1 -1
- package/scripts/sw-public-dashboard.sh +1 -1
- package/scripts/sw-quality.sh +1 -1
- package/scripts/sw-reaper.sh +1 -1
- package/scripts/sw-recruit.sh +1853 -178
- package/scripts/sw-regression.sh +1 -1
- package/scripts/sw-release-manager.sh +1 -1
- package/scripts/sw-release.sh +1 -1
- package/scripts/sw-remote.sh +1 -1
- package/scripts/sw-replay.sh +1 -1
- package/scripts/sw-retro.sh +1 -1
- package/scripts/sw-scale.sh +1 -1
- package/scripts/sw-security-audit.sh +1 -1
- package/scripts/sw-self-optimize.sh +1 -1
- package/scripts/sw-session.sh +1 -1
- package/scripts/sw-setup.sh +263 -127
- package/scripts/sw-standup.sh +1 -1
- package/scripts/sw-status.sh +44 -2
- package/scripts/sw-strategic.sh +189 -41
- package/scripts/sw-stream.sh +1 -1
- package/scripts/sw-swarm.sh +42 -5
- package/scripts/sw-team-stages.sh +1 -1
- package/scripts/sw-templates.sh +4 -4
- package/scripts/sw-testgen.sh +66 -15
- package/scripts/sw-tmux-pipeline.sh +1 -1
- package/scripts/sw-tmux-role-color.sh +58 -0
- package/scripts/sw-tmux-status.sh +128 -0
- package/scripts/sw-tmux.sh +1 -1
- package/scripts/sw-trace.sh +1 -1
- package/scripts/sw-tracker.sh +1 -1
- package/scripts/sw-triage.sh +61 -37
- package/scripts/sw-upgrade.sh +1 -1
- package/scripts/sw-ux.sh +1 -1
- package/scripts/sw-webhook.sh +1 -1
- package/scripts/sw-widgets.sh +1 -1
- package/scripts/sw-worktree.sh +1 -1
- package/templates/pipelines/autonomous.json +2 -2
- package/tmux/shipwright-overlay.conf +35 -17
- package/tmux/tmux.conf +23 -21
|
@@ -0,0 +1,567 @@
|
|
|
1
|
+
# tmux Architecture & Integration Patterns for 2025-2026
|
|
2
|
+
|
|
3
|
+
## 1. Core tmux Architecture
|
|
4
|
+
|
|
5
|
+
```
|
|
6
|
+
┌─────────────────────────────────────────────────────────────────┐
|
|
7
|
+
│ tmux Server (daemon) │
|
|
8
|
+
│ │
|
|
9
|
+
│ ┌──────────────────────────────────────────────────────────┐ │
|
|
10
|
+
│ │ Session 1 (development) │ │
|
|
11
|
+
│ │ ┌──────────────┬──────────────┬──────────────┐ │ │
|
|
12
|
+
│ │ │ Window 1 │ Window 2 │ Window 3 │ │ │
|
|
13
|
+
│ │ │ (editor) │ (tests) │ (logs) │ │ │
|
|
14
|
+
│ │ │ ┌──┬──┐ │ ┌────────┐ │ ┌────────┐ │ │ │
|
|
15
|
+
│ │ │ │P1│P2│ │ │ P3 │ │ │ P4 │ │ │ │
|
|
16
|
+
│ │ │ └──┴──┘ │ └────────┘ │ └────────┘ │ │ │
|
|
17
|
+
│ │ └──────────────┴──────────────┴──────────────┘ │ │
|
|
18
|
+
│ │ │ │
|
|
19
|
+
│ │ Status Line: [session_name] [1:editor] [2:tests] [3:logs] │ │
|
|
20
|
+
│ └──────────────────────────────────────────────────────────┘ │
|
|
21
|
+
│ │
|
|
22
|
+
│ ┌──────────────────────────────────────────────────────────┐ │
|
|
23
|
+
│ │ Session 2 (agents) │ │
|
|
24
|
+
│ │ ┌──────────────┬──────────────┬──────────────┐ │ │
|
|
25
|
+
│ │ │ Orchestrator │ Agent (API) │ Agent (UI) │ │ │
|
|
26
|
+
│ │ │ ┌────────┐ │ ┌────────┐ │ ┌────────┐ │ │ │
|
|
27
|
+
│ │ │ │Status │ │ │Claude │ │ │Claude │ │ │ │
|
|
28
|
+
│ │ │ └────────┘ │ └────────┘ │ └────────┘ │ │ │
|
|
29
|
+
│ │ └──────────────┴──────────────┴──────────────┘ │ │
|
|
30
|
+
│ └──────────────────────────────────────────────────────────┘ │
|
|
31
|
+
│ │
|
|
32
|
+
└─────────────────────────────────────────────────────────────────┘
|
|
33
|
+
│ │ │
|
|
34
|
+
├─ $TMUX socket (localhost)
|
|
35
|
+
├─ Events (hooks, resize, key bindings)
|
|
36
|
+
└─ Clipboard (OSC 52, system integration)
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
## 2. Modern tmux + Neovim + AI Integration
|
|
42
|
+
|
|
43
|
+
```
|
|
44
|
+
┌──────────────────────────────────────────────────────────────────────────┐
|
|
45
|
+
│ Developer Workstation │
|
|
46
|
+
│ │
|
|
47
|
+
│ ┌──────────────────────────────────────────────────────────────────┐ │
|
|
48
|
+
│ │ tmux Session: multi-agent-dev │ │
|
|
49
|
+
│ │ │ │
|
|
50
|
+
│ │ Window 1: editor-vim Window 2: claude-agent-1 │ │
|
|
51
|
+
│ │ ┌────────────────────────────┐ ┌────────────────────────┐ │ │
|
|
52
|
+
│ │ │ Neovim (Main Workspace) │ │ Claude Code REPL │ │ │
|
|
53
|
+
│ │ │ │ │ │ │ │
|
|
54
|
+
│ │ │ Plugins: │ │ ~/worktree-1/backend │ │ │
|
|
55
|
+
│ │ │ - sidekick.nvim ───────────┼──>│ $ claude code │ │ │
|
|
56
|
+
│ │ │ - claude-code.nvim │ │ > (AI session) │ │ │
|
|
57
|
+
│ │ │ - vim-tmux-navigator ──────┼──>│ Connected via: │ │ │
|
|
58
|
+
│ │ │ - avante.nvim │ │ - Tmux pane ID │ │ │
|
|
59
|
+
│ │ │ - treesitter │ │ - OSC 8 links │ │ │
|
|
60
|
+
│ │ │ │ │ - Copy/paste (OSC 52) │ │ │
|
|
61
|
+
│ │ └────────────────────────────┘ └────────────────────────┘ │ │
|
|
62
|
+
│ │ │ │
|
|
63
|
+
│ │ Window 3: claude-agent-2 Window 4: monitor │ │
|
|
64
|
+
│ │ ┌────────────────────────────┐ ┌────────────────────────┐ │ │
|
|
65
|
+
│ │ │ Claude Code REPL │ │ Shipwright Vitals │ │ │
|
|
66
|
+
│ │ │ ~/worktree-2/frontend │ │ $ shipwright vitals │ │ │
|
|
67
|
+
│ │ │ $ claude code │ │ │ │ │
|
|
68
|
+
│ │ └────────────────────────────┘ │ [████████░░] 85% │ │ │
|
|
69
|
+
│ │ │ Tests: 42/45 passing │ │ │
|
|
70
|
+
│ │ │ Cost: $12.50 / $100 │ │ │
|
|
71
|
+
│ │ └────────────────────────┘ │ │
|
|
72
|
+
│ └──────────────────────────────────────────────────────────────────┘ │
|
|
73
|
+
│ │
|
|
74
|
+
│ ┌─────────────────────────────────────────────────────────────────┐ │
|
|
75
|
+
│ │ tmux Status Line │ │
|
|
76
|
+
│ │ [multi-agent-dev] 1:editor 2:claude-1 3:claude-2 4:monitor │ │
|
|
77
|
+
│ │ 18:30 (Sat) │ │
|
|
78
|
+
│ └─────────────────────────────────────────────────────────────────┘ │
|
|
79
|
+
└──────────────────────────────────────────────────────────────────────────┘
|
|
80
|
+
|
|
81
|
+
Key Interactions:
|
|
82
|
+
┌─────────────────────────────────────────────────────────────────┐
|
|
83
|
+
│ │
|
|
84
|
+
│ Ctrl-h/j/k/l → vim-tmux-navigator → Select panes/windows │
|
|
85
|
+
│ Cmd+F → sidekick.nvim → Query Claude from Vim │
|
|
86
|
+
│ Space+cf → claude-code.nvim → Send file to Claude │
|
|
87
|
+
│ Ctrl+P → display-popup → fzf file search │
|
|
88
|
+
│ Ctrl+A,r → Reload config → Hot-reload settings │
|
|
89
|
+
│ Cmd+M → Toggle mouse → Enable for pair prog │
|
|
90
|
+
│ │
|
|
91
|
+
└─────────────────────────────────────────────────────────────────┘
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
---
|
|
95
|
+
|
|
96
|
+
## 3. Shipwright + Daemon Pipeline in tmux
|
|
97
|
+
|
|
98
|
+
```
|
|
99
|
+
┌─────────────────────────────────────────────────────────────────────┐
|
|
100
|
+
│ shipwright daemon [running 4 workers] │
|
|
101
|
+
│ │
|
|
102
|
+
│ Issue Queue: [#42 bug] [#43 feat] [#44 refactor] [#45 docs] │
|
|
103
|
+
│ ↓ │
|
|
104
|
+
│ ┌─────────────────────────────────────────────────────────────┐ │
|
|
105
|
+
│ │ tmux Session: shipwright-daemon │ │
|
|
106
|
+
│ │ │ │
|
|
107
|
+
│ │ Window 1: pipeline-42 Window 2: pipeline-43 │ │
|
|
108
|
+
│ │ Status: [████████░░░] 75% Status: [████░░░░░░] 40% │ │
|
|
109
|
+
│ │ Stage: build → test Stage: intake │ │
|
|
110
|
+
│ │ ┌──────────────────────┐ ┌──────────────────────┐ │ │
|
|
111
|
+
│ │ │ git worktree: wt-42 │ │ git worktree: wt-43 │ │ │
|
|
112
|
+
│ │ │ $ cd /tmp/wt-42 │ │ $ cd /tmp/wt-43 │ │ │
|
|
113
|
+
│ │ │ $ npm test │ │ $ shipwright plan │ │ │
|
|
114
|
+
│ │ │ │ │ │ │ │
|
|
115
|
+
│ │ │ ✓ Build (2m 15s) │ │ → Planning... │ │ │
|
|
116
|
+
│ │ │ ✓ Tests (1m 40s) │ │ │ │ │
|
|
117
|
+
│ │ │ → Review (pending) │ │ │ │ │
|
|
118
|
+
│ │ └──────────────────────┘ └──────────────────────┘ │ │
|
|
119
|
+
│ │ │ │
|
|
120
|
+
│ │ Window 3: cost-monitor Window 4: memory-system │ │
|
|
121
|
+
│ │ Daily Budget: $100 / $100 ┌──────────────────────┐ │ │
|
|
122
|
+
│ │ Used This Run: │ Remembered patterns: │ │
|
|
123
|
+
│ │ - Pipeline 42: $8.50 │ • Timeout in Jest │ │
|
|
124
|
+
│ │ - Pipeline 43: $2.10 │ • DB migration issue │ │
|
|
125
|
+
│ │ - Pipeline 44: $1.80 │ • Auth handler fix │ │
|
|
126
|
+
│ │ Remaining: $87.60 └──────────────────────┘ │ │
|
|
127
|
+
│ └─────────────────────────────────────────────────────────────┘ │
|
|
128
|
+
│ │
|
|
129
|
+
│ Heartbeats: │
|
|
130
|
+
│ 42 ───╯╰─╱╲╱╲╱╲ (active, 4 pings) │
|
|
131
|
+
│ 43 ───╯╰─╱╲ ♥ (idle, waiting for approval) │
|
|
132
|
+
│ 44 ───╳ (error, max retries exceeded) │
|
|
133
|
+
│ 45 ───◇ (queued, waiting for worker slot) │
|
|
134
|
+
└─────────────────────────────────────────────────────────────────────┘
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
---
|
|
138
|
+
|
|
139
|
+
## 4. Plugin Architecture
|
|
140
|
+
|
|
141
|
+
```
|
|
142
|
+
┌─────────────────────────────────────────────────────────────────┐
|
|
143
|
+
│ tmux Core (3.2+) │
|
|
144
|
+
│ │
|
|
145
|
+
│ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ │
|
|
146
|
+
│ │ Sessions │ │ Windows │ │ Panes │ │
|
|
147
|
+
│ │ │ │ │ │ │ │
|
|
148
|
+
│ │ [attach] │ │ [new-window] │ │ [split] │ │
|
|
149
|
+
│ │ [kill] │ │ [kill] │ │ [capture] │ │
|
|
150
|
+
│ │ [rename] │ │ [rename] │ │ [send-keys] │ │
|
|
151
|
+
│ └──────────────┘ └──────────────┘ └──────────────┘ │
|
|
152
|
+
│ ↑ ↑ ↑ │
|
|
153
|
+
└─────────┼──────────────────┼──────────────────┼────────────────┘
|
|
154
|
+
│ │ │
|
|
155
|
+
┌───┴──────────────────┴──────────────────┴─────┐
|
|
156
|
+
│ │
|
|
157
|
+
│ ┌─────────────────────────────────────────┐ │
|
|
158
|
+
│ │ TPM (Plugin Manager) │ │
|
|
159
|
+
│ │ ~/.tmux/plugins/tpm/tpm │ │
|
|
160
|
+
│ │ Ctrl-I: install | Ctrl-U: update │ │
|
|
161
|
+
│ └─────────────────────────────────────────┘ │
|
|
162
|
+
│ │ │
|
|
163
|
+
└──────────────────────┼─────────────────────────┘
|
|
164
|
+
┌────────────────┼────────────────┐
|
|
165
|
+
│ │ │
|
|
166
|
+
┌────▼─────┐ ┌─────▼─────┐ ┌────▼──────┐
|
|
167
|
+
│ Essential │ │ Optional │ │ Custom │
|
|
168
|
+
│ Plugins │ │ Plugins │ │ Plugins │
|
|
169
|
+
│ │ │ │ │ │
|
|
170
|
+
│ • sensible│ │ • resurrect │ • shipwright
|
|
171
|
+
│ • yank │ │ • continuum │ • custom hooks
|
|
172
|
+
│ • nav-vim │ │ • statusline │ • theme
|
|
173
|
+
│ • prefix- │ │ • copycat │ • bindings
|
|
174
|
+
│ highlight │ • which-key │ │
|
|
175
|
+
│ │ │ │ │ │
|
|
176
|
+
└───────────┘ └───────────┘ └───────────┘
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
---
|
|
180
|
+
|
|
181
|
+
## 5. Configuration Override Hierarchy
|
|
182
|
+
|
|
183
|
+
```
|
|
184
|
+
┌────────────────────────────────────────────────────────────────┐
|
|
185
|
+
│ tmux Config Loading Order │
|
|
186
|
+
│ │
|
|
187
|
+
│ 1. Server defaults │
|
|
188
|
+
│ (hardcoded, immutable) │
|
|
189
|
+
│ ↓ │
|
|
190
|
+
│ 2. System config (/etc/tmux.conf) │
|
|
191
|
+
│ (rare, admin-managed) │
|
|
192
|
+
│ ↓ │
|
|
193
|
+
│ 3. User config (~/.tmux.conf) │
|
|
194
|
+
│ (core configuration, rarely edited) │
|
|
195
|
+
│ ↓ │
|
|
196
|
+
│ 4. Local config (~/.tmux.conf.local) ← START HERE │
|
|
197
|
+
│ (customizations, project-specific settings) │
|
|
198
|
+
│ ↓ │
|
|
199
|
+
│ 5. Runtime commands (from REPL or shell) │
|
|
200
|
+
│ (tmux set-option, tmux bind-key) │
|
|
201
|
+
│ │
|
|
202
|
+
│ ⚠️ IMPORTANT: Never edit #3 if using Oh My Tmux! │
|
|
203
|
+
│ Put all customizations in #4 (.tmux.conf.local) │
|
|
204
|
+
│ This allows upgrading core config without conflicts │
|
|
205
|
+
└────────────────────────────────────────────────────────────────┘
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
---
|
|
209
|
+
|
|
210
|
+
## 6. Hooks & Lifecycle Events
|
|
211
|
+
|
|
212
|
+
```
|
|
213
|
+
┌──────────────────────────────────────────────────────────────────┐
|
|
214
|
+
│ Session Lifecycle │
|
|
215
|
+
│ │
|
|
216
|
+
│ tmux new-session │
|
|
217
|
+
│ ↓ │
|
|
218
|
+
│ └─→ after-new-session hook │
|
|
219
|
+
│ (run custom setup: mkdir, git clone) │
|
|
220
|
+
│ ↓ │
|
|
221
|
+
│ Session active (user working) │
|
|
222
|
+
│ ↓ │
|
|
223
|
+
│ Window created │
|
|
224
|
+
│ └─→ after-new-window hook │
|
|
225
|
+
│ (rename based on directory) │
|
|
226
|
+
│ ↓ │
|
|
227
|
+
│ User types commands in panes │
|
|
228
|
+
│ ├─ session-renamed hook (triggered if user renames) │
|
|
229
|
+
│ ├─ window-linked hook (pane changes windows) │
|
|
230
|
+
│ └─ pane-mode-changed hook (enter copy-mode) │
|
|
231
|
+
│ ↓ │
|
|
232
|
+
│ Process exits in pane │
|
|
233
|
+
│ └─→ pane-exited hook │
|
|
234
|
+
│ (auto-cleanup, capture output) │
|
|
235
|
+
│ ↓ │
|
|
236
|
+
│ tmux kill-session │
|
|
237
|
+
│ ↓ │
|
|
238
|
+
│ └─→ session-closed hook │
|
|
239
|
+
│ (save state, cleanup worktrees) │
|
|
240
|
+
│ │
|
|
241
|
+
└──────────────────────────────────────────────────────────────────┘
|
|
242
|
+
|
|
243
|
+
Example hook chain for Shipwright:
|
|
244
|
+
|
|
245
|
+
after-new-session → Create git worktree
|
|
246
|
+
→ Initialize .claude/CLAUDE.md
|
|
247
|
+
→ Start memory system
|
|
248
|
+
→ Display pipeline state
|
|
249
|
+
|
|
250
|
+
window-linked → Rename window to match branch
|
|
251
|
+
→ Auto-run tests in background
|
|
252
|
+
→ Update status line
|
|
253
|
+
|
|
254
|
+
pane-exited → Capture pane output to log
|
|
255
|
+
→ Check exit code (0 = success, else fail)
|
|
256
|
+
→ Post event to heartbeat system
|
|
257
|
+
→ Trigger next pipeline stage (if gated)
|
|
258
|
+
```
|
|
259
|
+
|
|
260
|
+
---
|
|
261
|
+
|
|
262
|
+
## 7. Mouse Mode Conflict Resolution
|
|
263
|
+
|
|
264
|
+
```
|
|
265
|
+
┌────────────────────────────────────────────────────────────────┐
|
|
266
|
+
│ Mouse Mode Trade-offs (2025) │
|
|
267
|
+
│ │
|
|
268
|
+
│ MOUSE OFF (Default for AI work) │
|
|
269
|
+
│ ┌──────────────────────────────────┐ │
|
|
270
|
+
│ │ ✓ Text selection bypasses tmux │ │
|
|
271
|
+
│ │ ✓ Vim/Neovim visual mode works │ │
|
|
272
|
+
│ │ ✓ Claude Code REPL capture clear │ │
|
|
273
|
+
│ │ ✗ No point-and-click window nav │ │
|
|
274
|
+
│ │ ✗ Can't drag pane dividers │ │
|
|
275
|
+
│ │ ✗ Must use keyboard for resizing │ │
|
|
276
|
+
│ └──────────────────────────────────┘ │
|
|
277
|
+
│ │
|
|
278
|
+
│ MOUSE ON (Good for pair programming) │
|
|
279
|
+
│ ┌──────────────────────────────────┐ │
|
|
280
|
+
│ │ ✓ Click to switch panes/windows │ │
|
|
281
|
+
│ │ ✓ Drag to resize pane dividers │ │
|
|
282
|
+
│ │ ✓ Scroll wheel works in panes │ │
|
|
283
|
+
│ │ ✗ Shift+click needed to select │ │
|
|
284
|
+
│ │ text across pane boundaries │ │
|
|
285
|
+
│ │ ✗ System clipboard needs xclip │ │
|
|
286
|
+
│ │ ✗ TUI apps (Vim) get mouse events│ │
|
|
287
|
+
│ └──────────────────────────────────┘ │
|
|
288
|
+
│ │
|
|
289
|
+
│ SOLUTION: Toggle mouse with key binding │
|
|
290
|
+
│ bind m set -g mouse \; display "Mouse: #{?mouse,ON,OFF}" │
|
|
291
|
+
│ │
|
|
292
|
+
└────────────────────────────────────────────────────────────────┘
|
|
293
|
+
```
|
|
294
|
+
|
|
295
|
+
---
|
|
296
|
+
|
|
297
|
+
## 8. Copy Mode Data Flow
|
|
298
|
+
|
|
299
|
+
```
|
|
300
|
+
┌────────────────────────────────────────────────────────────────┐
|
|
301
|
+
│ Copy Mode Workflow │
|
|
302
|
+
│ │
|
|
303
|
+
│ Pane Output │
|
|
304
|
+
│ ┌──────────────────────────────────────────────────────┐ │
|
|
305
|
+
│ │ $ npm test │ │
|
|
306
|
+
│ │ PASS src/utils.test.js │ │
|
|
307
|
+
│ │ FAIL src/auth.test.js (line 42) │ │
|
|
308
|
+
│ │ ────────────────────────────────────────────────── │ │
|
|
309
|
+
│ │ Tests: 45 passed, 1 failed │ │
|
|
310
|
+
│ └──────────────────────────────────────────────────────┘ │
|
|
311
|
+
│ ↑ │
|
|
312
|
+
│ │ User: tmux prefix + [ (enter copy-mode) │
|
|
313
|
+
│ │ │
|
|
314
|
+
│ ┌──────▼──────────────────────────────────────────────┐ │
|
|
315
|
+
│ │ Copy Mode (vi-style) │ │
|
|
316
|
+
│ │ │ │
|
|
317
|
+
│ │ v = begin selection │ │
|
|
318
|
+
│ │ y = copy selection to tmux buffer │ │
|
|
319
|
+
│ │ Y = copy entire line │ │
|
|
320
|
+
│ │ H/L = start/end of line │ │
|
|
321
|
+
│ │ j/k = move down/up │ │
|
|
322
|
+
│ │ / or ? = search forward/backward │ │
|
|
323
|
+
│ │ Enter = exit copy-mode │ │
|
|
324
|
+
│ └──────────────────────────────────────────────────────┘ │
|
|
325
|
+
│ │ │
|
|
326
|
+
│ ↓ │
|
|
327
|
+
│ Selection: "Tests: 45 passed, 1 failed" │
|
|
328
|
+
│ │ │
|
|
329
|
+
│ │ User presses: y │
|
|
330
|
+
│ │ │
|
|
331
|
+
│ ├─→ copy-pipe: if-shell "%if platform=darwin" │
|
|
332
|
+
│ │ ├─→ macOS: copy-pipe-and-cancel "pbcopy" │
|
|
333
|
+
│ │ └─→ Linux: copy-pipe-and-cancel "xclip ..." │
|
|
334
|
+
│ │ │
|
|
335
|
+
│ ├─→ tmux buffer (internal clipboard) │
|
|
336
|
+
│ │ │
|
|
337
|
+
│ └─→ System clipboard (Cmd+V / Ctrl+V) │
|
|
338
|
+
│ │
|
|
339
|
+
│ Usage: Paste into Slack, Github issue, etc. │
|
|
340
|
+
│ │
|
|
341
|
+
└────────────────────────────────────────────────────────────────┘
|
|
342
|
+
```
|
|
343
|
+
|
|
344
|
+
---
|
|
345
|
+
|
|
346
|
+
## 9. Floating Popup Windows (tmux 3.2+)
|
|
347
|
+
|
|
348
|
+
```
|
|
349
|
+
┌────────────────────────────────────────────────────────────────┐
|
|
350
|
+
│ Main tmux Session (full terminal) │
|
|
351
|
+
│ │
|
|
352
|
+
│ ┌──────────────────────────────────────────────────────────┐ │
|
|
353
|
+
│ │ Neovim (editor pane) │ │
|
|
354
|
+
│ │ 1 set tabstop=2 │ │
|
|
355
|
+
│ │ 2 set expandtab │ │
|
|
356
|
+
│ │ 3 let g:copilot_enabled = v:true │ │
|
|
357
|
+
│ │ 4 │ │
|
|
358
|
+
│ │ ┌─────────────────────────────────────────────────┐ │ │
|
|
359
|
+
│ │ │ FZF Popup (Ctrl+G, display-popup) │ │ │
|
|
360
|
+
│ │ │ │ │ │
|
|
361
|
+
│ │ │ Find file: │ │ │
|
|
362
|
+
│ │ │ > │ │ │
|
|
363
|
+
│ │ │ bundle.json │ │ │
|
|
364
|
+
│ │ │ config/auth.js ← preview right │ │ │
|
|
365
|
+
│ │ │ config/db.js │ │ │
|
|
366
|
+
│ │ │ package.json │ │ │
|
|
367
|
+
│ │ │ │ │ │
|
|
368
|
+
│ │ │ Selected file: │ │ │
|
|
369
|
+
│ │ │ config/auth.js │ │ │
|
|
370
|
+
│ │ │ │ │ │
|
|
371
|
+
│ │ │ [Enter to open] │ │ │
|
|
372
|
+
│ │ └─────────────────────────────────────────────────┘ │ │
|
|
373
|
+
│ │ (User presses Enter) │ │
|
|
374
|
+
│ │ ↓ Popup closes, file opened in Neovim │ │
|
|
375
|
+
│ └──────────────────────────────────────────────────────────┘ │
|
|
376
|
+
│ │
|
|
377
|
+
│ ┌─────────────────────────────────────────────────────────┐ │
|
|
378
|
+
│ │ Git Status Popup (C-j) │ │
|
|
379
|
+
│ │ │ │
|
|
380
|
+
│ │ $ git status -sb │ │
|
|
381
|
+
│ │ ## main...upstream/main │ │
|
|
382
|
+
│ │ M config/auth.js │ │
|
|
383
|
+
│ │ ?? node_modules/.tsconfig │ │
|
|
384
|
+
│ │ │ │
|
|
385
|
+
│ │ [q to close] │ │
|
|
386
|
+
│ └─────────────────────────────────────────────────────────┘ │
|
|
387
|
+
│ │
|
|
388
|
+
│ Popup Features: │
|
|
389
|
+
│ • Floats above existing layout (doesn't reshape panes) │
|
|
390
|
+
│ • Customizable size & position: -h 50% -w 80% -x C -y S │
|
|
391
|
+
│ • Closable with Escape or q │
|
|
392
|
+
│ • Can run any shell command │
|
|
393
|
+
│ • Perfect for quick tools (fzf, git, docs) │
|
|
394
|
+
│ │
|
|
395
|
+
└────────────────────────────────────────────────────────────────┘
|
|
396
|
+
```
|
|
397
|
+
|
|
398
|
+
---
|
|
399
|
+
|
|
400
|
+
## 10. Integration Points Summary
|
|
401
|
+
|
|
402
|
+
```
|
|
403
|
+
┌───────────────────────────────────────────────────────────────────┐
|
|
404
|
+
│ Ecosystem Integration │
|
|
405
|
+
│ │
|
|
406
|
+
│ ┌─────────────┐ ┌──────────────┐ ┌──────────────┐ │
|
|
407
|
+
│ │ Shipwright │ │ Claude Code │ │ Neovim │ │
|
|
408
|
+
│ │ │ │ │ │ │ │
|
|
409
|
+
│ │ • Daemon │ │ • REPL │ │ • LSP │ │
|
|
410
|
+
│ │ • Pipeline │ │ • Agent │ │ • Plugins │ │
|
|
411
|
+
│ │ • Vitals │ │ • Memory │ │ • Keymaps │ │
|
|
412
|
+
│ │ • Cost │ │ • MCP │ │ • Snippets │ │
|
|
413
|
+
│ └──────┬──────┘ └──────┬───────┘ └──────┬───────┘ │
|
|
414
|
+
│ │ │ │ │
|
|
415
|
+
│ └────────────────┼─────────────────┘ │
|
|
416
|
+
│ │ │
|
|
417
|
+
│ ┌──────▼────────┐ │
|
|
418
|
+
│ │ tmux │ │
|
|
419
|
+
│ │ │ │
|
|
420
|
+
│ │ • Sessions │ │
|
|
421
|
+
│ │ • Windows │ │
|
|
422
|
+
│ │ • Panes │ │
|
|
423
|
+
│ │ • Hooks │ │
|
|
424
|
+
│ │ • Plugins │ │
|
|
425
|
+
│ │ • Clipboard │ │
|
|
426
|
+
│ └───────────────┘ │
|
|
427
|
+
│ │ │
|
|
428
|
+
│ ┌────────────────┼────────────────┐ │
|
|
429
|
+
│ │ │ │ │
|
|
430
|
+
│ ┌────▼────┐ ┌─────▼──────┐ ┌────▼──────┐ │
|
|
431
|
+
│ │ Terminal │ │ Git │ │ System │ │
|
|
432
|
+
│ │ │ │ │ │ │ │
|
|
433
|
+
│ │ • Colors │ │ • Worktrees│ │ • Clipboard
|
|
434
|
+
│ │ • Keys │ │ • Branches │ │ • Signals │ │
|
|
435
|
+
│ │ • Output │ │ • Status │ │ • Timing │ │
|
|
436
|
+
│ └──────────┘ └────────────┘ └───────────┘ │
|
|
437
|
+
│ │
|
|
438
|
+
│ Data Flow Example: │
|
|
439
|
+
│ ┌─────────────────────────────────────────────────────────┐ │
|
|
440
|
+
│ │ 1. User types in Neovim: ":ClaudeAsk What does this do?" │
|
|
441
|
+
│ │ 2. Neovim plugin captures context (file, cursor, diagnostics) │
|
|
442
|
+
│ │ 3. Plugin sends to Claude pane via tmux send-keys │
|
|
443
|
+
│ │ 4. Claude Code processes & responds │
|
|
444
|
+
│ │ 5. Neovim reads Claude's output from tmux pane buffer │
|
|
445
|
+
│ │ 6. Response appears in Neovim floating window │
|
|
446
|
+
│ └─────────────────────────────────────────────────────────┘ │
|
|
447
|
+
│ │
|
|
448
|
+
└───────────────────────────────────────────────────────────────────┘
|
|
449
|
+
```
|
|
450
|
+
|
|
451
|
+
---
|
|
452
|
+
|
|
453
|
+
## 11. Performance Characteristics
|
|
454
|
+
|
|
455
|
+
```
|
|
456
|
+
┌──────────────────────────────────────────────────────────────────┐
|
|
457
|
+
│ tmux Performance in 2025 (with Claude Code) │
|
|
458
|
+
│ │
|
|
459
|
+
│ Memory Usage (typical): │
|
|
460
|
+
│ ├─ Empty session ~2 MB │
|
|
461
|
+
│ ├─ + 4 panes (Vim, tests, logs, agent) ~8 MB │
|
|
462
|
+
│ ├─ + 250K scrollback history ~45 MB │
|
|
463
|
+
│ ├─ + Resurrection (saved state) ~2 MB │
|
|
464
|
+
│ └─ Total for multi-agent setup ~60 MB │
|
|
465
|
+
│ │
|
|
466
|
+
│ CPU Usage: │
|
|
467
|
+
│ ├─ Idle session <0.1% CPU │
|
|
468
|
+
│ ├─ Active with status updates ~0.5% CPU (5s intervals) │
|
|
469
|
+
│ ├─ High-throughput (Claude out) ~2-3% CPU (during output) │
|
|
470
|
+
│ ├─ Resizing panes <0.1% CPU (instant) │
|
|
471
|
+
│ └─ Note: Mostly spent in terminal rendering, not tmux logic │
|
|
472
|
+
│ │
|
|
473
|
+
│ Latency (keyboard to screen): │
|
|
474
|
+
│ ├─ Normal key input <5ms (escape-time: 0) │
|
|
475
|
+
│ ├─ Copy-mode navigation <2ms (vi bindings optimized) │
|
|
476
|
+
│ ├─ Pane switching (C-a,h) <2ms │
|
|
477
|
+
│ ├─ Status bar updates <10ms │
|
|
478
|
+
│ └─ Claude output streaming ~50ms per line (terminal I/O) │
|
|
479
|
+
│ │
|
|
480
|
+
│ Optimization Tuples: │
|
|
481
|
+
│ ┌────────────────────────────────────────────────────────┐ │
|
|
482
|
+
│ │ Feature │ Default │ Tuned for Claude │ │
|
|
483
|
+
│ │───────────────┼─────────┼────────────────────────── │ │
|
|
484
|
+
│ │ escape-time │ 500ms │ 0ms (critical) │ │
|
|
485
|
+
│ │ history-limit │ 2000 │ 250000 (high output) │ │
|
|
486
|
+
│ │ status-interval│ 15s │ 10s (reduce CPU) │ │
|
|
487
|
+
│ │ buffer-limit │ 20 │ 20 (keep as-is) │ │
|
|
488
|
+
│ │ mouse │ off │ off (AI workflows) │ │
|
|
489
|
+
│ │ allow-passthrough│off │ on (TUI compat) │ │
|
|
490
|
+
│ └────────────────────────────────────────────────────────┘ │
|
|
491
|
+
│ │
|
|
492
|
+
│ Bottlenecks: │
|
|
493
|
+
│ 1. Terminal rendering (xterm protocol) — not tmux │
|
|
494
|
+
│ 2. Pane scrollback search — use ↑/↓ not /search │
|
|
495
|
+
│ 3. Large copy operations — tmux buffer is in-memory │
|
|
496
|
+
│ 4. Many panes (>10) — CPU increases linearly │
|
|
497
|
+
│ │
|
|
498
|
+
└──────────────────────────────────────────────────────────────────┘
|
|
499
|
+
```
|
|
500
|
+
|
|
501
|
+
---
|
|
502
|
+
|
|
503
|
+
## 12. Decision Tree: Which Feature to Use
|
|
504
|
+
|
|
505
|
+
```
|
|
506
|
+
┌─────────────────────────┐
|
|
507
|
+
│ I need to accomplish... │
|
|
508
|
+
└───────────┬─────────────┘
|
|
509
|
+
│
|
|
510
|
+
┌───────────────┼───────────────┐
|
|
511
|
+
│ │ │
|
|
512
|
+
┌──────▼─────┐ ┌─────▼──────┐ ┌────▼────────┐
|
|
513
|
+
│Quick │ │Organize │ │Automate │
|
|
514
|
+
│navigation │ │large tasks │ │repetitive │
|
|
515
|
+
│ │ │ │ │tasks │
|
|
516
|
+
└──────┬──────┘ └─────┬──────┘ └────┬────────┘
|
|
517
|
+
│ │ │
|
|
518
|
+
┌─────────┼─────────┐ │ │
|
|
519
|
+
│ │ │ │ │
|
|
520
|
+
┌──▼──┐ ┌──▼──┐ ┌───▼─┐ │ │
|
|
521
|
+
│fzf │ │session
|
|
522
|
+
│ │ │switcher
|
|
523
|
+
│popup│ │ │
|
|
524
|
+
│(C-p)│ └─────┘
|
|
525
|
+
└─────┘
|
|
526
|
+
|
|
527
|
+
│
|
|
528
|
+
│ ┌──────────────────────┐
|
|
529
|
+
│ │ Organization Tool │
|
|
530
|
+
└────────▶│ │
|
|
531
|
+
│ • One session per │
|
|
532
|
+
│ project (tmuxinator)
|
|
533
|
+
│ • One window per │
|
|
534
|
+
│ agent (git worktree)
|
|
535
|
+
│ • One pane per task │
|
|
536
|
+
│ (side-by-side) │
|
|
537
|
+
└──────────────────────┘
|
|
538
|
+
|
|
539
|
+
│
|
|
540
|
+
│ ┌──────────────────────┐
|
|
541
|
+
│ │ Automation Method │
|
|
542
|
+
│ │ │
|
|
543
|
+
│ │ • Hooks: after-new-
|
|
544
|
+
│ │ session, pane-exited
|
|
545
|
+
└────────▶│ • Scripts: setup-
|
|
546
|
+
│ dev-session.sh
|
|
547
|
+
│ • send-keys: CI/CD
|
|
548
|
+
│ runner
|
|
549
|
+
│ • Keybindings: tmux
|
|
550
|
+
│ aliases
|
|
551
|
+
└──────────────────────┘
|
|
552
|
+
```
|
|
553
|
+
|
|
554
|
+
---
|
|
555
|
+
|
|
556
|
+
## Summary: Best-in-Class Integration (2025-2026)
|
|
557
|
+
|
|
558
|
+
1. **Foundation**: tmux 3.2+ with Oh My Tmux! configuration
|
|
559
|
+
2. **Plugins**: vim-tmux-navigator + tmux-resurrect + tmux-continuum
|
|
560
|
+
3. **Editor**: Neovim with sidekick.nvim and claude-code.nvim
|
|
561
|
+
4. **AI Workflow**: git worktrees + multi-agent tmux windows
|
|
562
|
+
5. **Automation**: Hooks for lifecycle events + scripts for setup
|
|
563
|
+
6. **Performance**: escape-time=0, history=250K, status-interval=10s
|
|
564
|
+
7. **Floating Tools**: fzf popups for quick access (no pane reshaping)
|
|
565
|
+
8. **Integration**: OSC 52 clipboard + focus-events + allow-passthrough
|
|
566
|
+
|
|
567
|
+
This stack enables **persistent, multi-agent development environments** with seamless Neovim + Claude Code integration, optimized for high-throughput AI-assisted workflows.
|