shipwright-cli 1.7.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/LICENSE +21 -0
- package/README.md +926 -0
- package/claude-code/CLAUDE.md.shipwright +125 -0
- package/claude-code/hooks/notify-idle.sh +35 -0
- package/claude-code/hooks/pre-compact-save.sh +57 -0
- package/claude-code/hooks/task-completed.sh +170 -0
- package/claude-code/hooks/teammate-idle.sh +68 -0
- package/claude-code/settings.json.template +184 -0
- package/completions/_shipwright +140 -0
- package/completions/shipwright.bash +89 -0
- package/completions/shipwright.fish +107 -0
- package/docs/KNOWN-ISSUES.md +199 -0
- package/docs/TIPS.md +331 -0
- package/docs/definition-of-done.example.md +16 -0
- package/docs/patterns/README.md +139 -0
- package/docs/patterns/audit-loop.md +149 -0
- package/docs/patterns/bug-hunt.md +183 -0
- package/docs/patterns/feature-implementation.md +159 -0
- package/docs/patterns/refactoring.md +183 -0
- package/docs/patterns/research-exploration.md +144 -0
- package/docs/patterns/test-generation.md +173 -0
- package/package.json +49 -0
- package/scripts/adapters/docker-deploy.sh +50 -0
- package/scripts/adapters/fly-deploy.sh +41 -0
- package/scripts/adapters/iterm2-adapter.sh +122 -0
- package/scripts/adapters/railway-deploy.sh +34 -0
- package/scripts/adapters/tmux-adapter.sh +87 -0
- package/scripts/adapters/vercel-deploy.sh +35 -0
- package/scripts/adapters/wezterm-adapter.sh +103 -0
- package/scripts/cct +242 -0
- package/scripts/cct-cleanup.sh +172 -0
- package/scripts/cct-cost.sh +590 -0
- package/scripts/cct-daemon.sh +3189 -0
- package/scripts/cct-doctor.sh +328 -0
- package/scripts/cct-fix.sh +478 -0
- package/scripts/cct-fleet.sh +904 -0
- package/scripts/cct-init.sh +282 -0
- package/scripts/cct-logs.sh +273 -0
- package/scripts/cct-loop.sh +1332 -0
- package/scripts/cct-memory.sh +1148 -0
- package/scripts/cct-pipeline.sh +3844 -0
- package/scripts/cct-prep.sh +1352 -0
- package/scripts/cct-ps.sh +168 -0
- package/scripts/cct-reaper.sh +390 -0
- package/scripts/cct-session.sh +284 -0
- package/scripts/cct-status.sh +169 -0
- package/scripts/cct-templates.sh +242 -0
- package/scripts/cct-upgrade.sh +422 -0
- package/scripts/cct-worktree.sh +405 -0
- package/scripts/postinstall.mjs +96 -0
- package/templates/pipelines/autonomous.json +71 -0
- package/templates/pipelines/cost-aware.json +95 -0
- package/templates/pipelines/deployed.json +79 -0
- package/templates/pipelines/enterprise.json +114 -0
- package/templates/pipelines/fast.json +63 -0
- package/templates/pipelines/full.json +104 -0
- package/templates/pipelines/hotfix.json +63 -0
- package/templates/pipelines/standard.json +91 -0
- package/tmux/claude-teams-overlay.conf +109 -0
- package/tmux/templates/architecture.json +19 -0
- package/tmux/templates/bug-fix.json +24 -0
- package/tmux/templates/code-review.json +24 -0
- package/tmux/templates/devops.json +19 -0
- package/tmux/templates/documentation.json +19 -0
- package/tmux/templates/exploration.json +19 -0
- package/tmux/templates/feature-dev.json +24 -0
- package/tmux/templates/full-stack.json +24 -0
- package/tmux/templates/migration.json +24 -0
- package/tmux/templates/refactor.json +19 -0
- package/tmux/templates/security-audit.json +24 -0
- package/tmux/templates/testing.json +24 -0
- package/tmux/tmux.conf +167 -0
package/README.md
ADDED
|
@@ -0,0 +1,926 @@
|
|
|
1
|
+
# Shipwright
|
|
2
|
+
|
|
3
|
+
> Orchestrate autonomous Claude Code agent teams — delivery pipeline, fleet operations, DORA metrics, persistent memory, cost intelligence, and repo preparation.
|
|
4
|
+
|
|
5
|
+
[](https://github.com/sethdford/shipwright/releases)  
|
|
6
|
+
|
|
7
|
+
<p align="center">
|
|
8
|
+
<img src="https://vhs.charm.sh/vhs-189lBjHtyH2su8TuxiPQhn.gif" alt="Shipwright CLI demo — version, help, pipeline templates, doctor" width="800" />
|
|
9
|
+
</p>
|
|
10
|
+
|
|
11
|
+
Full docs at [sethdford.github.io/shipwright](https://sethdford.github.io/shipwright)
|
|
12
|
+
|
|
13
|
+
## Install
|
|
14
|
+
|
|
15
|
+
**npm** (recommended)
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
npm install -g shipwright-cli
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
**curl**
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
curl -fsSL https://raw.githubusercontent.com/sethdford/shipwright/main/scripts/install-remote.sh | sh
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
**Homebrew**
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
brew install sethdford/shipwright/shipwright
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
**From source**
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
git clone https://github.com/sethdford/shipwright.git
|
|
37
|
+
cd shipwright && ./install.sh
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## What's This?
|
|
41
|
+
|
|
42
|
+
Claude Code's **agent teams** feature lets you spawn multiple AI agents that work in parallel on different parts of a task — one on backend, one on frontend, one writing tests, etc. When you run Claude Code inside tmux, each agent gets its own pane so you can watch them all work simultaneously.
|
|
43
|
+
|
|
44
|
+
Shipwright packages a complete setup:
|
|
45
|
+
|
|
46
|
+
- **Premium dark tmux theme** with agent-aware pane borders
|
|
47
|
+
- **`shipwright` CLI** (also `sw` or `cct`) for managing team sessions, templates, and autonomous loops
|
|
48
|
+
- **Quality gate hooks** that block agents until code passes checks
|
|
49
|
+
- **Continuous agent loop** (`shipwright loop`) for autonomous multi-iteration development
|
|
50
|
+
- **Delivery pipeline** (`shipwright pipeline`) for full idea-to-PR automation
|
|
51
|
+
- **Autonomous daemon** (`shipwright daemon`) for GitHub issue watching and auto-delivery
|
|
52
|
+
- **Fleet operations** (`shipwright fleet`) for multi-repo daemon orchestration
|
|
53
|
+
- **Bulk fix** (`shipwright fix`) for applying the same fix across multiple repos
|
|
54
|
+
- **Persistent memory** (`shipwright memory`) for cross-pipeline learning and context injection
|
|
55
|
+
- **Cost intelligence** (`shipwright cost`) for token tracking, budgets, and model routing
|
|
56
|
+
- **DORA metrics** (`shipwright daemon metrics`) for engineering performance tracking
|
|
57
|
+
- **Repo preparation** (`shipwright prep`) for generating agent-ready `.claude/` configs
|
|
58
|
+
- **Deploy adapters** for Vercel, Fly.io, Railway, and Docker
|
|
59
|
+
- **Layout presets** that give the leader pane 60-65% of screen space
|
|
60
|
+
- **One-command setup** via `shipwright init`
|
|
61
|
+
|
|
62
|
+
## Prerequisites
|
|
63
|
+
|
|
64
|
+
| Requirement | Version | Notes |
|
|
65
|
+
|-------------|---------|-------|
|
|
66
|
+
| **tmux** | 3.2+ (tested on 3.6a) | `brew install tmux` on macOS |
|
|
67
|
+
| **jq** | any | `brew install jq` — JSON parsing for templates |
|
|
68
|
+
| **Claude Code CLI** | latest | `npm install -g @anthropic-ai/claude-code` |
|
|
69
|
+
| **Node.js** | 20+ | For hooks |
|
|
70
|
+
| **Git** | any | For installation |
|
|
71
|
+
| **Terminal** | iTerm2, Alacritty, Kitty, WezTerm | See note below |
|
|
72
|
+
|
|
73
|
+
> **Terminal compatibility:** Split-pane agent teams only work in real terminal emulators. **VS Code's integrated terminal and Ghostty are not supported** — they lack the tmux integration needed for agent pane spawning. See [Known Issues](docs/KNOWN-ISSUES.md) for details.
|
|
74
|
+
|
|
75
|
+
## Quick Start
|
|
76
|
+
|
|
77
|
+
**Option A: One-command setup (just tmux config, no prompts)**
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
git clone https://github.com/sethdford/shipwright.git
|
|
81
|
+
cd shipwright
|
|
82
|
+
shipwright init
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
**Option B: Full interactive install (tmux + settings + hooks + CLI)**
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
git clone https://github.com/sethdford/shipwright.git
|
|
89
|
+
cd shipwright
|
|
90
|
+
./install.sh
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
Then start a tmux session and launch Claude Code:
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
tmux new -s dev
|
|
97
|
+
claude
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
## What's Included
|
|
101
|
+
|
|
102
|
+
```
|
|
103
|
+
shipwright/
|
|
104
|
+
├── tmux/
|
|
105
|
+
│ ├── tmux.conf # Full tmux config with premium dark theme
|
|
106
|
+
│ ├── claude-teams-overlay.conf # Agent-aware pane styling, color hooks & keybindings
|
|
107
|
+
│ └── templates/ # 12 team composition templates (full SDLC)
|
|
108
|
+
│ ├── feature-dev.json # Backend + frontend + tests (3 agents)
|
|
109
|
+
│ ├── full-stack.json # API + database + UI (3 agents)
|
|
110
|
+
│ ├── bug-fix.json # Reproducer + fixer + verifier (3 agents)
|
|
111
|
+
│ ├── code-review.json # Quality + security + coverage (3 agents)
|
|
112
|
+
│ ├── security-audit.json # Code + deps + config (3 agents)
|
|
113
|
+
│ ├── testing.json # Unit + integration + e2e (3 agents)
|
|
114
|
+
│ ├── migration.json # Schema + adapter + rollback (3 agents)
|
|
115
|
+
│ ├── refactor.json # Refactor + consumers (2 agents)
|
|
116
|
+
│ ├── documentation.json # API docs + guides (2 agents)
|
|
117
|
+
│ ├── devops.json # Pipeline + infrastructure (2 agents)
|
|
118
|
+
│ ├── architecture.json # Researcher + spec writer (2 agents)
|
|
119
|
+
│ └── exploration.json # Explorer + synthesizer (2 agents)
|
|
120
|
+
├── templates/
|
|
121
|
+
│ └── pipelines/ # 8 delivery pipeline templates
|
|
122
|
+
│ ├── standard.json # Feature pipeline (plan + review gates)
|
|
123
|
+
│ ├── fast.json # Quick fixes (all auto, no gates)
|
|
124
|
+
│ ├── full.json # Full deployment (all stages)
|
|
125
|
+
│ ├── hotfix.json # Urgent fixes (all auto, minimal)
|
|
126
|
+
│ ├── autonomous.json # Daemon-driven (fully autonomous)
|
|
127
|
+
│ ├── enterprise.json # Maximum safety (all gates on approve, auto-rollback)
|
|
128
|
+
│ ├── cost-aware.json # Budget limits, model routing (haiku→sonnet→opus)
|
|
129
|
+
│ └── deployed.json # Full autonomous + deploy + validate + monitor
|
|
130
|
+
├── completions/ # Shell tab completions
|
|
131
|
+
│ ├── shipwright.bash # Bash completions
|
|
132
|
+
│ ├── _shipwright # Zsh completions
|
|
133
|
+
│ └── shipwright.fish # Fish completions
|
|
134
|
+
├── claude-code/
|
|
135
|
+
│ ├── settings.json.template # Claude Code settings with teams + hooks
|
|
136
|
+
│ └── hooks/
|
|
137
|
+
│ ├── teammate-idle.sh # Quality gate: typecheck before idle
|
|
138
|
+
│ ├── task-completed.sh # Quality gate: lint+test before done
|
|
139
|
+
│ ├── notify-idle.sh # Desktop notification on idle
|
|
140
|
+
│ └── pre-compact-save.sh # Save context before compaction
|
|
141
|
+
├── scripts/
|
|
142
|
+
│ ├── cct # CLI router (shipwright/sw/cct)
|
|
143
|
+
│ ├── cct-init.sh # One-command tmux setup (no prompts)
|
|
144
|
+
│ ├── cct-session.sh # Create team sessions from templates
|
|
145
|
+
│ ├── cct-loop.sh # Continuous autonomous agent loop
|
|
146
|
+
│ ├── cct-pipeline.sh # Full delivery pipeline (idea → PR)
|
|
147
|
+
│ ├── cct-daemon.sh # Autonomous issue watcher + metrics
|
|
148
|
+
│ ├── cct-fleet.sh # Multi-repo daemon orchestrator
|
|
149
|
+
│ ├── cct-fix.sh # Bulk fix across repos
|
|
150
|
+
│ ├── cct-memory.sh # Persistent learning & context system
|
|
151
|
+
│ ├── cct-cost.sh # Token usage & cost intelligence
|
|
152
|
+
│ ├── cct-prep.sh # Repo preparation tool
|
|
153
|
+
│ ├── cct-doctor.sh # Validate setup and diagnose issues
|
|
154
|
+
│ ├── install-completions.sh # Shell completion installer
|
|
155
|
+
│ ├── adapters/ # Deploy platform adapters
|
|
156
|
+
│ │ ├── vercel-deploy.sh # Vercel deploy adapter
|
|
157
|
+
│ │ ├── fly-deploy.sh # Fly.io deploy adapter
|
|
158
|
+
│ │ ├── railway-deploy.sh # Railway deploy adapter
|
|
159
|
+
│ │ └── docker-deploy.sh # Docker deploy adapter
|
|
160
|
+
│ └── ... # status, ps, logs, cleanup, upgrade, worktree, reaper
|
|
161
|
+
├── docs/
|
|
162
|
+
│ ├── KNOWN-ISSUES.md # Tracked bugs with workarounds
|
|
163
|
+
│ └── TIPS.md # Power user tips & wave patterns
|
|
164
|
+
├── install.sh # Interactive installer
|
|
165
|
+
└── LICENSE # MIT
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
### Premium Dark Theme
|
|
169
|
+
|
|
170
|
+
Dark blue-gray background (`#1a1a2e`) with cyan accents (`#00d4ff`). The status bar shows your session name, current window, user/host, time, and date. Active pane borders light up in cyan. Agent names display in pane border headers so you always know which agent is in which pane.
|
|
171
|
+
|
|
172
|
+
### Claude Code Settings + Hooks
|
|
173
|
+
|
|
174
|
+
Pre-configured `settings.json.template` with:
|
|
175
|
+
- Agent teams enabled (`CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1`)
|
|
176
|
+
- Five production-ready hooks wired in:
|
|
177
|
+
- **TeammateIdle** — typecheck gate (blocks idle until errors fixed)
|
|
178
|
+
- **TaskCompleted** — lint + test gate (blocks completion until quality passes)
|
|
179
|
+
- **Notification** — desktop alerts when agents need attention
|
|
180
|
+
- **PreCompact** — saves git context before compaction
|
|
181
|
+
- **PostToolUse** — auto-formats files after edits
|
|
182
|
+
- Haiku subagent model for cheap lookups
|
|
183
|
+
- Auto-compact at 70% to prevent context overflow
|
|
184
|
+
- Recommended plugins for development workflows
|
|
185
|
+
|
|
186
|
+
### Quality Gate Hooks
|
|
187
|
+
|
|
188
|
+
The `teammate-idle.sh` hook runs `pnpm typecheck` (or `npx tsc --noEmit`) when an agent goes idle. If there are TypeScript errors, it blocks the idle with exit code 2, telling the agent to fix them first.
|
|
189
|
+
|
|
190
|
+
### Shipwright CLI
|
|
191
|
+
|
|
192
|
+
A full-featured CLI for managing team sessions, autonomous loops, and setup. All three aliases — `shipwright`, `sw`, and `cct` — work identically:
|
|
193
|
+
|
|
194
|
+
```bash
|
|
195
|
+
# Setup & diagnostics
|
|
196
|
+
shipwright init # One-command tmux setup (no prompts)
|
|
197
|
+
shipwright init --deploy # Setup with deploy platform configuration
|
|
198
|
+
shipwright doctor # Validate setup, check color hooks, etc.
|
|
199
|
+
shipwright upgrade --apply # Pull latest and apply updates
|
|
200
|
+
|
|
201
|
+
# Team sessions
|
|
202
|
+
shipwright session my-feature # Create a team session
|
|
203
|
+
shipwright session my-feature -t feature-dev # Use a template (3 agents, leader pane 65%)
|
|
204
|
+
sw status # Show team dashboard
|
|
205
|
+
sw ps # Show running agent processes
|
|
206
|
+
sw logs myteam --follow # Tail agent logs
|
|
207
|
+
|
|
208
|
+
# Continuous loop (autonomous agent operation)
|
|
209
|
+
shipwright loop "Build auth" --test-cmd "npm test"
|
|
210
|
+
shipwright loop "Fix bugs" --agents 3 --audit --quality-gates
|
|
211
|
+
shipwright loop --resume # Resume interrupted loop
|
|
212
|
+
|
|
213
|
+
# Delivery pipeline (idea → PR)
|
|
214
|
+
shipwright pipeline start --goal "Add auth" --pipeline standard
|
|
215
|
+
shipwright pipeline start --issue 42 --skip-gates
|
|
216
|
+
shipwright pipeline resume # Continue from last stage
|
|
217
|
+
sw pipeline status # Progress dashboard
|
|
218
|
+
|
|
219
|
+
# Autonomous daemon (watch GitHub, auto-deliver)
|
|
220
|
+
shipwright daemon start # Start issue watcher (foreground)
|
|
221
|
+
shipwright daemon start --detach # Start in background tmux session
|
|
222
|
+
shipwright daemon metrics # DORA/DX metrics dashboard
|
|
223
|
+
shipwright daemon triage # Show issue triage scores
|
|
224
|
+
shipwright daemon patrol # Proactive codebase patrol
|
|
225
|
+
shipwright daemon stop # Graceful shutdown
|
|
226
|
+
|
|
227
|
+
# Fleet operations (multi-repo orchestration)
|
|
228
|
+
shipwright fleet init # Generate fleet-config.json
|
|
229
|
+
shipwright fleet start # Start daemons for all configured repos
|
|
230
|
+
shipwright fleet status # Fleet-wide dashboard
|
|
231
|
+
shipwright fleet metrics --period 30 # Aggregate DORA metrics across repos
|
|
232
|
+
shipwright fleet stop # Stop all fleet daemons
|
|
233
|
+
|
|
234
|
+
# Bulk fix (apply same fix across repos)
|
|
235
|
+
shipwright fix "Update lodash to 4.17.21" --repos ~/api,~/web,~/mobile
|
|
236
|
+
shipwright fix "Bump Node to 22" --repos-from repos.txt --pipeline hotfix
|
|
237
|
+
shipwright fix --status # Show running fix sessions
|
|
238
|
+
|
|
239
|
+
# Persistent memory
|
|
240
|
+
shipwright memory show # Display memory for current repo
|
|
241
|
+
shipwright memory show --global # Cross-repo learnings
|
|
242
|
+
shipwright memory search "auth" # Search memory
|
|
243
|
+
shipwright memory stats # Memory size, age, hit rate
|
|
244
|
+
|
|
245
|
+
# Cost intelligence
|
|
246
|
+
shipwright cost show # 7-day cost summary
|
|
247
|
+
shipwright cost show --period 30 --by-stage # 30-day breakdown by stage
|
|
248
|
+
shipwright cost budget set 50.00 # Set daily budget ($50/day)
|
|
249
|
+
shipwright cost budget show # Check current budget
|
|
250
|
+
|
|
251
|
+
# Repo preparation
|
|
252
|
+
shipwright prep # Analyze repo, generate .claude/ configs
|
|
253
|
+
shipwright prep --check # Audit existing prep quality
|
|
254
|
+
sw prep --with-claude # Deep analysis using Claude Code
|
|
255
|
+
|
|
256
|
+
# Maintenance
|
|
257
|
+
shipwright cleanup # Dry-run: show orphaned sessions
|
|
258
|
+
shipwright cleanup --force # Kill orphaned sessions
|
|
259
|
+
sw worktree create my-branch # Git worktree for agent isolation
|
|
260
|
+
sw templates list # Browse team templates
|
|
261
|
+
```
|
|
262
|
+
|
|
263
|
+
## Usage
|
|
264
|
+
|
|
265
|
+
### Starting a Team Session
|
|
266
|
+
|
|
267
|
+
```bash
|
|
268
|
+
# Start tmux (if not already in a session)
|
|
269
|
+
tmux new -s dev
|
|
270
|
+
|
|
271
|
+
# Option 1: Use a template — leader gets 65% of the screen
|
|
272
|
+
shipwright session my-feature --template feature-dev
|
|
273
|
+
|
|
274
|
+
# Option 2: Bare session — then ask Claude to create a team
|
|
275
|
+
shipwright session my-feature
|
|
276
|
+
|
|
277
|
+
# Option 3: tmux keybinding
|
|
278
|
+
# Press Ctrl-a then T to launch a team session
|
|
279
|
+
|
|
280
|
+
# Option 4: Just start Claude Code — it handles teams automatically
|
|
281
|
+
claude
|
|
282
|
+
```
|
|
283
|
+
|
|
284
|
+
### Continuous Agent Loop
|
|
285
|
+
|
|
286
|
+
Run Claude Code autonomously in a loop until a goal is achieved:
|
|
287
|
+
|
|
288
|
+
```bash
|
|
289
|
+
# Basic loop with test verification
|
|
290
|
+
shipwright loop "Build user authentication with JWT" --test-cmd "npm test"
|
|
291
|
+
|
|
292
|
+
# Multi-agent with audit and quality gates
|
|
293
|
+
shipwright loop "Refactor the API layer" --agents 3 --audit --quality-gates
|
|
294
|
+
|
|
295
|
+
# With a definition of done
|
|
296
|
+
shipwright loop "Build checkout flow" --definition-of-done requirements.md
|
|
297
|
+
|
|
298
|
+
# Resume an interrupted loop
|
|
299
|
+
shipwright loop --resume
|
|
300
|
+
```
|
|
301
|
+
|
|
302
|
+
The loop supports self-audit (agent reflects on its own work), audit agents (separate reviewer), and quality gates (automated checks between iterations).
|
|
303
|
+
|
|
304
|
+
### Delivery Pipeline
|
|
305
|
+
|
|
306
|
+
Chain the full SDLC into a single command — from issue intake to PR creation with full GitHub integration, self-healing builds, and zero-config auto-detection:
|
|
307
|
+
|
|
308
|
+
```bash
|
|
309
|
+
# Start from a GitHub issue (fully autonomous)
|
|
310
|
+
shipwright pipeline start --issue 123 --skip-gates
|
|
311
|
+
|
|
312
|
+
# Start from a goal
|
|
313
|
+
shipwright pipeline start --goal "Add JWT authentication"
|
|
314
|
+
|
|
315
|
+
# Hotfix with custom test command
|
|
316
|
+
shipwright pipeline start --issue 456 --pipeline hotfix --test-cmd "pytest"
|
|
317
|
+
|
|
318
|
+
# Full deployment pipeline with 3 agents
|
|
319
|
+
shipwright pipeline start --goal "Build payment flow" --pipeline full --agents 3
|
|
320
|
+
|
|
321
|
+
# Parallel pipeline in isolated worktree (safe to run multiple concurrently)
|
|
322
|
+
shipwright pipeline start --issue 42 --worktree
|
|
323
|
+
|
|
324
|
+
# Cost-aware pipeline with budget limits
|
|
325
|
+
shipwright pipeline start --goal "Add feature" --pipeline cost-aware
|
|
326
|
+
|
|
327
|
+
# Enterprise pipeline with all safety gates
|
|
328
|
+
shipwright pipeline start --issue 789 --pipeline enterprise
|
|
329
|
+
|
|
330
|
+
# Resume / monitor / abort
|
|
331
|
+
shipwright pipeline resume
|
|
332
|
+
sw pipeline status
|
|
333
|
+
shipwright pipeline abort
|
|
334
|
+
|
|
335
|
+
# Browse available pipelines
|
|
336
|
+
sw pipeline list
|
|
337
|
+
sw pipeline show standard
|
|
338
|
+
```
|
|
339
|
+
|
|
340
|
+
**Pipeline stages:** `intake → plan → design → build → test → review → compound_quality → pr → merge → deploy → validate → monitor`
|
|
341
|
+
|
|
342
|
+
Each stage can be enabled/disabled and gated (auto-proceed or pause for approval). The build stage delegates to `shipwright loop` for autonomous multi-iteration development.
|
|
343
|
+
|
|
344
|
+
**Self-healing:** When tests fail after a build, the pipeline automatically captures the error output and re-enters the build loop with that context — just like a human developer reading test failures and fixing them. Configurable retry cycles with `--self-heal N`.
|
|
345
|
+
|
|
346
|
+
**GitHub integration:** Auto-fetches issue metadata, self-assigns, posts progress comments, creates PRs with labels/milestone/reviewers propagated from the issue, and closes the issue on completion.
|
|
347
|
+
|
|
348
|
+
**Auto-detection:** Test command (9+ project types), branch prefix from task type, reviewers from CODEOWNERS or git history, project language and framework.
|
|
349
|
+
|
|
350
|
+
**Notifications:** Slack webhook (`--slack-webhook <url>`) or custom webhook (`SHIPWRIGHT_WEBHOOK_URL` env var, with `CCT_WEBHOOK_URL` fallback) for pipeline events.
|
|
351
|
+
|
|
352
|
+
| Template | Stages | Gates | Use Case |
|
|
353
|
+
|----------|--------|-------|----------|
|
|
354
|
+
| `standard` | intake → plan → build → test → review → PR | approve: plan, review, pr | Normal feature work |
|
|
355
|
+
| `fast` | intake → build → test → PR | all auto | Quick fixes |
|
|
356
|
+
| `full` | all stages | approve: plan, review, pr, deploy | Production deployment |
|
|
357
|
+
| `hotfix` | intake → build → test → PR | all auto | Urgent production fixes |
|
|
358
|
+
| `autonomous` | all stages | all auto | Daemon-driven delivery |
|
|
359
|
+
| `enterprise` | all stages | all approve, auto-rollback | Maximum safety pipelines |
|
|
360
|
+
| `cost-aware` | all stages | all auto, budget checks | Budget-limited delivery |
|
|
361
|
+
| `deployed` | all stages + deploy + validate + monitor | approve: deploy | Full deploy + monitoring |
|
|
362
|
+
|
|
363
|
+
### Autonomous Daemon
|
|
364
|
+
|
|
365
|
+
Watch a GitHub repo for new issues and automatically deliver them through the pipeline:
|
|
366
|
+
|
|
367
|
+
```bash
|
|
368
|
+
# Start watching (foreground)
|
|
369
|
+
shipwright daemon start
|
|
370
|
+
|
|
371
|
+
# Start in background tmux session
|
|
372
|
+
shipwright daemon start --detach
|
|
373
|
+
|
|
374
|
+
# Show active pipelines, queue, and throughput
|
|
375
|
+
shipwright daemon status
|
|
376
|
+
|
|
377
|
+
# DORA metrics dashboard (lead time, deploy freq, MTTR, change failure rate)
|
|
378
|
+
shipwright daemon metrics
|
|
379
|
+
|
|
380
|
+
# Issue triage scores
|
|
381
|
+
shipwright daemon triage
|
|
382
|
+
|
|
383
|
+
# Proactive codebase patrol
|
|
384
|
+
shipwright daemon patrol
|
|
385
|
+
shipwright daemon patrol --dry-run
|
|
386
|
+
|
|
387
|
+
# Graceful shutdown
|
|
388
|
+
shipwright daemon stop
|
|
389
|
+
```
|
|
390
|
+
|
|
391
|
+
#### Intelligence Features
|
|
392
|
+
|
|
393
|
+
The daemon includes an intelligence layer that makes it smarter over time:
|
|
394
|
+
|
|
395
|
+
**Adaptive Templates** — Automatically selects the best pipeline template based on issue labels and past performance. Configure a `template_map` in `daemon-config.json` to map labels to templates, or let the daemon learn from history.
|
|
396
|
+
|
|
397
|
+
**Auto-Retry with Escalation** — When a pipeline fails, the daemon automatically retries with an escalation strategy (e.g., switching from `sonnet` to `opus`). Configurable via `max_retries` and `retry_escalation`.
|
|
398
|
+
|
|
399
|
+
**Self-Optimizing Metrics** — The daemon periodically analyzes its own performance and adjusts parameters (poll interval, model selection, parallel slots) to optimize throughput and cost. Enable with `"self_optimize": true`.
|
|
400
|
+
|
|
401
|
+
**Priority Lanes** — Issues labeled `hotfix`, `incident`, `p0`, or `urgent` bypass the normal queue and get processed immediately in a dedicated slot. Configurable labels and max priority slots.
|
|
402
|
+
|
|
403
|
+
**Org-Wide Mode** — Watch issues across an entire GitHub organization instead of a single repo. Set `"watch_mode": "org"` and `"org": "your-org"` in the config. Filter repos with a regex pattern.
|
|
404
|
+
|
|
405
|
+
**Proactive Patrol** — The daemon can periodically scan the codebase for issues (security vulnerabilities, outdated deps, code smells) and create issues automatically. Run `shipwright daemon patrol` for manual scans.
|
|
406
|
+
|
|
407
|
+
### Fleet Operations
|
|
408
|
+
|
|
409
|
+
Orchestrate daemons across multiple repositories from a single config:
|
|
410
|
+
|
|
411
|
+
```bash
|
|
412
|
+
# Generate fleet configuration
|
|
413
|
+
shipwright fleet init
|
|
414
|
+
|
|
415
|
+
# Start daemons for all configured repos
|
|
416
|
+
shipwright fleet start
|
|
417
|
+
|
|
418
|
+
# Fleet-wide dashboard
|
|
419
|
+
shipwright fleet status
|
|
420
|
+
|
|
421
|
+
# Aggregate DORA metrics across all repos
|
|
422
|
+
shipwright fleet metrics --period 30
|
|
423
|
+
|
|
424
|
+
# Stop all fleet daemons
|
|
425
|
+
shipwright fleet stop
|
|
426
|
+
```
|
|
427
|
+
|
|
428
|
+
**Fleet configuration** (`.claude/fleet-config.json`):
|
|
429
|
+
|
|
430
|
+
```json
|
|
431
|
+
{
|
|
432
|
+
"repos": [
|
|
433
|
+
{ "path": "/path/to/api", "template": "autonomous", "max_parallel": 2 },
|
|
434
|
+
{ "path": "/path/to/web", "template": "standard" }
|
|
435
|
+
],
|
|
436
|
+
"defaults": {
|
|
437
|
+
"watch_label": "ready-to-build",
|
|
438
|
+
"pipeline_template": "autonomous",
|
|
439
|
+
"max_parallel": 2,
|
|
440
|
+
"model": "opus"
|
|
441
|
+
},
|
|
442
|
+
"shared_events": true,
|
|
443
|
+
"worker_pool": {
|
|
444
|
+
"enabled": false,
|
|
445
|
+
"total_workers": 12,
|
|
446
|
+
"rebalance_interval_seconds": 120
|
|
447
|
+
}
|
|
448
|
+
}
|
|
449
|
+
```
|
|
450
|
+
|
|
451
|
+
### Bulk Fix
|
|
452
|
+
|
|
453
|
+
Apply the same fix across multiple repositories in parallel:
|
|
454
|
+
|
|
455
|
+
```bash
|
|
456
|
+
# Fix a dependency across repos
|
|
457
|
+
shipwright fix "Update lodash to 4.17.21" --repos ~/api,~/web,~/mobile
|
|
458
|
+
|
|
459
|
+
# Security fix with fast pipeline
|
|
460
|
+
shipwright fix "Fix SQL injection in auth" --repos ~/api --pipeline fast
|
|
461
|
+
|
|
462
|
+
# Bulk upgrade from a repos file
|
|
463
|
+
shipwright fix "Bump Node to 22" --repos-from repos.txt --pipeline hotfix
|
|
464
|
+
|
|
465
|
+
# Dry run to preview
|
|
466
|
+
shipwright fix "Migrate to ESM" --repos ~/api,~/web --dry-run
|
|
467
|
+
|
|
468
|
+
# Check running fix sessions
|
|
469
|
+
shipwright fix --status
|
|
470
|
+
```
|
|
471
|
+
|
|
472
|
+
Options: `--max-parallel N` (default 3), `--branch-prefix` (default `fix/`), `--pipeline` (default `fast`), `--model`, `--dry-run`.
|
|
473
|
+
|
|
474
|
+
### Persistent Memory
|
|
475
|
+
|
|
476
|
+
Shipwright learns from every pipeline run and injects context into future builds:
|
|
477
|
+
|
|
478
|
+
```bash
|
|
479
|
+
# View repo memory (patterns, failures, decisions, metrics)
|
|
480
|
+
shipwright memory show
|
|
481
|
+
|
|
482
|
+
# View cross-repo learnings
|
|
483
|
+
shipwright memory show --global
|
|
484
|
+
|
|
485
|
+
# Search memory
|
|
486
|
+
shipwright memory search "auth"
|
|
487
|
+
|
|
488
|
+
# Memory statistics (size, age, hit rate)
|
|
489
|
+
shipwright memory stats
|
|
490
|
+
|
|
491
|
+
# Export/import memory
|
|
492
|
+
shipwright memory export > backup.json
|
|
493
|
+
shipwright memory import backup.json
|
|
494
|
+
```
|
|
495
|
+
|
|
496
|
+
**Pipeline integration** — Memory is captured automatically after each pipeline:
|
|
497
|
+
- **Patterns**: Codebase conventions, test patterns, build configs
|
|
498
|
+
- **Failures**: Root cause analysis of test/build failures
|
|
499
|
+
- **Decisions**: Design decisions and their rationale
|
|
500
|
+
- **Metrics**: Performance baselines (test duration, build time)
|
|
501
|
+
|
|
502
|
+
Context is injected into pipeline stages automatically, so the agent starts each build with knowledge of past mistakes and repo conventions.
|
|
503
|
+
|
|
504
|
+
### Cost Intelligence
|
|
505
|
+
|
|
506
|
+
Track token usage, enforce budgets, and optimize model selection:
|
|
507
|
+
|
|
508
|
+
```bash
|
|
509
|
+
# 7-day cost summary
|
|
510
|
+
shipwright cost show
|
|
511
|
+
|
|
512
|
+
# 30-day breakdown by pipeline stage
|
|
513
|
+
shipwright cost show --period 30 --by-stage
|
|
514
|
+
|
|
515
|
+
# Breakdown by issue
|
|
516
|
+
shipwright cost show --by-issue
|
|
517
|
+
|
|
518
|
+
# Set and check daily budget
|
|
519
|
+
shipwright cost budget set 50.00
|
|
520
|
+
shipwright cost budget show
|
|
521
|
+
|
|
522
|
+
# Estimate cost before running
|
|
523
|
+
shipwright cost calculate 50000 10000 opus
|
|
524
|
+
```
|
|
525
|
+
|
|
526
|
+
**Model pricing:**
|
|
527
|
+
|
|
528
|
+
| Model | Input | Output |
|
|
529
|
+
|-------|-------|--------|
|
|
530
|
+
| Opus | $15.00 / 1M tokens | $75.00 / 1M tokens |
|
|
531
|
+
| Sonnet | $3.00 / 1M tokens | $15.00 / 1M tokens |
|
|
532
|
+
| Haiku | $0.25 / 1M tokens | $1.25 / 1M tokens |
|
|
533
|
+
|
|
534
|
+
Use the `cost-aware` pipeline template for automatic budget checking and model routing (haiku for simple stages, sonnet for builds, opus only when needed).
|
|
535
|
+
|
|
536
|
+
### Deploy Adapters
|
|
537
|
+
|
|
538
|
+
Deploy to your platform of choice with the `deployed` pipeline template:
|
|
539
|
+
|
|
540
|
+
```bash
|
|
541
|
+
# Setup deploy configuration
|
|
542
|
+
shipwright init --deploy
|
|
543
|
+
|
|
544
|
+
# Run a full deploy pipeline
|
|
545
|
+
shipwright pipeline start --issue 123 --pipeline deployed
|
|
546
|
+
```
|
|
547
|
+
|
|
548
|
+
Adapters are available for **Vercel**, **Fly.io**, **Railway**, and **Docker**. Each adapter handles staging deploys, production promotion, smoke tests, health checks, and rollback.
|
|
549
|
+
|
|
550
|
+
### Repo Preparation
|
|
551
|
+
|
|
552
|
+
Generate agent-ready `.claude/` configuration for any repository:
|
|
553
|
+
|
|
554
|
+
```bash
|
|
555
|
+
# Analyze repo and generate configs
|
|
556
|
+
shipwright prep
|
|
557
|
+
|
|
558
|
+
# Deep analysis using Claude Code
|
|
559
|
+
shipwright prep --with-claude
|
|
560
|
+
|
|
561
|
+
# Audit existing prep quality
|
|
562
|
+
shipwright prep --check
|
|
563
|
+
```
|
|
564
|
+
|
|
565
|
+
### Layout Presets
|
|
566
|
+
|
|
567
|
+
Switch between pane arrangements with keybindings:
|
|
568
|
+
|
|
569
|
+
| Key | Layout | Description |
|
|
570
|
+
|-----|--------|-------------|
|
|
571
|
+
| `prefix + M-1` | main-horizontal | Leader 65% left, agents stacked right |
|
|
572
|
+
| `prefix + M-2` | main-vertical | Leader 60% top, agents tiled bottom |
|
|
573
|
+
| `prefix + M-3` | tiled | Equal sizes |
|
|
574
|
+
|
|
575
|
+
### Monitoring Teams
|
|
576
|
+
|
|
577
|
+
```bash
|
|
578
|
+
# Show running team sessions
|
|
579
|
+
shipwright status
|
|
580
|
+
|
|
581
|
+
# Or use the tmux keybinding: Ctrl-a then Ctrl-t
|
|
582
|
+
```
|
|
583
|
+
|
|
584
|
+
### Health Check
|
|
585
|
+
|
|
586
|
+
```bash
|
|
587
|
+
shipwright doctor # Checks: tmux, jq, overlay hooks, color config, orphaned sessions
|
|
588
|
+
```
|
|
589
|
+
|
|
590
|
+
## Configuration
|
|
591
|
+
|
|
592
|
+
### tmux Theme
|
|
593
|
+
|
|
594
|
+
The theme lives in `tmux/tmux.conf`. Key color values:
|
|
595
|
+
|
|
596
|
+
| Element | Color | Hex |
|
|
597
|
+
|---------|-------|-----|
|
|
598
|
+
| Background | Dark blue-gray | `#1a1a2e` |
|
|
599
|
+
| Foreground | Light gray | `#e4e4e7` |
|
|
600
|
+
| Accent (active borders, highlights) | Cyan | `#00d4ff` |
|
|
601
|
+
| Secondary | Blue | `#0066ff` |
|
|
602
|
+
| Tertiary | Purple | `#7c3aed` |
|
|
603
|
+
| Inactive borders | Muted indigo | `#333355` |
|
|
604
|
+
| Inactive elements | Zinc | `#71717a` |
|
|
605
|
+
|
|
606
|
+
To customize, edit the hex values in `tmux/tmux.conf` and reload: `prefix + r`.
|
|
607
|
+
|
|
608
|
+
### Claude Code Settings
|
|
609
|
+
|
|
610
|
+
The `claude-code/settings.json.template` is a JSONC file (JSON with comments). To use it:
|
|
611
|
+
|
|
612
|
+
1. Copy to `~/.claude/settings.json` (strip comments first if your editor doesn't support JSONC)
|
|
613
|
+
2. Customize the `enabledPlugins` section for your toolchain
|
|
614
|
+
3. Adjust `env` variables as needed
|
|
615
|
+
|
|
616
|
+
Key settings to customize:
|
|
617
|
+
|
|
618
|
+
| Setting | Default | What it does |
|
|
619
|
+
|---------|---------|--------------|
|
|
620
|
+
| `CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS` | `"1"` | Enable agent teams (required) |
|
|
621
|
+
| `CLAUDE_CODE_AUTOCOMPACT_PCT_OVERRIDE` | `"70"` | When to compact context (lower = more aggressive) |
|
|
622
|
+
| `CLAUDE_CODE_SUBAGENT_MODEL` | `"haiku"` | Model for subagent lookups (cheaper + faster) |
|
|
623
|
+
| `CLAUDE_CODE_MAX_TOOL_USE_CONCURRENCY` | `"5"` | Parallel tool calls per agent |
|
|
624
|
+
|
|
625
|
+
### Hooks
|
|
626
|
+
|
|
627
|
+
Hooks are shell scripts that run on Claude Code lifecycle events. The included `teammate-idle.sh` hook is a quality gate that blocks agents from going idle until TypeScript errors are fixed.
|
|
628
|
+
|
|
629
|
+
To install hooks:
|
|
630
|
+
|
|
631
|
+
1. Copy hook scripts to `~/.claude/hooks/`
|
|
632
|
+
2. Make them executable: `chmod +x ~/.claude/hooks/*.sh`
|
|
633
|
+
3. Wire them up in `~/.claude/settings.json`:
|
|
634
|
+
|
|
635
|
+
```json
|
|
636
|
+
{
|
|
637
|
+
"hooks": {
|
|
638
|
+
"teammate-idle": {
|
|
639
|
+
"command": "~/.claude/hooks/teammate-idle.sh",
|
|
640
|
+
"timeout": 30000
|
|
641
|
+
}
|
|
642
|
+
}
|
|
643
|
+
}
|
|
644
|
+
```
|
|
645
|
+
|
|
646
|
+
### Shell Completions
|
|
647
|
+
|
|
648
|
+
Tab completions are available for bash, zsh, and fish:
|
|
649
|
+
|
|
650
|
+
```bash
|
|
651
|
+
# Auto-install for your current shell
|
|
652
|
+
./scripts/install-completions.sh
|
|
653
|
+
|
|
654
|
+
# Or manually source (bash)
|
|
655
|
+
source completions/shipwright.bash
|
|
656
|
+
|
|
657
|
+
# Or manually install (zsh — add to ~/.zfunc/)
|
|
658
|
+
cp completions/_shipwright ~/.zfunc/_shipwright && compinit
|
|
659
|
+
|
|
660
|
+
# Or manually install (fish)
|
|
661
|
+
cp completions/shipwright.fish ~/.config/fish/completions/
|
|
662
|
+
```
|
|
663
|
+
|
|
664
|
+
### Daemon Configuration
|
|
665
|
+
|
|
666
|
+
The daemon is configured via `.claude/daemon-config.json`:
|
|
667
|
+
|
|
668
|
+
```json
|
|
669
|
+
{
|
|
670
|
+
"watch_label": "ready-to-build",
|
|
671
|
+
"poll_interval": 60,
|
|
672
|
+
"max_parallel": 2,
|
|
673
|
+
"pipeline_template": "autonomous",
|
|
674
|
+
"base_branch": "main",
|
|
675
|
+
"priority_lane": true,
|
|
676
|
+
"priority_lane_labels": "hotfix,incident,p0,urgent",
|
|
677
|
+
"priority_lane_max": 1,
|
|
678
|
+
"auto_template": true,
|
|
679
|
+
"max_retries": 2,
|
|
680
|
+
"retry_escalation": true,
|
|
681
|
+
"self_optimize": false,
|
|
682
|
+
"auto_scale": false,
|
|
683
|
+
"auto_scale_interval": 5,
|
|
684
|
+
"max_workers": 8,
|
|
685
|
+
"min_workers": 1,
|
|
686
|
+
"worker_mem_gb": 4,
|
|
687
|
+
"estimated_cost_per_job_usd": 5.0,
|
|
688
|
+
"watch_mode": "repo",
|
|
689
|
+
"org": ""
|
|
690
|
+
}
|
|
691
|
+
```
|
|
692
|
+
|
|
693
|
+
## tmux Keybindings
|
|
694
|
+
|
|
695
|
+
The prefix key is `Ctrl-a` (remapped from the default `Ctrl-b`).
|
|
696
|
+
|
|
697
|
+
### General
|
|
698
|
+
|
|
699
|
+
| Key | Action |
|
|
700
|
+
|-----|--------|
|
|
701
|
+
| `prefix + r` | Reload tmux config |
|
|
702
|
+
| `prefix + \|` | Split pane vertically |
|
|
703
|
+
| `prefix + -` | Split pane horizontally |
|
|
704
|
+
| `prefix + c` | New window |
|
|
705
|
+
| `prefix + x` | Kill pane (with confirmation) |
|
|
706
|
+
| `prefix + X` | Kill window (with confirmation) |
|
|
707
|
+
| `prefix + s` | Choose session (tree view) |
|
|
708
|
+
| `prefix + N` | New session |
|
|
709
|
+
|
|
710
|
+
### Pane Navigation (vim-style)
|
|
711
|
+
|
|
712
|
+
| Key | Action |
|
|
713
|
+
|-----|--------|
|
|
714
|
+
| `prefix + h` | Move left |
|
|
715
|
+
| `prefix + j` | Move down |
|
|
716
|
+
| `prefix + k` | Move up |
|
|
717
|
+
| `prefix + l` | Move right |
|
|
718
|
+
| `Ctrl + h/j/k/l` | Smart pane switching (works with vim-tmux-navigator) |
|
|
719
|
+
| `prefix + H/J/K/L` | Resize pane (repeatable) |
|
|
720
|
+
|
|
721
|
+
### Window Navigation
|
|
722
|
+
|
|
723
|
+
| Key | Action |
|
|
724
|
+
|-----|--------|
|
|
725
|
+
| `prefix + Ctrl-h` | Previous window |
|
|
726
|
+
| `prefix + Ctrl-l` | Next window |
|
|
727
|
+
|
|
728
|
+
### Agent Teams
|
|
729
|
+
|
|
730
|
+
| Key | Action |
|
|
731
|
+
|-----|--------|
|
|
732
|
+
| `prefix + T` | Launch team session (via `shipwright`) |
|
|
733
|
+
| `prefix + Ctrl-t` | Show team status dashboard |
|
|
734
|
+
| `prefix + g` | Display pane numbers (pick by index) |
|
|
735
|
+
| `prefix + G` | Toggle zoom on current pane |
|
|
736
|
+
| `prefix + S` | Toggle synchronized panes (type in all at once) |
|
|
737
|
+
| `prefix + M-t` | Toggle team sync mode |
|
|
738
|
+
| `prefix + M-l` | Cycle through pane layouts |
|
|
739
|
+
| `prefix + M-1` | Layout: main-horizontal (leader 65% left) |
|
|
740
|
+
| `prefix + M-2` | Layout: main-vertical (leader 60% top) |
|
|
741
|
+
| `prefix + M-3` | Layout: tiled (equal sizes) |
|
|
742
|
+
| `prefix + M-s` | Capture current pane scrollback to file |
|
|
743
|
+
| `prefix + M-a` | Capture ALL panes in window |
|
|
744
|
+
|
|
745
|
+
### Copy Mode (vi-style)
|
|
746
|
+
|
|
747
|
+
| Key | Action |
|
|
748
|
+
|-----|--------|
|
|
749
|
+
| `v` | Begin selection |
|
|
750
|
+
| `y` | Copy selection |
|
|
751
|
+
| `r` | Toggle rectangle mode |
|
|
752
|
+
| `prefix + p` | Paste buffer |
|
|
753
|
+
|
|
754
|
+
## Team Patterns
|
|
755
|
+
|
|
756
|
+
12 templates covering the full SDLC and PDLC. Use `shipwright templates list` to browse, `shipwright templates show <name>` for details.
|
|
757
|
+
|
|
758
|
+
### Build Phase
|
|
759
|
+
|
|
760
|
+
#### Feature Development (`feature-dev`) — 3 agents
|
|
761
|
+
|
|
762
|
+
| Agent | Focus | Example files |
|
|
763
|
+
|-------|-------|---------------|
|
|
764
|
+
| **backend** | API routes, services, data layer | `src/api/`, `src/services/` |
|
|
765
|
+
| **frontend** | UI components, state, styling | `apps/web/src/` |
|
|
766
|
+
| **tests** | Unit tests, integration tests | `*.test.ts` |
|
|
767
|
+
|
|
768
|
+
#### Full-Stack (`full-stack`) — 3 agents
|
|
769
|
+
|
|
770
|
+
| Agent | Focus | Example files |
|
|
771
|
+
|-------|-------|---------------|
|
|
772
|
+
| **api** | REST/GraphQL endpoints, middleware, auth | `src/api/`, `src/routes/` |
|
|
773
|
+
| **database** | Schema, migrations, queries, models | `migrations/`, `prisma/` |
|
|
774
|
+
| **ui** | Pages, components, forms, styling | `apps/web/`, `src/components/` |
|
|
775
|
+
|
|
776
|
+
### Quality Phase
|
|
777
|
+
|
|
778
|
+
#### Code Review (`code-review`) — 3 agents
|
|
779
|
+
|
|
780
|
+
| Agent | Focus | What it checks |
|
|
781
|
+
|-------|-------|----------------|
|
|
782
|
+
| **code-quality** | Logic, patterns, architecture | Bugs, code smells, layer violations |
|
|
783
|
+
| **security** | Error handling, injection, auth | OWASP top 10, silent failures |
|
|
784
|
+
| **test-coverage** | Test completeness, edge cases | Missing tests, weak assertions |
|
|
785
|
+
|
|
786
|
+
#### Security Audit (`security-audit`) — 3 agents
|
|
787
|
+
|
|
788
|
+
| Agent | Focus | What it checks |
|
|
789
|
+
|-------|-------|----------------|
|
|
790
|
+
| **code-analysis** | SAST: injection, auth, XSS, CSRF | Source code vulnerabilities |
|
|
791
|
+
| **dependencies** | CVEs, outdated packages, licenses | Supply chain risks |
|
|
792
|
+
| **config-review** | Secrets, CORS, CSP, env config | Infrastructure security |
|
|
793
|
+
|
|
794
|
+
#### Comprehensive Testing (`testing`) — 3 agents
|
|
795
|
+
|
|
796
|
+
| Agent | Focus | What it covers |
|
|
797
|
+
|-------|-------|----------------|
|
|
798
|
+
| **unit-tests** | Functions, classes, modules | Isolated unit tests |
|
|
799
|
+
| **integration-tests** | API endpoints, service interactions | Cross-component tests |
|
|
800
|
+
| **e2e-tests** | User flows, UI interactions | Full system tests |
|
|
801
|
+
|
|
802
|
+
### Maintenance Phase
|
|
803
|
+
|
|
804
|
+
#### Bug Fix (`bug-fix`) — 3 agents
|
|
805
|
+
|
|
806
|
+
| Agent | Focus | What it does |
|
|
807
|
+
|-------|-------|--------------|
|
|
808
|
+
| **reproducer** | Write failing test, trace root cause | Proves the bug exists |
|
|
809
|
+
| **fixer** | Fix source code, handle edge cases | Implements the fix |
|
|
810
|
+
| **verifier** | Regression check, review changes | Ensures nothing else breaks |
|
|
811
|
+
|
|
812
|
+
#### Refactoring (`refactor`) — 2 agents
|
|
813
|
+
|
|
814
|
+
| Agent | Focus | What it does |
|
|
815
|
+
|-------|-------|--------------|
|
|
816
|
+
| **refactor** | Source code changes | Rename, restructure, extract |
|
|
817
|
+
| **consumers** | Tests and dependents | Update imports, fix tests, verify |
|
|
818
|
+
|
|
819
|
+
#### Migration (`migration`) — 3 agents
|
|
820
|
+
|
|
821
|
+
| Agent | Focus | What it does |
|
|
822
|
+
|-------|-------|--------------|
|
|
823
|
+
| **schema** | Migration scripts, data transforms | Write the migration |
|
|
824
|
+
| **adapter** | Update app code, queries, models | Adapt to new schema |
|
|
825
|
+
| **rollback** | Rollback scripts, backward compat | Verify safe reversal |
|
|
826
|
+
|
|
827
|
+
### Planning Phase
|
|
828
|
+
|
|
829
|
+
#### Architecture (`architecture`) — 2 agents
|
|
830
|
+
|
|
831
|
+
| Agent | Focus | What it does |
|
|
832
|
+
|-------|-------|--------------|
|
|
833
|
+
| **researcher** | Analyze code, trace deps, evaluate trade-offs | Deep codebase analysis |
|
|
834
|
+
| **spec-writer** | ADRs, design docs, interface contracts | Write technical specs |
|
|
835
|
+
|
|
836
|
+
#### Exploration (`exploration`) — 2 agents
|
|
837
|
+
|
|
838
|
+
| Agent | Focus | What it does |
|
|
839
|
+
|-------|-------|--------------|
|
|
840
|
+
| **explorer** | Deep-dive code, trace execution paths | Map the codebase |
|
|
841
|
+
| **synthesizer** | Summarize findings, document patterns | Distill insights |
|
|
842
|
+
|
|
843
|
+
### Operations Phase
|
|
844
|
+
|
|
845
|
+
#### DevOps (`devops`) — 2 agents
|
|
846
|
+
|
|
847
|
+
| Agent | Focus | What it does |
|
|
848
|
+
|-------|-------|--------------|
|
|
849
|
+
| **pipeline** | CI/CD workflows, build, deploy | GitHub Actions, Jenkins, etc. |
|
|
850
|
+
| **infrastructure** | Docker, Terraform, K8s, env config | Infrastructure as code |
|
|
851
|
+
|
|
852
|
+
#### Documentation (`documentation`) — 2 agents
|
|
853
|
+
|
|
854
|
+
| Agent | Focus | What it does |
|
|
855
|
+
|-------|-------|--------------|
|
|
856
|
+
| **api-docs** | API reference, OpenAPI spec, examples | Endpoint documentation |
|
|
857
|
+
| **guides** | Tutorials, README, architecture docs | User-facing docs |
|
|
858
|
+
|
|
859
|
+
## Troubleshooting
|
|
860
|
+
|
|
861
|
+
See [docs/KNOWN-ISSUES.md](docs/KNOWN-ISSUES.md) for tracked bugs with workarounds.
|
|
862
|
+
|
|
863
|
+
**Common problems:**
|
|
864
|
+
|
|
865
|
+
| Problem | Cause | Fix |
|
|
866
|
+
|---------|-------|-----|
|
|
867
|
+
| Agents spawn in-process instead of tmux panes | Not inside a tmux session | Start tmux first: `tmux new -s dev` |
|
|
868
|
+
| Garbled pane output with 4+ agents | tmux `send-keys` race condition (#23615) | Use `shipwright` (uses `new-window` instead of `split-window`) |
|
|
869
|
+
| Agents fall back to in-process mode | Not in a real tmux session (#23572) | Launch Claude inside tmux |
|
|
870
|
+
| Context window overflow | Too many tasks per agent | Keep tasks focused (5-6 per agent) |
|
|
871
|
+
| Panes don't show agent names | Pane titles not set | Use `shipwright session` which sets titles automatically |
|
|
872
|
+
| White/bright pane backgrounds | New panes not inheriting theme | Fixed! Overlay forces dark theme via `set-hook after-split-window` |
|
|
873
|
+
|
|
874
|
+
## Plugins (TPM)
|
|
875
|
+
|
|
876
|
+
The tmux config uses [TPM](https://github.com/tmux-plugins/tpm) for plugin management. Install after setup: `prefix + I` (capital I).
|
|
877
|
+
|
|
878
|
+
### tmux Plugins (Best-in-Class)
|
|
879
|
+
|
|
880
|
+
| Plugin | Key | What it does |
|
|
881
|
+
|--------|-----|--------------|
|
|
882
|
+
| **tmux-fingers** | `prefix + F` | Vimium-style copy hints — highlight and copy URLs, paths, hashes from any pane |
|
|
883
|
+
| **tmux-fzf-url** | `prefix + u` | Fuzzy-find and open any URL visible in the current pane |
|
|
884
|
+
| **tmux-fzf** | `F5` | Fuzzy finder for sessions, windows, and panes — jump to any agent by name |
|
|
885
|
+
| **extrakto** | `prefix + tab` | Extract and copy any text from pane output (paths, IDs, errors) |
|
|
886
|
+
| **tmux-resurrect** | auto | Save and restore sessions across restarts |
|
|
887
|
+
| **tmux-continuum** | auto | Automatic continuous session saving |
|
|
888
|
+
| **tmux-sensible** | — | Sensible defaults everyone agrees on |
|
|
889
|
+
|
|
890
|
+
## Demo
|
|
891
|
+
|
|
892
|
+
The hero GIF above shows the CLI in action. The team demo below shows the multi-pane tmux experience with leader + agent panes working in parallel:
|
|
893
|
+
|
|
894
|
+
<p align="center">
|
|
895
|
+
<img src="https://vhs.charm.sh/vhs-77zWXLOKGKC6q29htCKc8M.gif" alt="Team demo — multi-pane tmux with leader + backend + test agents" width="900" />
|
|
896
|
+
</p>
|
|
897
|
+
|
|
898
|
+
<details>
|
|
899
|
+
<summary>Full CLI walkthrough (click to expand)</summary>
|
|
900
|
+
|
|
901
|
+
<p align="center">
|
|
902
|
+
<img src="https://vhs.charm.sh/vhs-ZxrZmi6533fCAnpRl5oG5.gif" alt="Full demo — setup, doctor, templates, pipeline, fleet, cost" width="900" />
|
|
903
|
+
</p>
|
|
904
|
+
|
|
905
|
+
</details>
|
|
906
|
+
|
|
907
|
+
Re-record the demos yourself:
|
|
908
|
+
|
|
909
|
+
```bash
|
|
910
|
+
vhs demo/hero.tape # Short hero GIF
|
|
911
|
+
vhs demo/team-demo.tape # Multi-pane team experience
|
|
912
|
+
vhs demo/full-demo.tape # Full CLI walkthrough
|
|
913
|
+
```
|
|
914
|
+
|
|
915
|
+
## Sources & Inspiration
|
|
916
|
+
|
|
917
|
+
- [Awesome tmux](https://github.com/rothgar/awesome-tmux) — Curated list of tmux resources
|
|
918
|
+
- [Claude Code Agent Teams](https://addyosmani.com/blog/claude-code-agent-teams/) — Addy Osmani's guide to team patterns
|
|
919
|
+
- [Claude Code Hooks Guide](https://code.claude.com/docs/en/hooks-guide) — Official hooks documentation
|
|
920
|
+
- [Everything Claude Code](https://github.com/affaan-m/everything-claude-code) — Comprehensive config collection
|
|
921
|
+
- [Claude Code Hooks Mastery](https://github.com/disler/claude-code-hooks-mastery) — Hook patterns and examples
|
|
922
|
+
- [tmux issue #23615](https://github.com/anthropics/claude-code/issues/23615) — Agent pane spawning discussion
|
|
923
|
+
|
|
924
|
+
## License
|
|
925
|
+
|
|
926
|
+
[MIT](LICENSE) — Seth Ford, 2026.
|