shipwright-cli 1.10.0 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (121) hide show
  1. package/README.md +221 -55
  2. package/completions/_shipwright +264 -32
  3. package/completions/shipwright.bash +118 -26
  4. package/completions/shipwright.fish +80 -2
  5. package/dashboard/server.ts +208 -0
  6. package/docs/strategy/01-market-research.md +619 -0
  7. package/docs/strategy/02-mission-and-brand.md +587 -0
  8. package/docs/strategy/03-gtm-and-roadmap.md +759 -0
  9. package/docs/strategy/QUICK-START.txt +289 -0
  10. package/docs/strategy/README.md +172 -0
  11. package/docs/tmux-research/TMUX-ARCHITECTURE.md +567 -0
  12. package/docs/tmux-research/TMUX-AUDIT.md +925 -0
  13. package/docs/tmux-research/TMUX-BEST-PRACTICES-2025-2026.md +829 -0
  14. package/docs/tmux-research/TMUX-QUICK-REFERENCE.md +543 -0
  15. package/docs/tmux-research/TMUX-RESEARCH-INDEX.md +438 -0
  16. package/package.json +4 -2
  17. package/scripts/lib/helpers.sh +7 -0
  18. package/scripts/sw +323 -2
  19. package/scripts/sw-activity.sh +500 -0
  20. package/scripts/sw-adaptive.sh +925 -0
  21. package/scripts/sw-adversarial.sh +1 -1
  22. package/scripts/sw-architecture-enforcer.sh +1 -1
  23. package/scripts/sw-auth.sh +613 -0
  24. package/scripts/sw-autonomous.sh +754 -0
  25. package/scripts/sw-changelog.sh +704 -0
  26. package/scripts/sw-checkpoint.sh +1 -1
  27. package/scripts/sw-ci.sh +602 -0
  28. package/scripts/sw-cleanup.sh +1 -1
  29. package/scripts/sw-code-review.sh +698 -0
  30. package/scripts/sw-connect.sh +1 -1
  31. package/scripts/sw-context.sh +605 -0
  32. package/scripts/sw-cost.sh +44 -3
  33. package/scripts/sw-daemon.sh +568 -138
  34. package/scripts/sw-dashboard.sh +1 -1
  35. package/scripts/sw-db.sh +1380 -0
  36. package/scripts/sw-decompose.sh +539 -0
  37. package/scripts/sw-deps.sh +551 -0
  38. package/scripts/sw-developer-simulation.sh +1 -1
  39. package/scripts/sw-discovery.sh +412 -0
  40. package/scripts/sw-docs-agent.sh +539 -0
  41. package/scripts/sw-docs.sh +1 -1
  42. package/scripts/sw-doctor.sh +107 -1
  43. package/scripts/sw-dora.sh +615 -0
  44. package/scripts/sw-durable.sh +710 -0
  45. package/scripts/sw-e2e-orchestrator.sh +535 -0
  46. package/scripts/sw-eventbus.sh +393 -0
  47. package/scripts/sw-feedback.sh +479 -0
  48. package/scripts/sw-fix.sh +1 -1
  49. package/scripts/sw-fleet-discover.sh +567 -0
  50. package/scripts/sw-fleet-viz.sh +404 -0
  51. package/scripts/sw-fleet.sh +8 -1
  52. package/scripts/sw-github-app.sh +596 -0
  53. package/scripts/sw-github-checks.sh +4 -4
  54. package/scripts/sw-github-deploy.sh +1 -1
  55. package/scripts/sw-github-graphql.sh +1 -1
  56. package/scripts/sw-guild.sh +569 -0
  57. package/scripts/sw-heartbeat.sh +1 -1
  58. package/scripts/sw-hygiene.sh +559 -0
  59. package/scripts/sw-incident.sh +656 -0
  60. package/scripts/sw-init.sh +237 -24
  61. package/scripts/sw-instrument.sh +699 -0
  62. package/scripts/sw-intelligence.sh +1 -1
  63. package/scripts/sw-jira.sh +1 -1
  64. package/scripts/sw-launchd.sh +363 -28
  65. package/scripts/sw-linear.sh +1 -1
  66. package/scripts/sw-logs.sh +1 -1
  67. package/scripts/sw-loop.sh +267 -21
  68. package/scripts/sw-memory.sh +18 -1
  69. package/scripts/sw-mission-control.sh +487 -0
  70. package/scripts/sw-model-router.sh +545 -0
  71. package/scripts/sw-otel.sh +596 -0
  72. package/scripts/sw-oversight.sh +764 -0
  73. package/scripts/sw-pipeline-composer.sh +1 -1
  74. package/scripts/sw-pipeline-vitals.sh +1 -1
  75. package/scripts/sw-pipeline.sh +947 -35
  76. package/scripts/sw-pm.sh +758 -0
  77. package/scripts/sw-pr-lifecycle.sh +522 -0
  78. package/scripts/sw-predictive.sh +8 -1
  79. package/scripts/sw-prep.sh +1 -1
  80. package/scripts/sw-ps.sh +1 -1
  81. package/scripts/sw-public-dashboard.sh +798 -0
  82. package/scripts/sw-quality.sh +595 -0
  83. package/scripts/sw-reaper.sh +1 -1
  84. package/scripts/sw-recruit.sh +2248 -0
  85. package/scripts/sw-regression.sh +642 -0
  86. package/scripts/sw-release-manager.sh +736 -0
  87. package/scripts/sw-release.sh +706 -0
  88. package/scripts/sw-remote.sh +1 -1
  89. package/scripts/sw-replay.sh +520 -0
  90. package/scripts/sw-retro.sh +691 -0
  91. package/scripts/sw-scale.sh +444 -0
  92. package/scripts/sw-security-audit.sh +505 -0
  93. package/scripts/sw-self-optimize.sh +1 -1
  94. package/scripts/sw-session.sh +1 -1
  95. package/scripts/sw-setup.sh +263 -127
  96. package/scripts/sw-standup.sh +712 -0
  97. package/scripts/sw-status.sh +44 -2
  98. package/scripts/sw-strategic.sh +806 -0
  99. package/scripts/sw-stream.sh +450 -0
  100. package/scripts/sw-swarm.sh +620 -0
  101. package/scripts/sw-team-stages.sh +511 -0
  102. package/scripts/sw-templates.sh +4 -4
  103. package/scripts/sw-testgen.sh +566 -0
  104. package/scripts/sw-tmux-pipeline.sh +554 -0
  105. package/scripts/sw-tmux-role-color.sh +58 -0
  106. package/scripts/sw-tmux-status.sh +128 -0
  107. package/scripts/sw-tmux.sh +1 -1
  108. package/scripts/sw-trace.sh +485 -0
  109. package/scripts/sw-tracker-github.sh +188 -0
  110. package/scripts/sw-tracker-jira.sh +172 -0
  111. package/scripts/sw-tracker-linear.sh +251 -0
  112. package/scripts/sw-tracker.sh +117 -2
  113. package/scripts/sw-triage.sh +627 -0
  114. package/scripts/sw-upgrade.sh +1 -1
  115. package/scripts/sw-ux.sh +677 -0
  116. package/scripts/sw-webhook.sh +627 -0
  117. package/scripts/sw-widgets.sh +530 -0
  118. package/scripts/sw-worktree.sh +1 -1
  119. package/templates/pipelines/autonomous.json +2 -2
  120. package/tmux/shipwright-overlay.conf +35 -17
  121. package/tmux/tmux.conf +23 -21
@@ -1,12 +1,19 @@
1
1
  #compdef shipwright sw cct
2
2
  # ╔═══════════════════════════════════════════════════════════════════════════╗
3
3
  # ║ Shipwright — Zsh tab completions ║
4
+ # ║ Auto-install to ~/.zsh/completions/ during shipwright init ║
4
5
  # ╚═══════════════════════════════════════════════════════════════════════════╝
5
- # Place in a directory in your $fpath (e.g. ~/.zfunc/) and run: compinit
6
6
 
7
7
  _shipwright() {
8
8
  local -a commands
9
9
  commands=(
10
+ 'agent:Agent management (recruit, swarm, standup, guild, oversight)'
11
+ 'quality:Quality & review (code-review, security-audit, testgen, hygiene)'
12
+ 'observe:Observability (vitals, dora, retro, stream, activity, replay)'
13
+ 'release:Release & deploy (release, release-manager, changelog, deploy)'
14
+ 'intel:Intelligence (predict, intelligence, strategic, optimize)'
15
+ 'init:Quick tmux setup — one command, no prompts'
16
+ 'setup:Guided setup — prerequisites, init, doctor'
10
17
  'session:Create a new tmux window for a Claude team'
11
18
  'status:Show dashboard of running teams and agents'
12
19
  'ps:Show running agent processes and status'
@@ -21,21 +28,78 @@ _shipwright() {
21
28
  'worktree:Manage git worktrees for agent isolation'
22
29
  'prep:Repo preparation — generate .claude/ configs'
23
30
  'daemon:Issue watcher — auto-process GitHub issues'
31
+ 'fleet:Multi-repo fleet — orchestrate daemons'
24
32
  'memory:Persistent memory — learn from every pipeline run'
25
- 'cost:Cost intelligence — track tokens, budgets, model routing'
26
- 'init:Quick tmux setup one command, no prompts'
33
+ 'cost:Cost intelligence — track tokens, budgets'
34
+ 'db:SQLite persistenceevents, runs, developers'
35
+ 'fix:Bulk fix — apply a fix across multiple repos'
36
+ 'dashboard:Fleet Command — real-time dashboard'
37
+ 'jira:Jira sync — bidirectional issue sync'
38
+ 'linear:Linear sync — bidirectional issue sync'
39
+ 'tracker:Issue tracker — configure Linear/Jira'
40
+ 'heartbeat:Agent heartbeat — write/check/list'
41
+ 'checkpoint:Checkpoints — save/restore agent state'
42
+ 'webhook:GitHub webhooks — instant processing'
43
+ 'decompose:Issue decomposer — analyze complexity'
44
+ 'connect:Team connect — sync local state'
45
+ 'remote:Remote machines — manage distributed workers'
46
+ 'launchd:Process supervision — auto-start on boot'
47
+ 'docs:Documentation keeper — auto-sync docs'
48
+ 'tmux:tmux health — doctor, install, fix'
49
+ 'github:GitHub context — repo metadata'
50
+ 'checks:GitHub checks — CI check runs'
51
+ 'deploys:Deployments — deployment history'
52
+ 'pr:PR lifecycle — auto-review, merge'
53
+ 'context:Context engine — gather context'
27
54
  'help:Show help message'
28
55
  'version:Show version'
29
56
  )
30
57
 
31
- local -a pipeline_cmds daemon_cmds templates_cmds
58
+ local -a pipeline_cmds daemon_cmds fleet_cmds memory_cmds cost_cmds
59
+ local -a templates_cmds worktree_cmds tracker_cmds heartbeat_cmds
60
+ local -a checkpoint_cmds connect_cmds remote_cmds launchd_cmds
61
+ local -a dashboard_cmds github_cmds checks_cmds deploys_cmds docs_cmds
62
+ local -a tmux_cmds decompose_cmds pr_cmds
63
+ local -a agent_cmds quality_cmds observe_cmds release_cmds intel_cmds
64
+
65
+ agent_cmds=(
66
+ 'recruit:Agent recruitment & talent management'
67
+ 'swarm:Dynamic agent swarm management'
68
+ 'standup:Automated daily standups'
69
+ 'guild:Knowledge guilds & cross-team learning'
70
+ 'oversight:Quality oversight board'
71
+ )
72
+ quality_cmds=(
73
+ 'code-review:Clean code & architecture analysis'
74
+ 'security-audit:Comprehensive security auditing'
75
+ 'testgen:Autonomous test generation'
76
+ 'hygiene:Repository organization & cleanup'
77
+ )
78
+ observe_cmds=(
79
+ 'vitals:Pipeline vitals — real-time scoring'
80
+ 'dora:DORA metrics dashboard'
81
+ 'retro:Sprint retrospective engine'
82
+ 'stream:Live terminal output streaming'
83
+ 'activity:Live agent activity stream'
84
+ 'replay:Pipeline DVR — view past runs'
85
+ 'status:Team status dashboard'
86
+ )
87
+ release_cmds=(
88
+ 'release:Release train automation'
89
+ 'release-manager:Autonomous release pipeline'
90
+ 'changelog:Automated release notes'
91
+ 'deploy:Deployments — deployment history'
92
+ )
93
+ intel_cmds=(
94
+ 'predict:Predictive risk assessment'
95
+ 'intelligence:Intelligence engine analysis'
96
+ 'strategic:Strategic intelligence agent'
97
+ 'optimize:Self-optimization based on DORA'
98
+ )
32
99
  pipeline_cmds=(
33
100
  'start:Start a new pipeline run'
34
101
  'resume:Resume from last stage'
35
102
  'status:Show pipeline progress dashboard'
36
- 'abort:Cancel the running pipeline'
37
- 'list:Browse available pipeline templates'
38
- 'show:Show details of a pipeline template'
39
103
  'test:Run pipeline test suite'
40
104
  )
41
105
  daemon_cmds=(
@@ -43,33 +107,114 @@ _shipwright() {
43
107
  'stop:Graceful shutdown'
44
108
  'status:Show active pipelines and queue'
45
109
  'metrics:DORA/DX metrics dashboard'
46
- 'triage:Show issue triage scores'
47
- 'patrol:Run proactive codebase patrol'
48
110
  'test:Run daemon test suite'
49
- 'logs:View daemon logs'
50
- 'init:Initialize daemon configuration'
51
111
  )
52
- local -a memory_cmds cost_cmds
112
+ fleet_cmds=(
113
+ 'start:Start daemons for all repos'
114
+ 'stop:Stop all daemons'
115
+ 'status:Show fleet-wide status'
116
+ 'metrics:Cross-repo DORA metrics'
117
+ 'test:Run fleet test suite'
118
+ )
53
119
  memory_cmds=(
54
120
  'show:Show learned patterns for this repo'
55
121
  'search:Search across all memories'
56
- 'forget:Remove a memory entry'
57
- 'export:Export memories to file'
58
- 'import:Import memories from file'
59
122
  'stats:Memory usage and coverage'
60
- 'test:Run memory test suite'
61
123
  )
62
124
  cost_cmds=(
63
- 'show:Show cost summary for current period'
125
+ 'show:Show cost summary'
64
126
  'budget:Manage daily budget'
65
- 'record:Record token usage'
66
- 'calculate:Calculate cost estimate'
67
- 'check-budget:Check budget before starting'
68
127
  )
69
128
  templates_cmds=(
70
129
  'list:Browse team templates'
71
130
  'show:Show template details'
72
131
  )
132
+ worktree_cmds=(
133
+ 'create:Create git worktree'
134
+ 'list:List active worktrees'
135
+ 'remove:Remove worktree'
136
+ )
137
+ tracker_cmds=(
138
+ 'init:Initialize tracker'
139
+ 'status:Show tracker status'
140
+ 'sync:Sync issues'
141
+ 'test:Run tracker test suite'
142
+ )
143
+ heartbeat_cmds=(
144
+ 'write:Write heartbeat'
145
+ 'check:Check heartbeat'
146
+ 'list:List heartbeats'
147
+ 'clear:Clear heartbeats'
148
+ )
149
+ checkpoint_cmds=(
150
+ 'save:Save agent state'
151
+ 'restore:Restore agent state'
152
+ 'list:List checkpoints'
153
+ 'delete:Delete checkpoint'
154
+ )
155
+ connect_cmds=(
156
+ 'start:Sync to team dashboard'
157
+ 'stop:Stop connection'
158
+ 'join:Join a team'
159
+ 'status:Show connection status'
160
+ )
161
+ remote_cmds=(
162
+ 'list:Show remote machines'
163
+ 'add:Register a remote'
164
+ 'remove:Remove a remote'
165
+ 'status:Health check remotes'
166
+ 'test:Run remote test suite'
167
+ )
168
+ launchd_cmds=(
169
+ 'install:Auto-start on boot'
170
+ 'uninstall:Remove services'
171
+ 'status:Show service status'
172
+ 'test:Run launchd test suite'
173
+ )
174
+ dashboard_cmds=(
175
+ 'start:Start dashboard'
176
+ 'stop:Stop dashboard'
177
+ 'status:Show dashboard status'
178
+ )
179
+ github_cmds=(
180
+ 'context:Show GitHub context'
181
+ 'security:Show security alerts'
182
+ 'blame:Show file ownership'
183
+ )
184
+ checks_cmds=(
185
+ 'list:Show check runs'
186
+ 'status:Show check status'
187
+ 'test:Run checks test suite'
188
+ )
189
+ deploys_cmds=(
190
+ 'list:Show deployment history'
191
+ 'status:Show deployment status'
192
+ 'test:Run deploys test suite'
193
+ )
194
+ docs_cmds=(
195
+ 'check:Report stale sections'
196
+ 'sync:Regenerate stale sections'
197
+ 'wiki:Generate wiki pages'
198
+ 'report:Show freshness report'
199
+ 'test:Run docs test suite'
200
+ )
201
+ tmux_cmds=(
202
+ 'doctor:Check Claude compat'
203
+ 'install:Install TPM'
204
+ 'fix:Auto-fix issues'
205
+ 'reload:Reload config'
206
+ 'test:Run tmux test suite'
207
+ )
208
+ decompose_cmds=(
209
+ 'analyze:Analyze complexity'
210
+ 'create-subtasks:Create subtasks'
211
+ )
212
+ pr_cmds=(
213
+ 'review:Auto-review PR'
214
+ 'merge:Auto-merge PR'
215
+ 'cleanup:Cleanup merged branches'
216
+ 'feedback:Get PR feedback'
217
+ )
73
218
 
74
219
  _arguments -C \
75
220
  '1:command:->command' \
@@ -81,12 +226,31 @@ _shipwright() {
81
226
  ;;
82
227
  args)
83
228
  case "${words[1]}" in
229
+ agent)
230
+ _describe -t agent-cmds 'agent command' agent_cmds
231
+ ;;
232
+ quality)
233
+ _describe -t quality-cmds 'quality command' quality_cmds
234
+ ;;
235
+ observe)
236
+ _describe -t observe-cmds 'observe command' observe_cmds
237
+ ;;
238
+ release)
239
+ _describe -t release-cmds 'release command' release_cmds
240
+ ;;
241
+ intel)
242
+ _describe -t intel-cmds 'intel command' intel_cmds
243
+ ;;
84
244
  pipeline)
85
245
  _describe -t pipeline-cmds 'pipeline command' pipeline_cmds
246
+ _arguments '*:options:_pipeline_options'
86
247
  ;;
87
248
  daemon)
88
249
  _describe -t daemon-cmds 'daemon command' daemon_cmds
89
250
  ;;
251
+ fleet)
252
+ _describe -t fleet-cmds 'fleet command' fleet_cmds
253
+ ;;
90
254
  memory)
91
255
  _describe -t memory-cmds 'memory command' memory_cmds
92
256
  ;;
@@ -96,6 +260,53 @@ _shipwright() {
96
260
  templates)
97
261
  _describe -t templates-cmds 'templates command' templates_cmds
98
262
  ;;
263
+ worktree)
264
+ _describe -t worktree-cmds 'worktree command' worktree_cmds
265
+ ;;
266
+ tracker)
267
+ _describe -t tracker-cmds 'tracker command' tracker_cmds
268
+ ;;
269
+ heartbeat)
270
+ _describe -t heartbeat-cmds 'heartbeat command' heartbeat_cmds
271
+ ;;
272
+ checkpoint)
273
+ _describe -t checkpoint-cmds 'checkpoint command' checkpoint_cmds
274
+ ;;
275
+ connect)
276
+ _describe -t connect-cmds 'connect command' connect_cmds
277
+ _arguments '--token[Invite token]:token'
278
+ ;;
279
+ remote)
280
+ _describe -t remote-cmds 'remote command' remote_cmds
281
+ _arguments '--host[Hostname]:host' '--port[SSH port]:port' '--key[SSH key]:file' '--user[SSH user]:user'
282
+ ;;
283
+ launchd)
284
+ _describe -t launchd-cmds 'launchd command' launchd_cmds
285
+ ;;
286
+ dashboard)
287
+ _describe -t dashboard-cmds 'dashboard command' dashboard_cmds
288
+ ;;
289
+ github)
290
+ _describe -t github-cmds 'github command' github_cmds
291
+ ;;
292
+ checks)
293
+ _describe -t checks-cmds 'checks command' checks_cmds
294
+ ;;
295
+ deploys)
296
+ _describe -t deploys-cmds 'deploys command' deploys_cmds
297
+ ;;
298
+ docs)
299
+ _describe -t docs-cmds 'docs command' docs_cmds
300
+ ;;
301
+ tmux)
302
+ _describe -t tmux-cmds 'tmux command' tmux_cmds
303
+ ;;
304
+ decompose)
305
+ _describe -t decompose-cmds 'decompose command' decompose_cmds
306
+ ;;
307
+ pr)
308
+ _describe -t pr-cmds 'pr command' pr_cmds
309
+ ;;
99
310
  prep)
100
311
  _arguments \
101
312
  '--check[Audit existing prep quality]' \
@@ -104,29 +315,39 @@ _shipwright() {
104
315
  ;;
105
316
  loop)
106
317
  _arguments \
107
- '--test-cmd[Test command to verify each iteration]:command:' \
108
- '--max-iterations[Maximum loop iterations]:count:' \
109
- '--model[Claude model to use]:model:(opus sonnet haiku)' \
318
+ '1:goal:' \
319
+ '--repo[Directory path]:directory:_directories' \
320
+ '--local[Local-only mode (no GitHub)]' \
321
+ '--test-cmd[Test command]:command:' \
322
+ '--max-iterations[Max iterations]:count:' \
323
+ '--model[Model to use]:model:(opus sonnet haiku)' \
110
324
  '--agents[Number of agents]:count:' \
111
- '--audit[Enable self-reflection each iteration]' \
112
- '--audit-agent[Use separate auditor agent]' \
113
- '--quality-gates[Enable automated quality checks]' \
114
- '--definition-of-done[Custom completion checklist]:file:_files' \
325
+ '--audit[Self-reflection each iteration]' \
326
+ '--audit-agent[Separate auditor]' \
327
+ '--quality-gates[Quality checks]' \
328
+ '--definition-of-done[Checklist]:file:_files' \
115
329
  '--resume[Resume interrupted loop]' \
116
- '--skip-permissions[Skip permission prompts]'
330
+ '--skip-permissions[Skip prompts]'
331
+ ;;
332
+ fix)
333
+ _arguments \
334
+ '1:goal:' \
335
+ '--repos[Repository paths]:repos:'
117
336
  ;;
118
337
  logs)
119
338
  _arguments \
120
- '--follow[Tail logs in real time]' \
121
- '--lines[Number of lines to show]:count:'
339
+ '1:team name:' \
340
+ '--follow[Tail logs]' \
341
+ '--lines[Number of lines]:count:' \
342
+ '--grep[Search pattern]:pattern:'
122
343
  ;;
123
344
  cleanup)
124
345
  _arguments \
125
- '--force[Actually kill orphaned sessions]'
346
+ '--force[Kill orphaned sessions]'
126
347
  ;;
127
348
  upgrade)
128
349
  _arguments \
129
- '--apply[Apply available updates]'
350
+ '--apply[Apply updates]'
130
351
  ;;
131
352
  reaper)
132
353
  _arguments \
@@ -137,4 +358,15 @@ _shipwright() {
137
358
  esac
138
359
  }
139
360
 
361
+ _pipeline_options() {
362
+ _arguments \
363
+ '--issue[GitHub issue number]:issue:' \
364
+ '--goal[Goal description]:goal:' \
365
+ '--repo[Directory path]:directory:_directories' \
366
+ '--local[Local-only mode (no GitHub)]' \
367
+ '--worktree[Use isolated worktree]' \
368
+ '--template[Pipeline template]:file:_files' \
369
+ '--skip-gates[Auto-proceed all gates]'
370
+ }
371
+
140
372
  _shipwright "$@"
@@ -1,64 +1,124 @@
1
1
  #!/usr/bin/env bash
2
2
  # ╔═══════════════════════════════════════════════════════════════════════════╗
3
3
  # ║ Shipwright — Bash tab completions ║
4
+ # ║ Auto-install to ~/.local/share/bash-completion/completions/ during init║
4
5
  # ╚═══════════════════════════════════════════════════════════════════════════╝
5
- # Source this file or place it in /usr/local/etc/bash_completion.d/
6
6
 
7
7
  _shipwright_completions() {
8
8
  local cur prev
9
9
  cur="${COMP_WORDS[COMP_CWORD]}"
10
10
  prev="${COMP_WORDS[COMP_CWORD-1]}"
11
11
 
12
- # Top-level commands
13
- local commands="session status ps logs templates doctor cleanup reaper upgrade loop pipeline worktree prep daemon memory cost init help version"
12
+ # Top-level commands (includes groups and flat commands)
13
+ local commands="agent quality observe release intel init setup session status ps logs templates doctor cleanup reaper upgrade loop pipeline worktree prep daemon fleet memory cost db fix dashboard jira linear tracker heartbeat checkpoint webhook decompose connect remote launchd intelligence optimize predict adversarial simulate architecture vitals docs tmux github checks deploys pr context help version"
14
14
 
15
15
  case "$prev" in
16
16
  shipwright|sw|cct)
17
17
  COMPREPLY=( $(compgen -W "$commands" -- "$cur") )
18
18
  return 0
19
19
  ;;
20
+ agent)
21
+ COMPREPLY=( $(compgen -W "recruit swarm standup guild oversight" -- "$cur") )
22
+ return 0
23
+ ;;
24
+ quality)
25
+ COMPREPLY=( $(compgen -W "code-review security-audit testgen hygiene" -- "$cur") )
26
+ return 0
27
+ ;;
28
+ observe)
29
+ COMPREPLY=( $(compgen -W "vitals dora retro stream activity replay status" -- "$cur") )
30
+ return 0
31
+ ;;
32
+ release)
33
+ COMPREPLY=( $(compgen -W "release release-manager changelog deploy" -- "$cur") )
34
+ return 0
35
+ ;;
36
+ intel)
37
+ COMPREPLY=( $(compgen -W "predict intelligence strategic optimize" -- "$cur") )
38
+ return 0
39
+ ;;
20
40
  pipeline)
21
- COMPREPLY=( $(compgen -W "start resume status abort list show test" -- "$cur") )
41
+ COMPREPLY=( $(compgen -W "start resume status test" -- "$cur") )
22
42
  return 0
23
43
  ;;
24
44
  daemon)
25
- COMPREPLY=( $(compgen -W "start stop status metrics triage patrol test logs init" -- "$cur") )
45
+ COMPREPLY=( $(compgen -W "start stop status metrics test" -- "$cur") )
46
+ return 0
47
+ ;;
48
+ fleet)
49
+ COMPREPLY=( $(compgen -W "start stop status metrics test" -- "$cur") )
26
50
  return 0
27
51
  ;;
28
52
  memory)
29
- COMPREPLY=( $(compgen -W "show search forget export import stats test" -- "$cur") )
53
+ COMPREPLY=( $(compgen -W "show search stats" -- "$cur") )
30
54
  return 0
31
55
  ;;
32
56
  cost)
33
- COMPREPLY=( $(compgen -W "show budget record calculate check-budget" -- "$cur") )
57
+ COMPREPLY=( $(compgen -W "show budget" -- "$cur") )
34
58
  return 0
35
59
  ;;
36
60
  templates)
37
61
  COMPREPLY=( $(compgen -W "list show" -- "$cur") )
38
62
  return 0
39
63
  ;;
40
- prep)
41
- COMPREPLY=( $(compgen -W "--check --with-claude --verbose" -- "$cur") )
64
+ worktree)
65
+ COMPREPLY=( $(compgen -W "create list remove" -- "$cur") )
66
+ return 0
67
+ ;;
68
+ tracker)
69
+ COMPREPLY=( $(compgen -W "init status sync test" -- "$cur") )
70
+ return 0
71
+ ;;
72
+ heartbeat)
73
+ COMPREPLY=( $(compgen -W "write check list clear" -- "$cur") )
74
+ return 0
75
+ ;;
76
+ checkpoint)
77
+ COMPREPLY=( $(compgen -W "save restore list delete" -- "$cur") )
78
+ return 0
79
+ ;;
80
+ connect)
81
+ COMPREPLY=( $(compgen -W "start stop join status" -- "$cur") )
82
+ return 0
83
+ ;;
84
+ remote)
85
+ COMPREPLY=( $(compgen -W "list add remove status test" -- "$cur") )
86
+ return 0
87
+ ;;
88
+ launchd)
89
+ COMPREPLY=( $(compgen -W "install uninstall status test" -- "$cur") )
90
+ return 0
91
+ ;;
92
+ dashboard)
93
+ COMPREPLY=( $(compgen -W "start stop status" -- "$cur") )
94
+ return 0
95
+ ;;
96
+ github)
97
+ COMPREPLY=( $(compgen -W "context security blame" -- "$cur") )
98
+ return 0
99
+ ;;
100
+ checks)
101
+ COMPREPLY=( $(compgen -W "list status test" -- "$cur") )
42
102
  return 0
43
103
  ;;
44
- loop)
45
- COMPREPLY=( $(compgen -W "--test-cmd --max-iterations --model --agents --audit --audit-agent --quality-gates --definition-of-done --resume --skip-permissions" -- "$cur") )
104
+ deploys)
105
+ COMPREPLY=( $(compgen -W "list status test" -- "$cur") )
46
106
  return 0
47
107
  ;;
48
- logs)
49
- COMPREPLY=( $(compgen -W "--follow --lines" -- "$cur") )
108
+ docs)
109
+ COMPREPLY=( $(compgen -W "check sync wiki report test" -- "$cur") )
50
110
  return 0
51
111
  ;;
52
- cleanup)
53
- COMPREPLY=( $(compgen -W "--force" -- "$cur") )
112
+ tmux)
113
+ COMPREPLY=( $(compgen -W "doctor install fix reload test" -- "$cur") )
54
114
  return 0
55
115
  ;;
56
- upgrade)
57
- COMPREPLY=( $(compgen -W "--apply" -- "$cur") )
116
+ decompose)
117
+ COMPREPLY=( $(compgen -W "analyze create-subtasks" -- "$cur") )
58
118
  return 0
59
119
  ;;
60
- reaper)
61
- COMPREPLY=( $(compgen -W "--watch" -- "$cur") )
120
+ pr)
121
+ COMPREPLY=( $(compgen -W "review merge cleanup feedback" -- "$cur") )
62
122
  return 0
63
123
  ;;
64
124
  budget)
@@ -70,13 +130,45 @@ _shipwright_completions() {
70
130
  # Flags for subcommands already handled above; fall back to commands
71
131
  if [[ "$cur" == -* ]]; then
72
132
  case "${COMP_WORDS[1]}" in
73
- prep) COMPREPLY=( $(compgen -W "--check --with-claude --verbose" -- "$cur") ) ;;
74
- loop) COMPREPLY=( $(compgen -W "--test-cmd --max-iterations --model --agents --audit --audit-agent --quality-gates --definition-of-done --resume --skip-permissions" -- "$cur") ) ;;
75
- logs) COMPREPLY=( $(compgen -W "--follow --lines" -- "$cur") ) ;;
76
- cleanup) COMPREPLY=( $(compgen -W "--force" -- "$cur") ) ;;
77
- upgrade) COMPREPLY=( $(compgen -W "--apply" -- "$cur") ) ;;
78
- reaper) COMPREPLY=( $(compgen -W "--watch" -- "$cur") ) ;;
79
- cost) COMPREPLY=( $(compgen -W "--period --json --by-stage --by-issue" -- "$cur") ) ;;
133
+ pipeline)
134
+ COMPREPLY=( $(compgen -W "--issue --goal --repo --local --worktree --template --skip-gates --test-cmd --model --agents --base --reviewers --labels --no-github --no-github-label --ci --ignore-budget --dry-run --slack-webhook --self-heal --max-iterations --max-restarts --fast-test-cmd --completed-stages" -- "$cur") )
135
+ ;;
136
+ prep)
137
+ COMPREPLY=( $(compgen -W "--check --with-claude --verbose" -- "$cur") )
138
+ ;;
139
+ loop)
140
+ COMPREPLY=( $(compgen -W "--repo --local --test-cmd --fast-test-cmd --fast-test-interval --max-iterations --model --agents --roles --worktree --skip-permissions --max-turns --resume --max-restarts --verbose --audit --audit-agent --quality-gates --definition-of-done --no-auto-extend --extension-size --max-extensions" -- "$cur") )
141
+ ;;
142
+ fix)
143
+ COMPREPLY=( $(compgen -W "--repos" -- "$cur") )
144
+ ;;
145
+ logs)
146
+ COMPREPLY=( $(compgen -W "--follow --lines --grep" -- "$cur") )
147
+ ;;
148
+ cleanup)
149
+ COMPREPLY=( $(compgen -W "--force" -- "$cur") )
150
+ ;;
151
+ upgrade)
152
+ COMPREPLY=( $(compgen -W "--apply" -- "$cur") )
153
+ ;;
154
+ reaper)
155
+ COMPREPLY=( $(compgen -W "--watch" -- "$cur") )
156
+ ;;
157
+ status)
158
+ COMPREPLY=( $(compgen -W "--json" -- "$cur") )
159
+ ;;
160
+ doctor)
161
+ COMPREPLY=( $(compgen -W "--json" -- "$cur") )
162
+ ;;
163
+ remote)
164
+ COMPREPLY=( $(compgen -W "--host --port --key --user" -- "$cur") )
165
+ ;;
166
+ connect)
167
+ COMPREPLY=( $(compgen -W "--token" -- "$cur") )
168
+ ;;
169
+ cost)
170
+ COMPREPLY=( $(compgen -W "--period --json --by-stage" -- "$cur") )
171
+ ;;
80
172
  esac
81
173
  return 0
82
174
  fi