shipwright-cli 1.7.1 → 1.9.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.
Files changed (105) hide show
  1. package/.claude/agents/code-reviewer.md +90 -0
  2. package/.claude/agents/devops-engineer.md +142 -0
  3. package/.claude/agents/pipeline-agent.md +80 -0
  4. package/.claude/agents/shell-script-specialist.md +150 -0
  5. package/.claude/agents/test-specialist.md +196 -0
  6. package/.claude/hooks/post-tool-use.sh +38 -0
  7. package/.claude/hooks/pre-tool-use.sh +25 -0
  8. package/.claude/hooks/session-started.sh +37 -0
  9. package/README.md +212 -814
  10. package/claude-code/CLAUDE.md.shipwright +54 -0
  11. package/claude-code/hooks/notify-idle.sh +2 -2
  12. package/claude-code/hooks/session-start.sh +24 -0
  13. package/claude-code/hooks/task-completed.sh +6 -2
  14. package/claude-code/settings.json.template +12 -0
  15. package/dashboard/public/app.js +4422 -0
  16. package/dashboard/public/index.html +816 -0
  17. package/dashboard/public/styles.css +4755 -0
  18. package/dashboard/server.ts +4315 -0
  19. package/docs/KNOWN-ISSUES.md +18 -10
  20. package/docs/TIPS.md +38 -26
  21. package/docs/patterns/README.md +33 -23
  22. package/package.json +9 -5
  23. package/scripts/adapters/iterm2-adapter.sh +1 -1
  24. package/scripts/adapters/tmux-adapter.sh +52 -23
  25. package/scripts/adapters/wezterm-adapter.sh +26 -14
  26. package/scripts/lib/compat.sh +200 -0
  27. package/scripts/lib/helpers.sh +72 -0
  28. package/scripts/postinstall.mjs +72 -13
  29. package/scripts/{cct → sw} +109 -21
  30. package/scripts/sw-adversarial.sh +274 -0
  31. package/scripts/sw-architecture-enforcer.sh +330 -0
  32. package/scripts/sw-checkpoint.sh +390 -0
  33. package/scripts/{cct-cleanup.sh → sw-cleanup.sh} +3 -1
  34. package/scripts/sw-connect.sh +619 -0
  35. package/scripts/{cct-cost.sh → sw-cost.sh} +368 -34
  36. package/scripts/{cct-daemon.sh → sw-daemon.sh} +2217 -204
  37. package/scripts/sw-dashboard.sh +477 -0
  38. package/scripts/sw-developer-simulation.sh +252 -0
  39. package/scripts/sw-docs.sh +635 -0
  40. package/scripts/sw-doctor.sh +907 -0
  41. package/scripts/{cct-fix.sh → sw-fix.sh} +10 -6
  42. package/scripts/{cct-fleet.sh → sw-fleet.sh} +498 -22
  43. package/scripts/sw-github-checks.sh +521 -0
  44. package/scripts/sw-github-deploy.sh +533 -0
  45. package/scripts/sw-github-graphql.sh +972 -0
  46. package/scripts/sw-heartbeat.sh +293 -0
  47. package/scripts/{cct-init.sh → sw-init.sh} +144 -11
  48. package/scripts/sw-intelligence.sh +1196 -0
  49. package/scripts/sw-jira.sh +643 -0
  50. package/scripts/sw-launchd.sh +364 -0
  51. package/scripts/sw-linear.sh +648 -0
  52. package/scripts/{cct-logs.sh → sw-logs.sh} +72 -2
  53. package/scripts/{cct-loop.sh → sw-loop.sh} +534 -44
  54. package/scripts/{cct-memory.sh → sw-memory.sh} +321 -38
  55. package/scripts/sw-patrol-meta.sh +417 -0
  56. package/scripts/sw-pipeline-composer.sh +455 -0
  57. package/scripts/{cct-pipeline.sh → sw-pipeline.sh} +2319 -178
  58. package/scripts/sw-predictive.sh +820 -0
  59. package/scripts/{cct-prep.sh → sw-prep.sh} +339 -49
  60. package/scripts/{cct-ps.sh → sw-ps.sh} +6 -4
  61. package/scripts/{cct-reaper.sh → sw-reaper.sh} +6 -4
  62. package/scripts/sw-remote.sh +687 -0
  63. package/scripts/sw-self-optimize.sh +947 -0
  64. package/scripts/sw-session.sh +519 -0
  65. package/scripts/sw-setup.sh +234 -0
  66. package/scripts/sw-status.sh +605 -0
  67. package/scripts/{cct-templates.sh → sw-templates.sh} +9 -4
  68. package/scripts/sw-tmux.sh +591 -0
  69. package/scripts/sw-tracker-jira.sh +277 -0
  70. package/scripts/sw-tracker-linear.sh +292 -0
  71. package/scripts/sw-tracker.sh +409 -0
  72. package/scripts/{cct-upgrade.sh → sw-upgrade.sh} +103 -46
  73. package/scripts/{cct-worktree.sh → sw-worktree.sh} +3 -0
  74. package/templates/pipelines/autonomous.json +27 -5
  75. package/templates/pipelines/full.json +12 -0
  76. package/templates/pipelines/standard.json +12 -0
  77. package/tmux/{claude-teams-overlay.conf → shipwright-overlay.conf} +27 -9
  78. package/tmux/templates/accessibility.json +34 -0
  79. package/tmux/templates/api-design.json +35 -0
  80. package/tmux/templates/architecture.json +1 -0
  81. package/tmux/templates/bug-fix.json +9 -0
  82. package/tmux/templates/code-review.json +1 -0
  83. package/tmux/templates/compliance.json +36 -0
  84. package/tmux/templates/data-pipeline.json +36 -0
  85. package/tmux/templates/debt-paydown.json +34 -0
  86. package/tmux/templates/devops.json +1 -0
  87. package/tmux/templates/documentation.json +1 -0
  88. package/tmux/templates/exploration.json +1 -0
  89. package/tmux/templates/feature-dev.json +1 -0
  90. package/tmux/templates/full-stack.json +8 -0
  91. package/tmux/templates/i18n.json +34 -0
  92. package/tmux/templates/incident-response.json +36 -0
  93. package/tmux/templates/migration.json +1 -0
  94. package/tmux/templates/observability.json +35 -0
  95. package/tmux/templates/onboarding.json +33 -0
  96. package/tmux/templates/performance.json +35 -0
  97. package/tmux/templates/refactor.json +1 -0
  98. package/tmux/templates/release.json +35 -0
  99. package/tmux/templates/security-audit.json +8 -0
  100. package/tmux/templates/spike.json +34 -0
  101. package/tmux/templates/testing.json +1 -0
  102. package/tmux/tmux.conf +98 -9
  103. package/scripts/cct-doctor.sh +0 -414
  104. package/scripts/cct-session.sh +0 -284
  105. package/scripts/cct-status.sh +0 -169
package/README.md CHANGED
@@ -1,926 +1,324 @@
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
- [![v1.7.0](https://img.shields.io/badge/version-1.7.0-00d4ff?style=flat-square)](https://github.com/sethdford/shipwright/releases) ![tmux dark theme with cyan accents](https://img.shields.io/badge/theme-dark%20blue--gray%20%2B%20cyan-00d4ff?style=flat-square) ![MIT License](https://img.shields.io/badge/license-MIT-green?style=flat-square)
6
-
7
1
  <p align="center">
8
- <img src="https://vhs.charm.sh/vhs-189lBjHtyH2su8TuxiPQhn.gif" alt="Shipwright CLI demo — version, help, pipeline templates, doctor" width="800" />
2
+ <img src="website/src/assets/logo-dark.svg" alt="Shipwright" width="200">
9
3
  </p>
10
4
 
11
- Full docs at [sethdford.github.io/shipwright](https://sethdford.github.io/shipwright)
5
+ <h1 align="center">Shipwright</h1>
12
6
 
13
- ## Install
14
-
15
- **npm** (recommended)
7
+ <p align="center">
8
+ <strong>The Autonomous Delivery Platform</strong><br>
9
+ From labeled GitHub issue to merged PR — zero human intervention.
10
+ </p>
16
11
 
17
- ```bash
18
- npm install -g shipwright-cli
19
- ```
12
+ <p align="center">
13
+ <a href="https://github.com/sethdford/shipwright/actions/workflows/test.yml"><img src="https://github.com/sethdford/shipwright/actions/workflows/test.yml/badge.svg" alt="Tests"></a>
14
+ <a href="https://github.com/sethdford/shipwright/actions/workflows/shipwright-pipeline.yml"><img src="https://github.com/sethdford/shipwright/actions/workflows/shipwright-pipeline.yml/badge.svg" alt="Pipeline"></a>
15
+ <img src="https://img.shields.io/badge/tests-400%2B_passing-4ade80?style=flat-square" alt="400+ tests">
16
+ <img src="https://img.shields.io/badge/version-1.8.1-00d4ff?style=flat-square" alt="v1.8.1">
17
+ <img src="https://img.shields.io/badge/license-MIT-green?style=flat-square" alt="MIT License">
18
+ <img src="https://img.shields.io/badge/bash-3.2%2B-7c3aed?style=flat-square" alt="Bash 3.2+">
19
+ </p>
20
20
 
21
- **curl**
21
+ ---
22
22
 
23
- ```bash
24
- curl -fsSL https://raw.githubusercontent.com/sethdford/shipwright/main/scripts/install-remote.sh | sh
25
- ```
23
+ ## Shipwright Builds Itself
26
24
 
27
- **Homebrew**
25
+ This repo uses Shipwright to process its own issues. Label a GitHub issue with `shipwright` and the autonomous pipeline takes over: semantic triage, plan, design, build, test, review, quality gates, PR. No human in the loop.
28
26
 
29
- ```bash
30
- brew install sethdford/shipwright/shipwright
31
- ```
27
+ **[See it live](../../actions/workflows/shipwright-pipeline.yml)** | **[Create an issue](../../issues/new?template=shipwright.yml)** and watch it build.
32
28
 
33
- **From source**
29
+ ---
34
30
 
35
- ```bash
36
- git clone https://github.com/sethdford/shipwright.git
37
- cd shipwright && ./install.sh
38
- ```
31
+ ## How It Works
39
32
 
40
- ## What's This?
33
+ ```mermaid
34
+ graph LR
35
+ A[GitHub Issue] -->|labeled 'shipwright'| B[Daemon]
36
+ B --> C[Triage & Score]
37
+ C --> D[Select Template]
38
+ D --> E[Pipeline]
41
39
 
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.
40
+ subgraph Pipeline ["12-Stage Pipeline"]
41
+ direction LR
42
+ E1[intake] --> E2[plan] --> E3[design] --> E4[build]
43
+ E4 --> E5[test] --> E6[review] --> E7[quality]
44
+ E7 --> E8[PR] --> E9[merge] --> E10[deploy]
45
+ E10 --> E11[validate] --> E12[monitor]
46
+ end
43
47
 
44
- Shipwright packages a complete setup:
48
+ E --> E1
49
+ E12 --> F[Merged PR]
45
50
 
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`
51
+ subgraph Intelligence ["Intelligence Layer"]
52
+ I1[Predictive Risk]
53
+ I2[Model Routing]
54
+ I3[Adversarial Review]
55
+ I4[Self-Optimization]
56
+ end
61
57
 
62
- ## Prerequisites
58
+ Intelligence -.->|enriches| Pipeline
63
59
 
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 |
60
+ style A fill:#00d4ff,color:#000
61
+ style F fill:#4ade80,color:#000
62
+ ```
72
63
 
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.
64
+ When tests fail, the pipeline re-enters the build loop with error context self-healing like a developer reading failures and fixing them. Convergence detection stops infinite loops. Error classification routes retries intelligently.
74
65
 
75
- ## Quick Start
66
+ ---
76
67
 
77
- **Option A: One-command setup (just tmux config, no prompts)**
68
+ ## Install
78
69
 
79
70
  ```bash
80
- git clone https://github.com/sethdford/shipwright.git
81
- cd shipwright
82
- shipwright init
71
+ curl -fsSL https://raw.githubusercontent.com/sethdford/shipwright/main/scripts/install-remote.sh | bash
83
72
  ```
84
73
 
85
- **Option B: Full interactive install (tmux + settings + hooks + CLI)**
74
+ <details>
75
+ <summary>Other methods</summary>
76
+
77
+ **From source**
86
78
 
87
79
  ```bash
88
80
  git clone https://github.com/sethdford/shipwright.git
89
- cd shipwright
90
- ./install.sh
81
+ cd shipwright && ./install.sh
91
82
  ```
92
83
 
93
- Then start a tmux session and launch Claude Code:
84
+ **npm** (global)
94
85
 
95
86
  ```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
87
+ npm install -g shipwright-cli
166
88
  ```
167
89
 
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:
90
+ **Verify**
193
91
 
194
92
  ```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
93
+ shipwright doctor
261
94
  ```
262
95
 
263
- ## Usage
96
+ </details>
264
97
 
265
- ### Starting a Team Session
98
+ ## Quick Start
266
99
 
267
100
  ```bash
268
- # Start tmux (if not already in a session)
269
- tmux new -s dev
101
+ # One-command setup
102
+ shipwright init
270
103
 
271
- # Option 1: Use a template leader gets 65% of the screen
272
- shipwright session my-feature --template feature-dev
104
+ # Process a GitHub issue end-to-end
105
+ shipwright pipeline start --issue 42
273
106
 
274
- # Option 2: Bare session then ask Claude to create a team
275
- shipwright session my-feature
107
+ # Watch GitHub and build autonomously 24/7
108
+ shipwright daemon start --detach
276
109
 
277
- # Option 3: tmux keybinding
278
- # Press Ctrl-a then T to launch a team session
110
+ # Spin up a 3-agent team for manual work
111
+ shipwright session my-feature -t feature-dev
279
112
 
280
- # Option 4: Just start Claude Code — it handles teams automatically
281
- claude
113
+ # Continuous build loop with test validation
114
+ shipwright loop "Build auth module" --test-cmd "npm test"
282
115
  ```
283
116
 
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"
117
+ ---
291
118
 
292
- # Multi-agent with audit and quality gates
293
- shipwright loop "Refactor the API layer" --agents 3 --audit --quality-gates
119
+ ## Features
294
120
 
295
- # With a definition of done
296
- shipwright loop "Build checkout flow" --definition-of-done requirements.md
121
+ ### 12-Stage Delivery Pipeline
297
122
 
298
- # Resume an interrupted loop
299
- shipwright loop --resume
123
+ ```
124
+ intake plan → design → build → test → review → compound_quality → pr → merge → deploy → validate → monitor
300
125
  ```
301
126
 
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
127
+ Each stage is configurable with quality gates that auto-proceed or pause for approval. 8 pipeline templates:
334
128
 
335
- # Browse available pipelines
336
- sw pipeline list
337
- sw pipeline show standard
338
- ```
129
+ | Template | Stages | Use Case |
130
+ | ------------ | --------------------------------- | ------------------------- |
131
+ | `fast` | intake → build → test → PR | Quick fixes, score >= 70 |
132
+ | `standard` | + plan, review | Normal feature work |
133
+ | `full` | All 12 stages | Production deployment |
134
+ | `hotfix` | Minimal, all auto | Urgent production fixes |
135
+ | `autonomous` | All stages, all auto | Daemon-driven delivery |
136
+ | `enterprise` | All stages, all gated | Maximum safety + rollback |
137
+ | `cost-aware` | All stages + budget checks | Budget-limited delivery |
138
+ | `deployed` | All + deploy + validate + monitor | Full deploy pipeline |
339
139
 
340
- **Pipeline stages:** `intake → plan → design → build → test → review → compound_quality → pr → merge → deploy → validate → monitor`
140
+ ### Intelligence Layer
341
141
 
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.
142
+ 7 modules that make the pipeline smarter over time. All optional, all degrade gracefully.
343
143
 
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`.
144
+ | Module | What It Does |
145
+ | ---------------------------- | --------------------------------------------------------------------------------------------------------------------- |
146
+ | **Semantic Triage** | AI-powered issue analysis, complexity scoring, template selection |
147
+ | **Pipeline Composer** | Generates custom pipeline configs from codebase analysis (file churn, test coverage, dependencies) |
148
+ | **Predictive Risk** | Scores issues for risk using GitHub signals (security alerts, similar past issues, contributor expertise) |
149
+ | **Adversarial Review** | Red-team code review — finds security flaws, edge cases, failure modes. Cross-checks against CodeQL/Dependabot alerts |
150
+ | **Self-Optimization** | Reads DORA metrics and auto-tunes daemon config. Proportional template weighting, adaptive memory timescales |
151
+ | **Developer Simulation** | 3-persona review (security, performance, maintainability) before PR creation |
152
+ | **Architecture Enforcement** | Living architectural model with violation detection and dependency direction rules |
345
153
 
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.
154
+ Adaptive everything: thresholds learn from history, model routing uses SPRT evidence-based switching, poll intervals adjust to queue depth, memory timescales tune based on fix effectiveness.
347
155
 
348
- **Auto-detection:** Test command (9+ project types), branch prefix from task type, reviewers from CODEOWNERS or git history, project language and framework.
156
+ ### GitHub Deep Integration
349
157
 
350
- **Notifications:** Slack webhook (`--slack-webhook <url>`) or custom webhook (`SHIPWRIGHT_WEBHOOK_URL` env var, with `CCT_WEBHOOK_URL` fallback) for pipeline events.
158
+ Native GitHub API integration enriches every intelligence module:
351
159
 
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 |
160
+ | API | Integration |
161
+ | --------------------- | ---------------------------------------------------------------------------------------- |
162
+ | **GraphQL** | File change frequency, blame data, contributor expertise, similar issues, commit history |
163
+ | **Checks API** | Native check runs per pipeline stage visible in PR timeline, blocks merges on failure |
164
+ | **Deployments API** | Tracks deployments per environment (staging/prod), rollback support, deployment history |
165
+ | **Security** | CodeQL + Dependabot alerts feed into risk scoring and adversarial review |
166
+ | **Contributors** | CODEOWNERS-based reviewer routing, top-contributor fallback, auto-approve as last resort |
167
+ | **Branch Protection** | Checks required reviews and status checks before attempting auto-merge |
362
168
 
363
169
  ### Autonomous Daemon
364
170
 
365
- Watch a GitHub repo for new issues and automatically deliver them through the pipeline:
366
-
367
171
  ```bash
368
- # Start watching (foreground)
369
- shipwright daemon start
370
-
371
- # Start in background tmux session
372
172
  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
173
  ```
390
174
 
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.
175
+ Watches GitHub for labeled issues and processes them 24/7:
396
176
 
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.
177
+ - **Auto-scaling**: Adjusts worker count based on CPU, memory, budget, and queue depth
178
+ - **Priority lanes**: Reserve a worker slot for urgent/hotfix issues
179
+ - **Retry with escalation**: Failed builds retry with template escalation (fast standard full)
180
+ - **Patrol mode**: Proactively scans for security issues, stale deps, dead code, coverage gaps
181
+ - **Self-optimization**: Tunes its own config based on DORA metrics over time
406
182
 
407
183
  ### Fleet Operations
408
184
 
409
- Orchestrate daemons across multiple repositories from a single config:
410
-
411
185
  ```bash
412
- # Generate fleet configuration
413
- shipwright fleet init
414
-
415
- # Start daemons for all configured repos
416
186
  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
187
  ```
427
188
 
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`.
189
+ Orchestrate daemons across multiple repositories with a shared worker pool. Workers rebalance based on queue depth, issue complexity, and repo priority.
473
190
 
474
191
  ### Persistent Memory
475
192
 
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
193
+ The pipeline learns from every run:
490
194
 
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.
195
+ - **Failure patterns**: Captured and injected into future builds so agents don't repeat mistakes
196
+ - **Fix effectiveness**: Tracks which fixes actually resolved issues
197
+ - **Prediction validation**: Compares predicted risk against actual outcomes, auto-adjusts thresholds
198
+ - **False-alarm tracking**: Reduces noise by learning which anomalies are real
503
199
 
504
200
  ### Cost Intelligence
505
201
 
506
- Track token usage, enforce budgets, and optimize model selection:
507
-
508
202
  ```bash
509
- # 7-day cost summary
510
203
  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
204
  ```
564
205
 
565
- ### Layout Presets
566
-
567
- Switch between pane arrangements with keybindings:
206
+ Per-pipeline cost tracking with model pricing, budget enforcement, and ROI analysis. Adaptive model routing picks the cheapest model that meets quality targets.
568
207
 
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
208
+ ### Real-Time Dashboard
576
209
 
577
210
  ```bash
578
- # Show running team sessions
579
- shipwright status
580
-
581
- # Or use the tmux keybinding: Ctrl-a then Ctrl-t
211
+ shipwright dashboard start
582
212
  ```
583
213
 
584
- ### Health Check
214
+ Web dashboard with live pipeline progress, GitHub context (security alerts, contributors, deployments), DORA metrics, and cost tracking. WebSocket-powered, updates in real-time.
215
+
216
+ ---
217
+
218
+ ## Commands
219
+
220
+ | Command | Purpose |
221
+ | ----------------------------------------- | -------------------------------- |
222
+ | `shipwright init` | One-command tmux setup |
223
+ | `shipwright setup` | Guided setup wizard |
224
+ | `shipwright pipeline start --issue N` | Full delivery pipeline for issue |
225
+ | `shipwright pipeline start --goal "..."` | Pipeline from goal description |
226
+ | `shipwright pipeline resume` | Resume from last checkpoint |
227
+ | `shipwright daemon start` | Watch GitHub for labeled issues |
228
+ | `shipwright daemon start --detach` | Background daemon in tmux |
229
+ | `shipwright daemon metrics` | DORA/DX metrics dashboard |
230
+ | `shipwright fleet start` | Multi-repo daemon orchestration |
231
+ | `shipwright fix "goal" --repos ~/a,~/b` | Apply same fix across repos |
232
+ | `shipwright loop "goal" --test-cmd "..."` | Continuous autonomous loop |
233
+ | `shipwright session name -t template` | Create team session with agents |
234
+ | `shipwright memory show` | View persistent memory |
235
+ | `shipwright cost show` | Token usage and spending |
236
+ | `shipwright cost budget set 50` | Set daily budget limit |
237
+ | `shipwright prep` | Analyze repo, generate configs |
238
+ | `shipwright doctor` | Validate setup, diagnose issues |
239
+ | `shipwright status` | Team dashboard |
240
+ | `shipwright ps` | Running agent processes |
241
+ | `shipwright logs team --follow` | Tail agent logs |
242
+ | `shipwright github context` | Show repo GitHub context |
243
+ | `shipwright github security` | CodeQL + Dependabot alerts |
244
+ | `shipwright checks list` | GitHub Check runs |
245
+ | `shipwright deploys list` | Deployment history |
246
+ | `shipwright intelligence` | Run intelligence analysis |
247
+ | `shipwright predict` | Risk assessment |
248
+ | `shipwright optimize` | Self-optimization pass |
249
+ | `shipwright dashboard` | Start web dashboard |
250
+ | `shipwright cleanup --force` | Kill orphaned sessions |
251
+ | `shipwright upgrade --apply` | Pull latest updates |
252
+
253
+ ## Pipeline Templates for Teams
254
+
255
+ 24 team templates covering the full SDLC:
585
256
 
586
257
  ```bash
587
- shipwright doctor # Checks: tmux, jq, overlay hooks, color config, orphaned sessions
258
+ shipwright templates list
588
259
  ```
589
260
 
590
261
  ## Configuration
591
262
 
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
263
+ | File | Purpose |
264
+ | ----------------------------- | -------------------------------------------------- |
265
+ | `.claude/daemon-config.json` | Daemon settings, intelligence flags, patrol config |
266
+ | `.claude/pipeline-state.md` | Current pipeline state |
267
+ | `templates/pipelines/*.json` | 8 pipeline template definitions |
268
+ | `tmux/templates/*.json` | 24 team composition templates |
269
+ | `~/.shipwright/events.jsonl` | Event log for metrics |
270
+ | `~/.shipwright/costs.json` | Cost tracking data |
271
+ | `~/.shipwright/budget.json` | Budget limits |
272
+ | `~/.shipwright/github-cache/` | Cached GitHub API responses |
609
273
 
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:
274
+ ## Prerequisites
649
275
 
650
- ```bash
651
- # Auto-install for your current shell
652
- ./scripts/install-completions.sh
276
+ | Requirement | Version | Install |
277
+ | --------------- | ------- | -------------------------------------- |
278
+ | tmux | 3.2+ | `brew install tmux` |
279
+ | jq | any | `brew install jq` |
280
+ | Claude Code CLI | latest | `npm i -g @anthropic-ai/claude-code` |
281
+ | Node.js | 20+ | For hooks and dashboard |
282
+ | Git | any | For installation |
283
+ | gh CLI | any | `brew install gh` (GitHub integration) |
653
284
 
654
- # Or manually source (bash)
655
- source completions/shipwright.bash
285
+ ## Architecture
656
286
 
657
- # Or manually install (zshadd to ~/.zfunc/)
658
- cp completions/_shipwright ~/.zfunc/_shipwright && compinit
287
+ 48 bash scripts (~51K lines), 22 test suites (400+ tests), plus a Bun TypeScript dashboard server. Bash 3.2 compatible runs on macOS out of the box.
659
288
 
660
- # Or manually install (fish)
661
- cp completions/shipwright.fish ~/.config/fish/completions/
662
289
  ```
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
- }
290
+ scripts/
291
+ sw # CLI router
292
+ sw-pipeline.sh # 12-stage delivery pipeline
293
+ sw-daemon.sh # Autonomous issue watcher
294
+ sw-loop.sh # Continuous build loop
295
+ sw-intelligence.sh # AI analysis engine
296
+ sw-predictive.sh # Risk scoring + anomaly detection
297
+ sw-adversarial.sh # Red-team code review
298
+ sw-self-optimize.sh # DORA-driven self-tuning
299
+ sw-pipeline-composer.sh # Dynamic pipeline generation
300
+ sw-github-graphql.sh # GitHub GraphQL client
301
+ sw-github-checks.sh # Native CI check runs
302
+ sw-github-deploy.sh # Deployment tracking
303
+ sw-fleet.sh # Multi-repo orchestration
304
+ sw-memory.sh # Persistent learning
305
+ sw-cost.sh # Cost intelligence
306
+ ... # 33 more scripts
307
+ dashboard/
308
+ server.ts # Bun WebSocket dashboard (4300+ lines)
309
+ public/ # Dashboard frontend
691
310
  ```
692
311
 
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
312
+ ## Contributing
755
313
 
756
- 12 templates covering the full SDLC and PDLC. Use `shipwright templates list` to browse, `shipwright templates show <name>` for details.
314
+ **Let Shipwright build it:** Create an issue using the [Shipwright template](../../issues/new?template=shipwright.yml) and label it `shipwright`. The autonomous pipeline will triage, plan, build, test, review, and create a PR.
757
315
 
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:
316
+ **Manual development:** Fork, branch, then:
908
317
 
909
318
  ```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
319
+ npm test # 400+ tests across 22 suites
913
320
  ```
914
321
 
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
322
  ## License
925
323
 
926
- [MIT](LICENSE) — Seth Ford, 2026.
324
+ MIT — Seth Ford, 2026.