shipwright-cli 3.0.0 → 3.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 (135) hide show
  1. package/README.md +3 -3
  2. package/completions/_shipwright +247 -93
  3. package/completions/shipwright.bash +69 -15
  4. package/completions/shipwright.fish +309 -41
  5. package/config/decision-tiers.json +55 -0
  6. package/config/event-schema.json +142 -5
  7. package/config/policy.json +8 -0
  8. package/package.json +3 -3
  9. package/scripts/lib/architecture.sh +2 -1
  10. package/scripts/lib/bootstrap.sh +0 -0
  11. package/scripts/lib/config.sh +0 -0
  12. package/scripts/lib/daemon-adaptive.sh +0 -0
  13. package/scripts/lib/daemon-dispatch.sh +24 -1
  14. package/scripts/lib/daemon-failure.sh +0 -0
  15. package/scripts/lib/daemon-health.sh +0 -0
  16. package/scripts/lib/daemon-patrol.sh +40 -5
  17. package/scripts/lib/daemon-poll.sh +17 -0
  18. package/scripts/lib/daemon-state.sh +10 -0
  19. package/scripts/lib/daemon-triage.sh +1 -1
  20. package/scripts/lib/decide-autonomy.sh +295 -0
  21. package/scripts/lib/decide-scoring.sh +228 -0
  22. package/scripts/lib/decide-signals.sh +462 -0
  23. package/scripts/lib/fleet-failover.sh +0 -0
  24. package/scripts/lib/helpers.sh +16 -17
  25. package/scripts/lib/pipeline-detection.sh +0 -0
  26. package/scripts/lib/pipeline-github.sh +0 -0
  27. package/scripts/lib/pipeline-intelligence.sh +20 -3
  28. package/scripts/lib/pipeline-quality-checks.sh +3 -2
  29. package/scripts/lib/pipeline-quality.sh +0 -0
  30. package/scripts/lib/pipeline-stages.sh +199 -32
  31. package/scripts/lib/pipeline-state.sh +14 -0
  32. package/scripts/lib/policy.sh +0 -0
  33. package/scripts/lib/test-helpers.sh +0 -0
  34. package/scripts/postinstall.mjs +75 -1
  35. package/scripts/signals/example-collector.sh +36 -0
  36. package/scripts/sw +8 -4
  37. package/scripts/sw-activity.sh +1 -1
  38. package/scripts/sw-adaptive.sh +1 -1
  39. package/scripts/sw-adversarial.sh +1 -1
  40. package/scripts/sw-architecture-enforcer.sh +1 -1
  41. package/scripts/sw-auth.sh +1 -1
  42. package/scripts/sw-autonomous.sh +1 -1
  43. package/scripts/sw-changelog.sh +1 -1
  44. package/scripts/sw-checkpoint.sh +1 -1
  45. package/scripts/sw-ci.sh +1 -1
  46. package/scripts/sw-cleanup.sh +1 -1
  47. package/scripts/sw-code-review.sh +1 -1
  48. package/scripts/sw-connect.sh +1 -1
  49. package/scripts/sw-context.sh +1 -1
  50. package/scripts/sw-cost.sh +12 -3
  51. package/scripts/sw-daemon.sh +2 -2
  52. package/scripts/sw-dashboard.sh +1 -1
  53. package/scripts/sw-db.sh +41 -34
  54. package/scripts/sw-decide.sh +685 -0
  55. package/scripts/sw-decompose.sh +1 -1
  56. package/scripts/sw-deps.sh +1 -1
  57. package/scripts/sw-developer-simulation.sh +1 -1
  58. package/scripts/sw-discovery.sh +27 -1
  59. package/scripts/sw-doc-fleet.sh +1 -1
  60. package/scripts/sw-docs-agent.sh +1 -1
  61. package/scripts/sw-docs.sh +1 -1
  62. package/scripts/sw-doctor.sh +1 -1
  63. package/scripts/sw-dora.sh +1 -1
  64. package/scripts/sw-durable.sh +1 -1
  65. package/scripts/sw-e2e-orchestrator.sh +1 -1
  66. package/scripts/sw-eventbus.sh +1 -1
  67. package/scripts/sw-evidence.sh +1 -1
  68. package/scripts/sw-feedback.sh +1 -1
  69. package/scripts/sw-fix.sh +1 -1
  70. package/scripts/sw-fleet-discover.sh +1 -1
  71. package/scripts/sw-fleet-viz.sh +1 -1
  72. package/scripts/sw-fleet.sh +1 -1
  73. package/scripts/sw-github-app.sh +1 -1
  74. package/scripts/sw-github-checks.sh +1 -1
  75. package/scripts/sw-github-deploy.sh +1 -1
  76. package/scripts/sw-github-graphql.sh +1 -1
  77. package/scripts/sw-guild.sh +1 -1
  78. package/scripts/sw-heartbeat.sh +1 -1
  79. package/scripts/sw-hygiene.sh +1 -1
  80. package/scripts/sw-incident.sh +1 -1
  81. package/scripts/sw-init.sh +1 -1
  82. package/scripts/sw-instrument.sh +1 -1
  83. package/scripts/sw-intelligence.sh +9 -5
  84. package/scripts/sw-jira.sh +1 -1
  85. package/scripts/sw-launchd.sh +1 -1
  86. package/scripts/sw-linear.sh +1 -1
  87. package/scripts/sw-logs.sh +1 -1
  88. package/scripts/sw-loop.sh +267 -17
  89. package/scripts/sw-memory.sh +22 -5
  90. package/scripts/sw-mission-control.sh +1 -1
  91. package/scripts/sw-model-router.sh +1 -1
  92. package/scripts/sw-otel.sh +5 -3
  93. package/scripts/sw-oversight.sh +1 -1
  94. package/scripts/sw-pipeline-composer.sh +1 -1
  95. package/scripts/sw-pipeline-vitals.sh +1 -1
  96. package/scripts/sw-pipeline.sh +73 -1
  97. package/scripts/sw-pm.sh +1 -1
  98. package/scripts/sw-pr-lifecycle.sh +7 -4
  99. package/scripts/sw-predictive.sh +1 -1
  100. package/scripts/sw-prep.sh +1 -1
  101. package/scripts/sw-ps.sh +1 -1
  102. package/scripts/sw-public-dashboard.sh +1 -1
  103. package/scripts/sw-quality.sh +9 -5
  104. package/scripts/sw-reaper.sh +1 -1
  105. package/scripts/sw-regression.sh +1 -1
  106. package/scripts/sw-release-manager.sh +1 -1
  107. package/scripts/sw-release.sh +1 -1
  108. package/scripts/sw-remote.sh +1 -1
  109. package/scripts/sw-replay.sh +1 -1
  110. package/scripts/sw-retro.sh +1 -1
  111. package/scripts/sw-review-rerun.sh +1 -1
  112. package/scripts/sw-scale.sh +66 -10
  113. package/scripts/sw-security-audit.sh +1 -1
  114. package/scripts/sw-self-optimize.sh +1 -1
  115. package/scripts/sw-session.sh +3 -3
  116. package/scripts/sw-setup.sh +1 -1
  117. package/scripts/sw-standup.sh +1 -1
  118. package/scripts/sw-status.sh +1 -1
  119. package/scripts/sw-strategic.sh +1 -1
  120. package/scripts/sw-stream.sh +1 -1
  121. package/scripts/sw-swarm.sh +1 -1
  122. package/scripts/sw-team-stages.sh +1 -1
  123. package/scripts/sw-templates.sh +1 -1
  124. package/scripts/sw-testgen.sh +1 -1
  125. package/scripts/sw-tmux-pipeline.sh +1 -1
  126. package/scripts/sw-tmux.sh +1 -1
  127. package/scripts/sw-trace.sh +1 -1
  128. package/scripts/sw-tracker.sh +1 -1
  129. package/scripts/sw-triage.sh +6 -6
  130. package/scripts/sw-upgrade.sh +1 -1
  131. package/scripts/sw-ux.sh +1 -1
  132. package/scripts/sw-webhook.sh +1 -1
  133. package/scripts/sw-widgets.sh +1 -1
  134. package/scripts/sw-worktree.sh +1 -1
  135. package/scripts/update-homebrew-sha.sh +21 -15
package/README.md CHANGED
@@ -13,7 +13,7 @@
13
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
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
15
  <img src="https://img.shields.io/badge/tests-141_suites_passing-4ade80?style=flat-square" alt="141 suites">
16
- <img src="https://img.shields.io/badge/version-3.0.0-00d4ff?style=flat-square" alt="v3.0.0">
16
+ <img src="https://img.shields.io/badge/version-3.1.0-00d4ff?style=flat-square" alt="v3.1.0">
17
17
  <img src="https://img.shields.io/badge/license-MIT-green?style=flat-square" alt="MIT License">
18
18
  <img src="https://img.shields.io/badge/bash-3.2%2B-7c3aed?style=flat-square" alt="Bash 3.2+">
19
19
  </p>
@@ -24,7 +24,7 @@
24
24
 
25
25
  - [Shipwright Builds Itself](#shipwright-builds-itself)
26
26
  - [Code Factory Pattern](#code-factory-pattern)
27
- - [What's New in v3.0.0](#whats-new-in-v300)
27
+ - [What's New in v3.1.0](#whats-new-in-v310)
28
28
  - [How It Works](#how-it-works)
29
29
  - [Install](#install)
30
30
  - [Quick Start](#quick-start)
@@ -108,7 +108,7 @@ shipwright incident gap sla
108
108
 
109
109
  ---
110
110
 
111
- ## What's New in v3.0.0
111
+ ## What's New in v3.1.0
112
112
 
113
113
  **Code Factory pattern** — deterministic, risk-aware agent delivery with machine-verifiable evidence:
114
114
 
@@ -7,11 +7,13 @@
7
7
  _shipwright() {
8
8
  local -a commands
9
9
  commands=(
10
+ # Command groups
10
11
  'agent:Agent management (recruit, swarm, standup, guild, oversight)'
11
- 'quality:Quality & review (code-review, security-audit, testgen, hygiene)'
12
+ 'quality:Quality & review (code-review, security-audit, testgen, hygiene, validate)'
12
13
  'observe:Observability (vitals, dora, retro, stream, activity, replay)'
13
- 'release:Release & deploy (release, release-manager, changelog, deploy)'
14
+ 'release:Release & deploy (release, release-manager, changelog, deploy, build)'
14
15
  'intel:Intelligence (predict, intelligence, strategic, optimize)'
16
+ # Core workflow
15
17
  'init:Quick tmux setup — one command, no prompts'
16
18
  'setup:Guided setup — prerequisites, init, doctor'
17
19
  'session:Create a new tmux window for a Claude team'
@@ -34,33 +36,103 @@ _shipwright() {
34
36
  'db:SQLite persistence — events, runs, developers'
35
37
  'fix:Bulk fix — apply a fix across multiple repos'
36
38
  'dashboard:Fleet Command — real-time dashboard'
37
- 'jira:Jira sync bidirectional issue sync'
38
- 'linear:Linear sync bidirectional issue sync'
39
+ # Agent management (also accessible via agent group)
40
+ 'swarm:Dynamic agent swarm management'
41
+ 'recruit:Agent recruitment & talent management'
42
+ 'standup:Automated daily standups for AI teams'
43
+ 'guild:Knowledge guilds & cross-team learning'
44
+ 'oversight:Quality oversight board'
45
+ 'pm:Autonomous PM agent for team orchestration'
46
+ 'team-stages:Multi-agent execution with roles'
47
+ 'scale:Dynamic agent team scaling'
48
+ # Quality (also accessible via quality group)
49
+ 'code-review:Clean code & architecture analysis'
50
+ 'security-audit:Comprehensive security auditing'
51
+ 'testgen:Autonomous test generation & coverage'
52
+ 'hygiene:Repository organization & cleanup'
53
+ 'adversarial:Red-team code review & edge case finding'
54
+ 'simulation:Multi-persona developer simulation'
55
+ 'architecture:Living architecture model & enforcement'
56
+ # Observability (also accessible via observe group)
57
+ 'vitals:Pipeline vitals — real-time health scoring'
58
+ 'dora:DORA metrics dashboard with intelligence'
59
+ 'retro:Sprint retrospective engine'
60
+ 'stream:Live terminal output streaming from panes'
61
+ 'activity:Live agent activity stream'
62
+ 'replay:Pipeline run replay & timeline viewing'
63
+ # Release (also accessible via release group)
64
+ 'changelog:Automated release notes & migration guides'
65
+ 'release-manager:Autonomous release pipeline'
66
+ 'review-rerun:SHA-deduped rerun comment writer'
67
+ # Intelligence (also accessible via intel group)
68
+ 'intelligence:Run intelligence engine analysis'
69
+ 'predict:Predictive risk assessment & anomaly detection'
70
+ 'strategic:Strategic intelligence agent'
71
+ 'optimize:Self-optimization based on DORA metrics'
72
+ 'adaptive:Data-driven pipeline tuning'
73
+ 'regression:Regression detection pipeline'
74
+ 'model:Intelligent model routing & cost optimization'
75
+ 'pipeline-composer:Dynamic pipeline composition'
76
+ # Integrations
77
+ 'jira:Jira ↔ GitHub bidirectional sync'
78
+ 'linear:Linear ↔ GitHub bidirectional sync'
39
79
  'tracker:Issue tracker — configure Linear/Jira'
40
- 'heartbeat:Agent heartbeatwrite/check/list'
41
- 'checkpoint:Checkpoints save/restore agent state'
80
+ 'github:GitHub contextrepo metadata'
81
+ 'github-app:GitHub App management & webhook receiver'
82
+ 'checks:GitHub checks — CI check runs'
83
+ 'ci:CI/CD workflow generation'
84
+ 'deploys:Deployments — deployment history'
42
85
  'webhook:GitHub webhooks — instant processing'
43
- 'decompose:Issue decomposer — analyze complexity'
86
+ 'auth:GitHub OAuth authentication'
87
+ # Operations
88
+ 'fleet-viz:Multi-repo fleet visualization'
89
+ 'public-dashboard:Public real-time pipeline progress'
90
+ 'mission-control:Terminal-based pipeline mission control'
44
91
  'connect:Team connect — sync local state'
45
92
  'remote:Remote machines — manage distributed workers'
46
93
  'launchd:Process supervision — auto-start on boot'
47
- 'docs:Documentation keeperauto-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'
94
+ 'heartbeat:Agent heartbeatwrite/check/list'
95
+ 'checkpoint:Checkpointssave/restore agent state'
96
+ 'autonomous:AI-building-AI master controller'
97
+ 'tmux-pipeline:Spawn and manage pipelines in tmux'
98
+ # Issue management
99
+ 'triage:Intelligent issue labeling & prioritization'
100
+ 'decompose:Issue decomposer — analyze complexity'
52
101
  'pr:PR lifecycle — auto-review, merge'
102
+ # Data & learning
103
+ 'instrument:Pipeline instrumentation & feedback loops'
104
+ 'discovery:Cross-pipeline real-time learning'
105
+ 'feedback:Production feedback loop'
106
+ 'eventbus:Durable event bus for components'
107
+ 'evidence:Machine-verifiable proof for deliveries'
108
+ 'otel:OpenTelemetry observability'
53
109
  'context:Context engine — gather context'
110
+ 'trace:E2E traceability (Issue → Commit → PR → Deploy)'
111
+ # Documentation
112
+ 'docs:Documentation keeper — auto-sync docs'
113
+ 'docs-agent:Auto-sync README, wiki, API docs'
114
+ 'doc-fleet:Documentation fleet orchestrator'
115
+ # Setup & maintenance
116
+ 'incident:Autonomous incident detection & response'
117
+ 'deps:Automated dependency update management'
118
+ 'durable:Durable workflow engine for long-running ops'
119
+ 'tmux:tmux health — doctor, install, fix'
120
+ 'ux:Premium UX enhancement layer'
121
+ 'widgets:Embeddable status widgets'
122
+ 'e2e:Test suite registry & execution'
123
+ # Meta
54
124
  'help:Show help message'
55
- 'version:Show version'
125
+ 'version:Show/bump/check version'
56
126
  )
57
127
 
128
+ local -a agent_cmds quality_cmds observe_cmds release_cmds intel_cmds
58
129
  local -a pipeline_cmds daemon_cmds fleet_cmds memory_cmds cost_cmds
59
130
  local -a templates_cmds worktree_cmds tracker_cmds heartbeat_cmds
60
131
  local -a checkpoint_cmds connect_cmds remote_cmds launchd_cmds
61
132
  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
133
+ local -a tmux_cmds decompose_cmds pr_cmds db_cmds ci_cmds auth_cmds
134
+ local -a autonomous_cmds version_cmds jira_cmds linear_cmds
135
+ local -a eventbus_cmds evidence_cmds webhook_cmds
64
136
 
65
137
  agent_cmds=(
66
138
  'recruit:Agent recruitment & talent management'
@@ -74,6 +146,8 @@ _shipwright() {
74
146
  'security-audit:Comprehensive security auditing'
75
147
  'testgen:Autonomous test generation'
76
148
  'hygiene:Repository organization & cleanup'
149
+ 'validate:Intelligent completion audits'
150
+ 'gate:Quality gate enforcement'
77
151
  )
78
152
  observe_cmds=(
79
153
  'vitals:Pipeline vitals — real-time scoring'
@@ -89,6 +163,7 @@ _shipwright() {
89
163
  'release-manager:Autonomous release pipeline'
90
164
  'changelog:Automated release notes'
91
165
  'deploy:Deployments — deployment history'
166
+ 'build:Build release tarballs'
92
167
  )
93
168
  intel_cmds=(
94
169
  'predict:Predictive risk assessment'
@@ -100,6 +175,9 @@ _shipwright() {
100
175
  'start:Start a new pipeline run'
101
176
  'resume:Resume from last stage'
102
177
  'status:Show pipeline progress dashboard'
178
+ 'abort:Cancel the running pipeline'
179
+ 'list:Browse pipeline templates'
180
+ 'show:Show pipeline template details'
103
181
  'test:Run pipeline test suite'
104
182
  )
105
183
  daemon_cmds=(
@@ -107,23 +185,36 @@ _shipwright() {
107
185
  'stop:Graceful shutdown'
108
186
  'status:Show active pipelines and queue'
109
187
  'metrics:DORA/DX metrics dashboard'
188
+ 'triage:Show issue triage scores'
189
+ 'patrol:Run proactive codebase patrol'
110
190
  'test:Run daemon test suite'
191
+ 'logs:View daemon logs'
192
+ 'init:Initialize daemon config'
111
193
  )
112
194
  fleet_cmds=(
113
195
  'start:Start daemons for all repos'
114
196
  'stop:Stop all daemons'
115
197
  'status:Show fleet-wide status'
116
198
  'metrics:Cross-repo DORA metrics'
199
+ 'discover:Auto-discover repos in GitHub org'
117
200
  'test:Run fleet test suite'
118
201
  )
119
202
  memory_cmds=(
120
203
  'show:Show learned patterns for this repo'
121
204
  'search:Search across all memories'
205
+ 'forget:Remove a memory entry'
206
+ 'export:Export memories to file'
207
+ 'import:Import memories from file'
122
208
  'stats:Memory usage and coverage'
209
+ 'test:Run memory test suite'
123
210
  )
124
211
  cost_cmds=(
125
212
  'show:Show cost summary'
126
213
  'budget:Manage daily budget'
214
+ 'record:Record token usage'
215
+ 'calculate:Calculate cost estimate'
216
+ 'check-budget:Check budget before starting'
217
+ 'remaining-budget:Check remaining daily budget'
127
218
  )
128
219
  templates_cmds=(
129
220
  'list:Browse team templates'
@@ -215,6 +306,62 @@ _shipwright() {
215
306
  'cleanup:Cleanup merged branches'
216
307
  'feedback:Get PR feedback'
217
308
  )
309
+ db_cmds=(
310
+ 'init:Initialize database'
311
+ 'health:Check database health'
312
+ 'migrate:Run migrations'
313
+ 'stats:Show database statistics'
314
+ 'query:Run a query'
315
+ 'export:Export data'
316
+ )
317
+ ci_cmds=(
318
+ 'generate:Generate CI workflows'
319
+ 'status:Show CI status'
320
+ 'test:Run CI test suite'
321
+ )
322
+ auth_cmds=(
323
+ 'login:Authenticate with GitHub'
324
+ 'logout:Revoke authentication'
325
+ 'status:Show auth status'
326
+ 'test:Run auth test suite'
327
+ )
328
+ autonomous_cmds=(
329
+ 'start:Start autonomous loop'
330
+ 'status:Show autonomous status'
331
+ 'test:Run autonomous test suite'
332
+ )
333
+ version_cmds=(
334
+ 'show:Show current version'
335
+ 'bump:Bump version everywhere'
336
+ 'check:Verify version consistency'
337
+ )
338
+ jira_cmds=(
339
+ 'sync:Sync Jira issues'
340
+ 'status:Show Jira sync status'
341
+ 'test:Run Jira test suite'
342
+ )
343
+ linear_cmds=(
344
+ 'sync:Sync Linear issues'
345
+ 'status:Show Linear sync status'
346
+ 'test:Run Linear test suite'
347
+ )
348
+ eventbus_cmds=(
349
+ 'emit:Emit an event'
350
+ 'listen:Listen for events'
351
+ 'status:Show bus status'
352
+ 'test:Run eventbus test suite'
353
+ )
354
+ evidence_cmds=(
355
+ 'capture:Capture evidence artifacts'
356
+ 'verify:Verify evidence freshness'
357
+ 'pre-pr:Run pre-PR evidence checks'
358
+ )
359
+ webhook_cmds=(
360
+ 'start:Start webhook receiver'
361
+ 'stop:Stop webhook receiver'
362
+ 'status:Show webhook status'
363
+ 'test:Run webhook test suite'
364
+ )
218
365
 
219
366
  _arguments -C \
220
367
  '1:command:->command' \
@@ -226,52 +373,24 @@ _shipwright() {
226
373
  ;;
227
374
  args)
228
375
  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
- ;;
376
+ agent) _describe -t agent-cmds 'agent command' agent_cmds ;;
377
+ quality) _describe -t quality-cmds 'quality command' quality_cmds ;;
378
+ observe) _describe -t observe-cmds 'observe command' observe_cmds ;;
379
+ release) _describe -t release-cmds 'release command' release_cmds ;;
380
+ intel) _describe -t intel-cmds 'intel command' intel_cmds ;;
244
381
  pipeline)
245
382
  _describe -t pipeline-cmds 'pipeline command' pipeline_cmds
246
383
  _arguments '*:options:_pipeline_options'
247
384
  ;;
248
- daemon)
249
- _describe -t daemon-cmds 'daemon command' daemon_cmds
250
- ;;
251
- fleet)
252
- _describe -t fleet-cmds 'fleet command' fleet_cmds
253
- ;;
254
- memory)
255
- _describe -t memory-cmds 'memory command' memory_cmds
256
- ;;
257
- cost)
258
- _describe -t cost-cmds 'cost command' cost_cmds
259
- ;;
260
- templates)
261
- _describe -t templates-cmds 'templates command' templates_cmds
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
- ;;
385
+ daemon) _describe -t daemon-cmds 'daemon command' daemon_cmds ;;
386
+ fleet) _describe -t fleet-cmds 'fleet command' fleet_cmds ;;
387
+ memory) _describe -t memory-cmds 'memory command' memory_cmds ;;
388
+ cost) _describe -t cost-cmds 'cost command' cost_cmds ;;
389
+ templates) _describe -t templates-cmds 'templates command' templates_cmds ;;
390
+ worktree) _describe -t worktree-cmds 'worktree command' worktree_cmds ;;
391
+ tracker) _describe -t tracker-cmds 'tracker command' tracker_cmds ;;
392
+ heartbeat) _describe -t heartbeat-cmds 'heartbeat command' heartbeat_cmds ;;
393
+ checkpoint) _describe -t checkpoint-cmds 'checkpoint command' checkpoint_cmds ;;
275
394
  connect)
276
395
  _describe -t connect-cmds 'connect command' connect_cmds
277
396
  _arguments '--token[Invite token]:token'
@@ -280,33 +399,25 @@ _shipwright() {
280
399
  _describe -t remote-cmds 'remote command' remote_cmds
281
400
  _arguments '--host[Hostname]:host' '--port[SSH port]:port' '--key[SSH key]:file' '--user[SSH user]:user'
282
401
  ;;
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
- ;;
402
+ launchd) _describe -t launchd-cmds 'launchd command' launchd_cmds ;;
403
+ dashboard) _describe -t dashboard-cmds 'dashboard command' dashboard_cmds ;;
404
+ github) _describe -t github-cmds 'github command' github_cmds ;;
405
+ checks) _describe -t checks-cmds 'checks command' checks_cmds ;;
406
+ deploys) _describe -t deploys-cmds 'deploys command' deploys_cmds ;;
407
+ docs) _describe -t docs-cmds 'docs command' docs_cmds ;;
408
+ tmux) _describe -t tmux-cmds 'tmux command' tmux_cmds ;;
409
+ decompose) _describe -t decompose-cmds 'decompose command' decompose_cmds ;;
410
+ pr) _describe -t pr-cmds 'pr command' pr_cmds ;;
411
+ db) _describe -t db-cmds 'db command' db_cmds ;;
412
+ ci) _describe -t ci-cmds 'ci command' ci_cmds ;;
413
+ auth) _describe -t auth-cmds 'auth command' auth_cmds ;;
414
+ autonomous) _describe -t autonomous-cmds 'autonomous command' autonomous_cmds ;;
415
+ version) _describe -t version-cmds 'version command' version_cmds ;;
416
+ jira) _describe -t jira-cmds 'jira command' jira_cmds ;;
417
+ linear) _describe -t linear-cmds 'linear command' linear_cmds ;;
418
+ eventbus) _describe -t eventbus-cmds 'eventbus command' eventbus_cmds ;;
419
+ evidence) _describe -t evidence-cmds 'evidence command' evidence_cmds ;;
420
+ webhook) _describe -t webhook-cmds 'webhook command' webhook_cmds ;;
310
421
  prep)
311
422
  _arguments \
312
423
  '--check[Audit existing prep quality]' \
@@ -319,20 +430,32 @@ _shipwright() {
319
430
  '--repo[Directory path]:directory:_directories' \
320
431
  '--local[Local-only mode (no GitHub)]' \
321
432
  '--test-cmd[Test command]:command:' \
433
+ '--fast-test-cmd[Fast subset test]:command:' \
434
+ '--fast-test-interval[Full test every N iterations]:count:' \
322
435
  '--max-iterations[Max iterations]:count:' \
323
436
  '--model[Model to use]:model:(opus sonnet haiku)' \
324
437
  '--agents[Number of agents]:count:' \
438
+ '--roles[Role per agent]:roles:' \
439
+ '--worktree[Use git worktrees for isolation]' \
325
440
  '--audit[Self-reflection each iteration]' \
326
441
  '--audit-agent[Separate auditor]' \
327
442
  '--quality-gates[Quality checks]' \
328
443
  '--definition-of-done[Checklist]:file:_files' \
329
444
  '--resume[Resume interrupted loop]' \
330
- '--skip-permissions[Skip prompts]'
445
+ '--max-restarts[Max session restarts]:count:' \
446
+ '--max-turns[Max API turns per session]:count:' \
447
+ '--skip-permissions[Skip prompts]' \
448
+ '--verbose[Show full Claude output]' \
449
+ '--no-auto-extend[Disable auto-extension]' \
450
+ '--extension-size[Additional iterations per extension]:count:' \
451
+ '--max-extensions[Max auto-extensions]:count:'
331
452
  ;;
332
453
  fix)
333
454
  _arguments \
334
455
  '1:goal:' \
335
- '--repos[Repository paths]:repos:'
456
+ '--repos[Repository paths]:repos:' \
457
+ '--worktree[Use git worktrees]' \
458
+ '--test-cmd[Test command]:command:'
336
459
  ;;
337
460
  logs)
338
461
  _arguments \
@@ -342,16 +465,30 @@ _shipwright() {
342
465
  '--grep[Search pattern]:pattern:'
343
466
  ;;
344
467
  cleanup)
345
- _arguments \
346
- '--force[Kill orphaned sessions]'
468
+ _arguments '--force[Kill orphaned sessions]'
347
469
  ;;
348
470
  upgrade)
349
- _arguments \
350
- '--apply[Apply updates]'
471
+ _arguments '--apply[Apply updates]'
351
472
  ;;
352
473
  reaper)
474
+ _arguments '--watch[Continuous watch mode]'
475
+ ;;
476
+ status)
477
+ _arguments '--json[JSON output]'
478
+ ;;
479
+ doctor)
480
+ _arguments '--json[JSON output]'
481
+ ;;
482
+ session)
353
483
  _arguments \
354
- '--watch[Continuous watch mode]'
484
+ '1:team name:' \
485
+ '--template[Team template]:template:' \
486
+ '-t[Team template]:template:' \
487
+ '--agents[Number of agents]:count:' \
488
+ '--roles[Agent roles]:roles:'
489
+ ;;
490
+ help)
491
+ _arguments '--all[Show all commands]' '-a[Show all commands]'
355
492
  ;;
356
493
  esac
357
494
  ;;
@@ -365,8 +502,25 @@ _pipeline_options() {
365
502
  '--repo[Directory path]:directory:_directories' \
366
503
  '--local[Local-only mode (no GitHub)]' \
367
504
  '--worktree[Use isolated worktree]' \
368
- '--template[Pipeline template]:file:_files' \
369
- '--skip-gates[Auto-proceed all gates]'
505
+ '--template[Pipeline template]:template:(fast standard full hotfix autonomous enterprise cost-aware deployed)' \
506
+ '--skip-gates[Auto-proceed all gates]' \
507
+ '--test-cmd[Test command]:command:' \
508
+ '--fast-test-cmd[Fast test command]:command:' \
509
+ '--model[Model to use]:model:(opus sonnet haiku)' \
510
+ '--agents[Number of agents]:count:' \
511
+ '--base[Base branch for PR]:branch:' \
512
+ '--reviewers[PR reviewers]:reviewers:' \
513
+ '--labels[PR labels]:labels:' \
514
+ '--no-github[Disable GitHub integration]' \
515
+ '--no-github-label[Do not modify issue labels]' \
516
+ '--ci[CI mode (non-interactive)]' \
517
+ '--ignore-budget[Skip budget enforcement]' \
518
+ '--dry-run[Show what would happen]' \
519
+ '--slack-webhook[Slack webhook URL]:url:' \
520
+ '--self-heal[Build retry cycles]:count:' \
521
+ '--max-iterations[Max build loop iterations]:count:' \
522
+ '--max-restarts[Max session restarts]:count:' \
523
+ '--completed-stages[Skip these stages]:stages:'
370
524
  }
371
525
 
372
526
  _shipwright "$@"
@@ -9,52 +9,54 @@ _shipwright_completions() {
9
9
  cur="${COMP_WORDS[COMP_CWORD]}"
10
10
  prev="${COMP_WORDS[COMP_CWORD-1]}"
11
11
 
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 simulation architecture vitals docs tmux github checks deploys pr context help version"
12
+ # Top-level commands all 90+ from the CLI router
13
+ local commands="agent quality observe release intel session status mission-control ps logs activity templates doctor cleanup reaper upgrade loop pipeline worktree prep hygiene daemon autonomous memory guild instrument cost adaptive regression incident db deps fleet fleet-viz fix init setup dashboard public-dashboard jira linear model tracker heartbeat standup checkpoint durable webhook connect remote launchd auth intelligence optimize predict adversarial simulation strategic architecture vitals stream docs changelog docs-agent doc-fleet release-manager replay review-rerun scale swarm dora retro tmux tmux-pipeline github checks ci deploys github-app decompose discovery context trace pr widgets feedback eventbus evidence otel triage pipeline-composer oversight code-review pm team-stages ux recruit testgen e2e security-audit help version"
14
14
 
15
15
  case "$prev" in
16
16
  shipwright|sw)
17
17
  COMPREPLY=( $(compgen -W "$commands" -- "$cur") )
18
18
  return 0
19
19
  ;;
20
+ # ─── Group routers ────────────────────────────────────────────────
20
21
  agent)
21
- COMPREPLY=( $(compgen -W "recruit swarm standup guild oversight" -- "$cur") )
22
+ COMPREPLY=( $(compgen -W "recruit swarm standup guild oversight help" -- "$cur") )
22
23
  return 0
23
24
  ;;
24
25
  quality)
25
- COMPREPLY=( $(compgen -W "code-review security-audit testgen hygiene" -- "$cur") )
26
+ COMPREPLY=( $(compgen -W "code-review security-audit testgen hygiene validate gate help" -- "$cur") )
26
27
  return 0
27
28
  ;;
28
29
  observe)
29
- COMPREPLY=( $(compgen -W "vitals dora retro stream activity replay status" -- "$cur") )
30
+ COMPREPLY=( $(compgen -W "vitals dora retro stream activity replay status help" -- "$cur") )
30
31
  return 0
31
32
  ;;
32
33
  release)
33
- COMPREPLY=( $(compgen -W "release release-manager changelog deploy build" -- "$cur") )
34
+ COMPREPLY=( $(compgen -W "release release-manager changelog deploy build help" -- "$cur") )
34
35
  return 0
35
36
  ;;
36
37
  intel)
37
- COMPREPLY=( $(compgen -W "predict intelligence strategic optimize" -- "$cur") )
38
+ COMPREPLY=( $(compgen -W "predict intelligence strategic optimize help" -- "$cur") )
38
39
  return 0
39
40
  ;;
41
+ # ─── Subcommands for flat commands ────────────────────────────────
40
42
  pipeline)
41
- COMPREPLY=( $(compgen -W "start resume status test" -- "$cur") )
43
+ COMPREPLY=( $(compgen -W "start resume status abort list show test" -- "$cur") )
42
44
  return 0
43
45
  ;;
44
46
  daemon)
45
- COMPREPLY=( $(compgen -W "start stop status metrics test" -- "$cur") )
47
+ COMPREPLY=( $(compgen -W "start stop status metrics triage patrol test logs init" -- "$cur") )
46
48
  return 0
47
49
  ;;
48
50
  fleet)
49
- COMPREPLY=( $(compgen -W "start stop status metrics test" -- "$cur") )
51
+ COMPREPLY=( $(compgen -W "start stop status metrics discover test" -- "$cur") )
50
52
  return 0
51
53
  ;;
52
54
  memory)
53
- COMPREPLY=( $(compgen -W "show search stats" -- "$cur") )
55
+ COMPREPLY=( $(compgen -W "show search forget export import stats test" -- "$cur") )
54
56
  return 0
55
57
  ;;
56
58
  cost)
57
- COMPREPLY=( $(compgen -W "show budget" -- "$cur") )
59
+ COMPREPLY=( $(compgen -W "show budget record calculate check-budget remaining-budget" -- "$cur") )
58
60
  return 0
59
61
  ;;
60
62
  templates)
@@ -121,9 +123,49 @@ _shipwright_completions() {
121
123
  COMPREPLY=( $(compgen -W "review merge cleanup feedback" -- "$cur") )
122
124
  return 0
123
125
  ;;
126
+ db)
127
+ COMPREPLY=( $(compgen -W "init health migrate stats query export" -- "$cur") )
128
+ return 0
129
+ ;;
130
+ ci)
131
+ COMPREPLY=( $(compgen -W "generate status test" -- "$cur") )
132
+ return 0
133
+ ;;
134
+ auth)
135
+ COMPREPLY=( $(compgen -W "login logout status test" -- "$cur") )
136
+ return 0
137
+ ;;
138
+ autonomous)
139
+ COMPREPLY=( $(compgen -W "start status test" -- "$cur") )
140
+ return 0
141
+ ;;
142
+ version)
143
+ COMPREPLY=( $(compgen -W "show bump check" -- "$cur") )
144
+ return 0
145
+ ;;
146
+ jira)
147
+ COMPREPLY=( $(compgen -W "sync status test" -- "$cur") )
148
+ return 0
149
+ ;;
150
+ linear)
151
+ COMPREPLY=( $(compgen -W "sync status test" -- "$cur") )
152
+ return 0
153
+ ;;
154
+ eventbus)
155
+ COMPREPLY=( $(compgen -W "emit listen status test" -- "$cur") )
156
+ return 0
157
+ ;;
158
+ evidence)
159
+ COMPREPLY=( $(compgen -W "capture verify pre-pr" -- "$cur") )
160
+ return 0
161
+ ;;
162
+ webhook)
163
+ COMPREPLY=( $(compgen -W "start stop status test" -- "$cur") )
164
+ return 0
165
+ ;;
124
166
  esac
125
167
 
126
- # Flags for subcommands already handled above; fall back to commands
168
+ # Flags for subcommands
127
169
  if [[ "$cur" == -* ]]; then
128
170
  case "${COMP_WORDS[1]}" in
129
171
  pipeline)
@@ -136,7 +178,7 @@ _shipwright_completions() {
136
178
  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") )
137
179
  ;;
138
180
  fix)
139
- COMPREPLY=( $(compgen -W "--repos" -- "$cur") )
181
+ COMPREPLY=( $(compgen -W "--repos --worktree --test-cmd" -- "$cur") )
140
182
  ;;
141
183
  logs)
142
184
  COMPREPLY=( $(compgen -W "--follow --lines --grep" -- "$cur") )
@@ -163,7 +205,19 @@ _shipwright_completions() {
163
205
  COMPREPLY=( $(compgen -W "--token" -- "$cur") )
164
206
  ;;
165
207
  cost)
166
- COMPREPLY=( $(compgen -W "--period --json --by-stage" -- "$cur") )
208
+ COMPREPLY=( $(compgen -W "--period --json --by-stage --by-issue" -- "$cur") )
209
+ ;;
210
+ daemon)
211
+ COMPREPLY=( $(compgen -W "--detach --no-github --max-parallel --auto-scale" -- "$cur") )
212
+ ;;
213
+ session)
214
+ COMPREPLY=( $(compgen -W "--template -t --agents --roles" -- "$cur") )
215
+ ;;
216
+ fleet)
217
+ COMPREPLY=( $(compgen -W "--org --language --config" -- "$cur") )
218
+ ;;
219
+ help)
220
+ COMPREPLY=( $(compgen -W "--all -a" -- "$cur") )
167
221
  ;;
168
222
  esac
169
223
  return 0