shipwright-cli 1.9.0 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/hooks/post-tool-use.sh +12 -5
- package/README.md +114 -36
- package/completions/_shipwright +212 -32
- package/completions/shipwright.bash +97 -25
- package/docs/strategy/01-market-research.md +619 -0
- package/docs/strategy/02-mission-and-brand.md +587 -0
- package/docs/strategy/03-gtm-and-roadmap.md +759 -0
- package/docs/strategy/QUICK-START.txt +289 -0
- package/docs/strategy/README.md +172 -0
- package/package.json +4 -2
- package/scripts/sw +217 -2
- package/scripts/sw-activity.sh +500 -0
- package/scripts/sw-adaptive.sh +925 -0
- package/scripts/sw-adversarial.sh +1 -1
- package/scripts/sw-architecture-enforcer.sh +1 -1
- package/scripts/sw-auth.sh +613 -0
- package/scripts/sw-autonomous.sh +664 -0
- package/scripts/sw-changelog.sh +704 -0
- package/scripts/sw-checkpoint.sh +79 -1
- package/scripts/sw-ci.sh +602 -0
- package/scripts/sw-cleanup.sh +192 -7
- package/scripts/sw-code-review.sh +637 -0
- package/scripts/sw-connect.sh +1 -1
- package/scripts/sw-context.sh +605 -0
- package/scripts/sw-cost.sh +1 -1
- package/scripts/sw-daemon.sh +812 -138
- package/scripts/sw-dashboard.sh +1 -1
- package/scripts/sw-db.sh +540 -0
- package/scripts/sw-decompose.sh +539 -0
- package/scripts/sw-deps.sh +551 -0
- package/scripts/sw-developer-simulation.sh +1 -1
- package/scripts/sw-discovery.sh +412 -0
- package/scripts/sw-docs-agent.sh +539 -0
- package/scripts/sw-docs.sh +1 -1
- package/scripts/sw-doctor.sh +59 -1
- package/scripts/sw-dora.sh +615 -0
- package/scripts/sw-durable.sh +710 -0
- package/scripts/sw-e2e-orchestrator.sh +535 -0
- package/scripts/sw-eventbus.sh +393 -0
- package/scripts/sw-feedback.sh +471 -0
- package/scripts/sw-fix.sh +1 -1
- package/scripts/sw-fleet-discover.sh +567 -0
- package/scripts/sw-fleet-viz.sh +404 -0
- package/scripts/sw-fleet.sh +8 -1
- package/scripts/sw-github-app.sh +596 -0
- package/scripts/sw-github-checks.sh +1 -1
- package/scripts/sw-github-deploy.sh +1 -1
- package/scripts/sw-github-graphql.sh +1 -1
- package/scripts/sw-guild.sh +569 -0
- package/scripts/sw-heartbeat.sh +1 -1
- package/scripts/sw-hygiene.sh +559 -0
- package/scripts/sw-incident.sh +617 -0
- package/scripts/sw-init.sh +88 -1
- package/scripts/sw-instrument.sh +699 -0
- package/scripts/sw-intelligence.sh +1 -1
- package/scripts/sw-jira.sh +1 -1
- package/scripts/sw-launchd.sh +366 -31
- package/scripts/sw-linear.sh +1 -1
- package/scripts/sw-logs.sh +1 -1
- package/scripts/sw-loop.sh +507 -51
- package/scripts/sw-memory.sh +198 -3
- package/scripts/sw-mission-control.sh +487 -0
- package/scripts/sw-model-router.sh +545 -0
- package/scripts/sw-otel.sh +596 -0
- package/scripts/sw-oversight.sh +689 -0
- package/scripts/sw-pipeline-composer.sh +8 -8
- package/scripts/sw-pipeline-vitals.sh +1096 -0
- package/scripts/sw-pipeline.sh +2451 -180
- package/scripts/sw-pm.sh +693 -0
- package/scripts/sw-pr-lifecycle.sh +522 -0
- package/scripts/sw-predictive.sh +1 -1
- package/scripts/sw-prep.sh +1 -1
- package/scripts/sw-ps.sh +4 -3
- package/scripts/sw-public-dashboard.sh +798 -0
- package/scripts/sw-quality.sh +595 -0
- package/scripts/sw-reaper.sh +5 -3
- package/scripts/sw-recruit.sh +573 -0
- package/scripts/sw-regression.sh +642 -0
- package/scripts/sw-release-manager.sh +736 -0
- package/scripts/sw-release.sh +706 -0
- package/scripts/sw-remote.sh +1 -1
- package/scripts/sw-replay.sh +520 -0
- package/scripts/sw-retro.sh +691 -0
- package/scripts/sw-scale.sh +444 -0
- package/scripts/sw-security-audit.sh +505 -0
- package/scripts/sw-self-optimize.sh +109 -8
- package/scripts/sw-session.sh +31 -9
- package/scripts/sw-setup.sh +1 -1
- package/scripts/sw-standup.sh +712 -0
- package/scripts/sw-status.sh +192 -1
- package/scripts/sw-strategic.sh +658 -0
- package/scripts/sw-stream.sh +450 -0
- package/scripts/sw-swarm.sh +583 -0
- package/scripts/sw-team-stages.sh +511 -0
- package/scripts/sw-templates.sh +1 -1
- package/scripts/sw-testgen.sh +515 -0
- package/scripts/sw-tmux-pipeline.sh +554 -0
- package/scripts/sw-tmux.sh +1 -1
- package/scripts/sw-trace.sh +485 -0
- package/scripts/sw-tracker-github.sh +188 -0
- package/scripts/sw-tracker-jira.sh +172 -0
- package/scripts/sw-tracker-linear.sh +251 -0
- package/scripts/sw-tracker.sh +117 -2
- package/scripts/sw-triage.sh +603 -0
- package/scripts/sw-upgrade.sh +1 -1
- package/scripts/sw-ux.sh +677 -0
- package/scripts/sw-webhook.sh +627 -0
- package/scripts/sw-widgets.sh +530 -0
- package/scripts/sw-worktree.sh +1 -1
- package/templates/pipelines/autonomous.json +8 -1
- package/templates/pipelines/cost-aware.json +21 -0
- package/templates/pipelines/deployed.json +40 -6
- package/templates/pipelines/enterprise.json +16 -2
- package/templates/pipelines/fast.json +19 -0
- package/templates/pipelines/full.json +16 -2
- package/templates/pipelines/hotfix.json +19 -0
- package/templates/pipelines/standard.json +19 -0
|
@@ -19,11 +19,18 @@ if [[ "$tool_name" == "Bash" ]] && [[ "${exit_code:-0}" != "0" ]]; then
|
|
|
19
19
|
# Classify error type
|
|
20
20
|
error_type="unknown"
|
|
21
21
|
case "$error_snippet" in
|
|
22
|
-
*"test"*|*"FAIL"*|*"assert"*)
|
|
23
|
-
*"syntax"*|*"unexpected"*)
|
|
24
|
-
*"not found"*|*"No such"*)
|
|
25
|
-
*"permission"*|*"denied"*)
|
|
26
|
-
*"timeout"*|*"timed out"*)
|
|
22
|
+
*"test"*|*"FAIL"*|*"assert"*|*"expect"*) error_type="test" ;;
|
|
23
|
+
*"syntax"*|*"unexpected"*|*"parse error"*) error_type="syntax" ;;
|
|
24
|
+
*"not found"*|*"No such"*|*"ENOENT"*) error_type="missing" ;;
|
|
25
|
+
*"permission"*|*"denied"*|*"EACCES"*) error_type="permission" ;;
|
|
26
|
+
*"timeout"*|*"timed out"*|*"ETIMEDOUT"*) error_type="timeout" ;;
|
|
27
|
+
*"injection"*|*"XSS"*|*"CSRF"*|*"CVE-"*) error_type="security" ;;
|
|
28
|
+
*"TypeError"*|*"ReferenceError"*|*"null"*|*"undefined is not"*) error_type="logic" ;;
|
|
29
|
+
*"ERESOLVE"*|*"peer dep"*|*"version"*|*"incompatible"*) error_type="dependency" ;;
|
|
30
|
+
*"flaky"*|*"intermittent"*|*"race condition"*) error_type="flaky" ;;
|
|
31
|
+
*"config"*|*"env"*|*"missing key"*|*"invalid option"*) error_type="config" ;;
|
|
32
|
+
*"ECONNREFUSED"*|*"503"*|*"502"*|*"rate limit"*) error_type="api" ;;
|
|
33
|
+
*"ENOMEM"*|*"disk full"*|*"quota"*) error_type="resource" ;;
|
|
27
34
|
esac
|
|
28
35
|
|
|
29
36
|
# Append to JSONL log
|
package/README.md
CHANGED
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
<p align="center">
|
|
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
|
-
<img src="https://img.shields.io/badge/tests-
|
|
16
|
-
<img src="https://img.shields.io/badge/version-1.
|
|
15
|
+
<img src="https://img.shields.io/badge/tests-450%2B_passing-4ade80?style=flat-square" alt="450+ tests">
|
|
16
|
+
<img src="https://img.shields.io/badge/version-1.12.0-00d4ff?style=flat-square" alt="v1.12.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>
|
|
@@ -28,6 +28,20 @@ This repo uses Shipwright to process its own issues. Label a GitHub issue with `
|
|
|
28
28
|
|
|
29
29
|
---
|
|
30
30
|
|
|
31
|
+
## What's New
|
|
32
|
+
|
|
33
|
+
**v1.13.0** brings faster feedback loops and lower operational overhead:
|
|
34
|
+
|
|
35
|
+
- **Webhook receiver** — Zero-latency issue processing (no more polling)
|
|
36
|
+
- **PR lifecycle automation** — Auto-review, merge, cleanup reduces manual toil
|
|
37
|
+
- **Fleet auto-discovery** — Populate fleet config from GitHub org in one command
|
|
38
|
+
- **SQLite persistence** — ACID-safe state, crash recovery, transactional safety
|
|
39
|
+
- **Issue decomposition** — AI-split complex features into manageable subtasks
|
|
40
|
+
- **systemd support** — Cross-platform process supervision (Linux + macOS)
|
|
41
|
+
- **Context engine** — Rich context injection for smarter pipeline decisions
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
31
45
|
## How It Works
|
|
32
46
|
|
|
33
47
|
```mermaid
|
|
@@ -213,42 +227,106 @@ shipwright dashboard start
|
|
|
213
227
|
|
|
214
228
|
Web dashboard with live pipeline progress, GitHub context (security alerts, contributors, deployments), DORA metrics, and cost tracking. WebSocket-powered, updates in real-time.
|
|
215
229
|
|
|
230
|
+
### Webhook Receiver
|
|
231
|
+
|
|
232
|
+
```bash
|
|
233
|
+
shipwright webhook listen
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
Instant issue processing via GitHub webhooks instead of polling. Register webhook with `shipwright webhook register`, receive events in real-time, process issues with zero-lag.
|
|
237
|
+
|
|
238
|
+
### PR Lifecycle Automation
|
|
239
|
+
|
|
240
|
+
```bash
|
|
241
|
+
shipwright pr auto-review
|
|
242
|
+
shipwright pr merge
|
|
243
|
+
shipwright pr cleanup
|
|
244
|
+
```
|
|
245
|
+
|
|
246
|
+
Fully automated PR management: auto-review based on predictive risk and coverage, intelligent auto-merge when gates pass, cleanup stale branches. Reduces manual PR overhead by 90%.
|
|
247
|
+
|
|
248
|
+
### Fleet Auto-Discovery
|
|
249
|
+
|
|
250
|
+
```bash
|
|
251
|
+
shipwright fleet discover --org myorg
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
Scan a GitHub organization and auto-populate fleet config with all repos matching criteria (language, archived status, team ownership). One command instead of manual registry building.
|
|
255
|
+
|
|
256
|
+
### SQLite Persistence
|
|
257
|
+
|
|
258
|
+
ACID-safe state management replacing JSON files. Replaces volatile `.claude/pipeline-artifacts/` with reliable database schema. Atomic transactions ensure no partial states, crash recovery automatic.
|
|
259
|
+
|
|
260
|
+
### Issue Decomposition
|
|
261
|
+
|
|
262
|
+
```bash
|
|
263
|
+
shipwright decompose --issue 42
|
|
264
|
+
```
|
|
265
|
+
|
|
266
|
+
AI-powered issue analysis: auto-split complex features into manageable subtasks, create child issues with inherited labels/assignees, generate dependency graph for parallel execution.
|
|
267
|
+
|
|
268
|
+
### Linux systemd Support
|
|
269
|
+
|
|
270
|
+
Cross-platform process supervision. Use systemd on Linux instead of tmux, same daemon commands:
|
|
271
|
+
|
|
272
|
+
```bash
|
|
273
|
+
shipwright launchd install # macOS launchd
|
|
274
|
+
# systemd service auto-generated on Linux
|
|
275
|
+
```
|
|
276
|
+
|
|
277
|
+
### Context Engine
|
|
278
|
+
|
|
279
|
+
```bash
|
|
280
|
+
shipwright context gather
|
|
281
|
+
```
|
|
282
|
+
|
|
283
|
+
Rich context injection for pipeline stages. Pulls together: contributor history, file hotspots, architecture rules, related issues, failure patterns. Injected automatically at each stage for smarter decisions.
|
|
284
|
+
|
|
216
285
|
---
|
|
217
286
|
|
|
218
287
|
## Commands
|
|
219
288
|
|
|
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
|
|
251
|
-
| `shipwright
|
|
289
|
+
| Command | Purpose |
|
|
290
|
+
| ----------------------------------------- | ---------------------------------- |
|
|
291
|
+
| `shipwright init` | One-command tmux setup |
|
|
292
|
+
| `shipwright setup` | Guided setup wizard |
|
|
293
|
+
| `shipwright pipeline start --issue N` | Full delivery pipeline for issue |
|
|
294
|
+
| `shipwright pipeline start --goal "..."` | Pipeline from goal description |
|
|
295
|
+
| `shipwright pipeline resume` | Resume from last checkpoint |
|
|
296
|
+
| `shipwright daemon start` | Watch GitHub for labeled issues |
|
|
297
|
+
| `shipwright daemon start --detach` | Background daemon in tmux |
|
|
298
|
+
| `shipwright daemon metrics` | DORA/DX metrics dashboard |
|
|
299
|
+
| `shipwright fleet start` | Multi-repo daemon orchestration |
|
|
300
|
+
| `shipwright fix "goal" --repos ~/a,~/b` | Apply same fix across repos |
|
|
301
|
+
| `shipwright loop "goal" --test-cmd "..."` | Continuous autonomous loop |
|
|
302
|
+
| `shipwright session name -t template` | Create team session with agents |
|
|
303
|
+
| `shipwright memory show` | View persistent memory |
|
|
304
|
+
| `shipwright cost show` | Token usage and spending |
|
|
305
|
+
| `shipwright cost budget set 50` | Set daily budget limit |
|
|
306
|
+
| `shipwright prep` | Analyze repo, generate configs |
|
|
307
|
+
| `shipwright doctor` | Validate setup, diagnose issues |
|
|
308
|
+
| `shipwright status` | Team dashboard |
|
|
309
|
+
| `shipwright ps` | Running agent processes |
|
|
310
|
+
| `shipwright logs team --follow` | Tail agent logs |
|
|
311
|
+
| `shipwright github context` | Show repo GitHub context |
|
|
312
|
+
| `shipwright github security` | CodeQL + Dependabot alerts |
|
|
313
|
+
| `shipwright checks list` | GitHub Check runs |
|
|
314
|
+
| `shipwright deploys list` | Deployment history |
|
|
315
|
+
| `shipwright intelligence` | Run intelligence analysis |
|
|
316
|
+
| `shipwright predict` | Risk assessment |
|
|
317
|
+
| `shipwright optimize` | Self-optimization pass |
|
|
318
|
+
| `shipwright dashboard` | Start web dashboard |
|
|
319
|
+
| `shipwright webhook listen` | Receive GitHub webhook events |
|
|
320
|
+
| `shipwright webhook register` | Register webhook in GitHub repo |
|
|
321
|
+
| `shipwright pr auto-review` | Auto-review PRs by risk + coverage |
|
|
322
|
+
| `shipwright pr merge` | Intelligent PR auto-merge |
|
|
323
|
+
| `shipwright pr cleanup` | Clean up stale branches |
|
|
324
|
+
| `shipwright fleet discover --org <org>` | Auto-discover repos in GitHub org |
|
|
325
|
+
| `shipwright decompose --issue N` | Split complex issue into subtasks |
|
|
326
|
+
| `shipwright context gather` | Assemble rich context for stages |
|
|
327
|
+
| `shipwright db <cmd>` | SQLite persistence management |
|
|
328
|
+
| `shipwright cleanup --force` | Kill orphaned sessions |
|
|
329
|
+
| `shipwright upgrade --apply` | Pull latest updates |
|
|
252
330
|
|
|
253
331
|
## Pipeline Templates for Teams
|
|
254
332
|
|
|
@@ -284,7 +362,7 @@ shipwright templates list
|
|
|
284
362
|
|
|
285
363
|
## Architecture
|
|
286
364
|
|
|
287
|
-
48 bash scripts (~51K lines),
|
|
365
|
+
48 bash scripts (~51K lines), 24 test suites (450+ tests), plus a Bun TypeScript dashboard server. Bash 3.2 compatible — runs on macOS out of the box.
|
|
288
366
|
|
|
289
367
|
```
|
|
290
368
|
scripts/
|
|
@@ -316,7 +394,7 @@ dashboard/
|
|
|
316
394
|
**Manual development:** Fork, branch, then:
|
|
317
395
|
|
|
318
396
|
```bash
|
|
319
|
-
npm test #
|
|
397
|
+
npm test # 450+ tests across 24 suites
|
|
320
398
|
```
|
|
321
399
|
|
|
322
400
|
## License
|
package/completions/_shipwright
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
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
|
+
'init:Quick tmux setup — one command, no prompts'
|
|
11
|
+
'setup:Guided setup — prerequisites, init, doctor'
|
|
10
12
|
'session:Create a new tmux window for a Claude team'
|
|
11
13
|
'status:Show dashboard of running teams and agents'
|
|
12
14
|
'ps:Show running agent processes and status'
|
|
@@ -21,21 +23,50 @@ _shipwright() {
|
|
|
21
23
|
'worktree:Manage git worktrees for agent isolation'
|
|
22
24
|
'prep:Repo preparation — generate .claude/ configs'
|
|
23
25
|
'daemon:Issue watcher — auto-process GitHub issues'
|
|
26
|
+
'fleet:Multi-repo fleet — orchestrate daemons'
|
|
24
27
|
'memory:Persistent memory — learn from every pipeline run'
|
|
25
|
-
'cost:Cost intelligence — track tokens, budgets
|
|
26
|
-
'
|
|
28
|
+
'cost:Cost intelligence — track tokens, budgets'
|
|
29
|
+
'db:SQLite persistence — events, runs, developers'
|
|
30
|
+
'fix:Bulk fix — apply a fix across multiple repos'
|
|
31
|
+
'dashboard:Fleet Command — real-time dashboard'
|
|
32
|
+
'jira:Jira sync — bidirectional issue sync'
|
|
33
|
+
'linear:Linear sync — bidirectional issue sync'
|
|
34
|
+
'tracker:Issue tracker — configure Linear/Jira'
|
|
35
|
+
'heartbeat:Agent heartbeat — write/check/list'
|
|
36
|
+
'checkpoint:Checkpoints — save/restore agent state'
|
|
37
|
+
'webhook:GitHub webhooks — instant processing'
|
|
38
|
+
'decompose:Issue decomposer — analyze complexity'
|
|
39
|
+
'connect:Team connect — sync local state'
|
|
40
|
+
'remote:Remote machines — manage distributed workers'
|
|
41
|
+
'launchd:Process supervision — auto-start on boot'
|
|
42
|
+
'intelligence:Intelligence engine analysis'
|
|
43
|
+
'optimize:Self-optimization based on DORA'
|
|
44
|
+
'predict:Predictive risk assessment'
|
|
45
|
+
'adversarial:Adversarial Agent Code Review'
|
|
46
|
+
'simulate:Developer simulation workflow'
|
|
47
|
+
'architecture:Architecture Model & Enforcer'
|
|
48
|
+
'vitals:Pipeline vitals — real-time scoring'
|
|
49
|
+
'docs:Documentation keeper — auto-sync docs'
|
|
50
|
+
'tmux:tmux health — doctor, install, fix'
|
|
51
|
+
'github:GitHub context — repo metadata'
|
|
52
|
+
'checks:GitHub checks — CI check runs'
|
|
53
|
+
'deploys:Deployments — deployment history'
|
|
54
|
+
'pr:PR lifecycle — auto-review, merge'
|
|
55
|
+
'context:Context engine — gather context'
|
|
27
56
|
'help:Show help message'
|
|
28
57
|
'version:Show version'
|
|
29
58
|
)
|
|
30
59
|
|
|
31
|
-
local -a pipeline_cmds daemon_cmds
|
|
60
|
+
local -a pipeline_cmds daemon_cmds fleet_cmds memory_cmds cost_cmds
|
|
61
|
+
local -a templates_cmds worktree_cmds tracker_cmds heartbeat_cmds
|
|
62
|
+
local -a checkpoint_cmds connect_cmds remote_cmds launchd_cmds
|
|
63
|
+
local -a dashboard_cmds github_cmds checks_cmds deploys_cmds docs_cmds
|
|
64
|
+
local -a tmux_cmds decompose_cmds pr_cmds
|
|
65
|
+
|
|
32
66
|
pipeline_cmds=(
|
|
33
67
|
'start:Start a new pipeline run'
|
|
34
68
|
'resume:Resume from last stage'
|
|
35
69
|
'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
70
|
'test:Run pipeline test suite'
|
|
40
71
|
)
|
|
41
72
|
daemon_cmds=(
|
|
@@ -43,33 +74,114 @@ _shipwright() {
|
|
|
43
74
|
'stop:Graceful shutdown'
|
|
44
75
|
'status:Show active pipelines and queue'
|
|
45
76
|
'metrics:DORA/DX metrics dashboard'
|
|
46
|
-
'triage:Show issue triage scores'
|
|
47
|
-
'patrol:Run proactive codebase patrol'
|
|
48
77
|
'test:Run daemon test suite'
|
|
49
|
-
'logs:View daemon logs'
|
|
50
|
-
'init:Initialize daemon configuration'
|
|
51
78
|
)
|
|
52
|
-
|
|
79
|
+
fleet_cmds=(
|
|
80
|
+
'start:Start daemons for all repos'
|
|
81
|
+
'stop:Stop all daemons'
|
|
82
|
+
'status:Show fleet-wide status'
|
|
83
|
+
'metrics:Cross-repo DORA metrics'
|
|
84
|
+
'test:Run fleet test suite'
|
|
85
|
+
)
|
|
53
86
|
memory_cmds=(
|
|
54
87
|
'show:Show learned patterns for this repo'
|
|
55
88
|
'search:Search across all memories'
|
|
56
|
-
'forget:Remove a memory entry'
|
|
57
|
-
'export:Export memories to file'
|
|
58
|
-
'import:Import memories from file'
|
|
59
89
|
'stats:Memory usage and coverage'
|
|
60
|
-
'test:Run memory test suite'
|
|
61
90
|
)
|
|
62
91
|
cost_cmds=(
|
|
63
|
-
'show:Show cost summary
|
|
92
|
+
'show:Show cost summary'
|
|
64
93
|
'budget:Manage daily budget'
|
|
65
|
-
'record:Record token usage'
|
|
66
|
-
'calculate:Calculate cost estimate'
|
|
67
|
-
'check-budget:Check budget before starting'
|
|
68
94
|
)
|
|
69
95
|
templates_cmds=(
|
|
70
96
|
'list:Browse team templates'
|
|
71
97
|
'show:Show template details'
|
|
72
98
|
)
|
|
99
|
+
worktree_cmds=(
|
|
100
|
+
'create:Create git worktree'
|
|
101
|
+
'list:List active worktrees'
|
|
102
|
+
'remove:Remove worktree'
|
|
103
|
+
)
|
|
104
|
+
tracker_cmds=(
|
|
105
|
+
'init:Initialize tracker'
|
|
106
|
+
'status:Show tracker status'
|
|
107
|
+
'sync:Sync issues'
|
|
108
|
+
'test:Run tracker test suite'
|
|
109
|
+
)
|
|
110
|
+
heartbeat_cmds=(
|
|
111
|
+
'write:Write heartbeat'
|
|
112
|
+
'check:Check heartbeat'
|
|
113
|
+
'list:List heartbeats'
|
|
114
|
+
'clear:Clear heartbeats'
|
|
115
|
+
)
|
|
116
|
+
checkpoint_cmds=(
|
|
117
|
+
'save:Save agent state'
|
|
118
|
+
'restore:Restore agent state'
|
|
119
|
+
'list:List checkpoints'
|
|
120
|
+
'delete:Delete checkpoint'
|
|
121
|
+
)
|
|
122
|
+
connect_cmds=(
|
|
123
|
+
'start:Sync to team dashboard'
|
|
124
|
+
'stop:Stop connection'
|
|
125
|
+
'join:Join a team'
|
|
126
|
+
'status:Show connection status'
|
|
127
|
+
)
|
|
128
|
+
remote_cmds=(
|
|
129
|
+
'list:Show remote machines'
|
|
130
|
+
'add:Register a remote'
|
|
131
|
+
'remove:Remove a remote'
|
|
132
|
+
'status:Health check remotes'
|
|
133
|
+
'test:Run remote test suite'
|
|
134
|
+
)
|
|
135
|
+
launchd_cmds=(
|
|
136
|
+
'install:Auto-start on boot'
|
|
137
|
+
'uninstall:Remove services'
|
|
138
|
+
'status:Show service status'
|
|
139
|
+
'test:Run launchd test suite'
|
|
140
|
+
)
|
|
141
|
+
dashboard_cmds=(
|
|
142
|
+
'start:Start dashboard'
|
|
143
|
+
'stop:Stop dashboard'
|
|
144
|
+
'status:Show dashboard status'
|
|
145
|
+
)
|
|
146
|
+
github_cmds=(
|
|
147
|
+
'context:Show GitHub context'
|
|
148
|
+
'security:Show security alerts'
|
|
149
|
+
'blame:Show file ownership'
|
|
150
|
+
)
|
|
151
|
+
checks_cmds=(
|
|
152
|
+
'list:Show check runs'
|
|
153
|
+
'status:Show check status'
|
|
154
|
+
'test:Run checks test suite'
|
|
155
|
+
)
|
|
156
|
+
deploys_cmds=(
|
|
157
|
+
'list:Show deployment history'
|
|
158
|
+
'status:Show deployment status'
|
|
159
|
+
'test:Run deploys test suite'
|
|
160
|
+
)
|
|
161
|
+
docs_cmds=(
|
|
162
|
+
'check:Report stale sections'
|
|
163
|
+
'sync:Regenerate stale sections'
|
|
164
|
+
'wiki:Generate wiki pages'
|
|
165
|
+
'report:Show freshness report'
|
|
166
|
+
'test:Run docs test suite'
|
|
167
|
+
)
|
|
168
|
+
tmux_cmds=(
|
|
169
|
+
'doctor:Check Claude compat'
|
|
170
|
+
'install:Install TPM'
|
|
171
|
+
'fix:Auto-fix issues'
|
|
172
|
+
'reload:Reload config'
|
|
173
|
+
'test:Run tmux test suite'
|
|
174
|
+
)
|
|
175
|
+
decompose_cmds=(
|
|
176
|
+
'analyze:Analyze complexity'
|
|
177
|
+
'create-subtasks:Create subtasks'
|
|
178
|
+
)
|
|
179
|
+
pr_cmds=(
|
|
180
|
+
'review:Auto-review PR'
|
|
181
|
+
'merge:Auto-merge PR'
|
|
182
|
+
'cleanup:Cleanup merged branches'
|
|
183
|
+
'feedback:Get PR feedback'
|
|
184
|
+
)
|
|
73
185
|
|
|
74
186
|
_arguments -C \
|
|
75
187
|
'1:command:->command' \
|
|
@@ -83,10 +195,14 @@ _shipwright() {
|
|
|
83
195
|
case "${words[1]}" in
|
|
84
196
|
pipeline)
|
|
85
197
|
_describe -t pipeline-cmds 'pipeline command' pipeline_cmds
|
|
198
|
+
_arguments '*:options:_pipeline_options'
|
|
86
199
|
;;
|
|
87
200
|
daemon)
|
|
88
201
|
_describe -t daemon-cmds 'daemon command' daemon_cmds
|
|
89
202
|
;;
|
|
203
|
+
fleet)
|
|
204
|
+
_describe -t fleet-cmds 'fleet command' fleet_cmds
|
|
205
|
+
;;
|
|
90
206
|
memory)
|
|
91
207
|
_describe -t memory-cmds 'memory command' memory_cmds
|
|
92
208
|
;;
|
|
@@ -96,6 +212,53 @@ _shipwright() {
|
|
|
96
212
|
templates)
|
|
97
213
|
_describe -t templates-cmds 'templates command' templates_cmds
|
|
98
214
|
;;
|
|
215
|
+
worktree)
|
|
216
|
+
_describe -t worktree-cmds 'worktree command' worktree_cmds
|
|
217
|
+
;;
|
|
218
|
+
tracker)
|
|
219
|
+
_describe -t tracker-cmds 'tracker command' tracker_cmds
|
|
220
|
+
;;
|
|
221
|
+
heartbeat)
|
|
222
|
+
_describe -t heartbeat-cmds 'heartbeat command' heartbeat_cmds
|
|
223
|
+
;;
|
|
224
|
+
checkpoint)
|
|
225
|
+
_describe -t checkpoint-cmds 'checkpoint command' checkpoint_cmds
|
|
226
|
+
;;
|
|
227
|
+
connect)
|
|
228
|
+
_describe -t connect-cmds 'connect command' connect_cmds
|
|
229
|
+
_arguments '--token[Invite token]:token'
|
|
230
|
+
;;
|
|
231
|
+
remote)
|
|
232
|
+
_describe -t remote-cmds 'remote command' remote_cmds
|
|
233
|
+
_arguments '--host[Hostname]:host' '--port[SSH port]:port' '--key[SSH key]:file' '--user[SSH user]:user'
|
|
234
|
+
;;
|
|
235
|
+
launchd)
|
|
236
|
+
_describe -t launchd-cmds 'launchd command' launchd_cmds
|
|
237
|
+
;;
|
|
238
|
+
dashboard)
|
|
239
|
+
_describe -t dashboard-cmds 'dashboard command' dashboard_cmds
|
|
240
|
+
;;
|
|
241
|
+
github)
|
|
242
|
+
_describe -t github-cmds 'github command' github_cmds
|
|
243
|
+
;;
|
|
244
|
+
checks)
|
|
245
|
+
_describe -t checks-cmds 'checks command' checks_cmds
|
|
246
|
+
;;
|
|
247
|
+
deploys)
|
|
248
|
+
_describe -t deploys-cmds 'deploys command' deploys_cmds
|
|
249
|
+
;;
|
|
250
|
+
docs)
|
|
251
|
+
_describe -t docs-cmds 'docs command' docs_cmds
|
|
252
|
+
;;
|
|
253
|
+
tmux)
|
|
254
|
+
_describe -t tmux-cmds 'tmux command' tmux_cmds
|
|
255
|
+
;;
|
|
256
|
+
decompose)
|
|
257
|
+
_describe -t decompose-cmds 'decompose command' decompose_cmds
|
|
258
|
+
;;
|
|
259
|
+
pr)
|
|
260
|
+
_describe -t pr-cmds 'pr command' pr_cmds
|
|
261
|
+
;;
|
|
99
262
|
prep)
|
|
100
263
|
_arguments \
|
|
101
264
|
'--check[Audit existing prep quality]' \
|
|
@@ -104,29 +267,37 @@ _shipwright() {
|
|
|
104
267
|
;;
|
|
105
268
|
loop)
|
|
106
269
|
_arguments \
|
|
107
|
-
'
|
|
108
|
-
'--
|
|
109
|
-
'--
|
|
270
|
+
'1:goal:' \
|
|
271
|
+
'--test-cmd[Test command]:command:' \
|
|
272
|
+
'--max-iterations[Max iterations]:count:' \
|
|
273
|
+
'--model[Model to use]:model:(opus sonnet haiku)' \
|
|
110
274
|
'--agents[Number of agents]:count:' \
|
|
111
|
-
'--audit[
|
|
112
|
-
'--audit-agent[
|
|
113
|
-
'--quality-gates[
|
|
114
|
-
'--definition-of-done[
|
|
275
|
+
'--audit[Self-reflection each iteration]' \
|
|
276
|
+
'--audit-agent[Separate auditor]' \
|
|
277
|
+
'--quality-gates[Quality checks]' \
|
|
278
|
+
'--definition-of-done[Checklist]:file:_files' \
|
|
115
279
|
'--resume[Resume interrupted loop]' \
|
|
116
|
-
'--skip-permissions[Skip
|
|
280
|
+
'--skip-permissions[Skip prompts]'
|
|
281
|
+
;;
|
|
282
|
+
fix)
|
|
283
|
+
_arguments \
|
|
284
|
+
'1:goal:' \
|
|
285
|
+
'--repos[Repository paths]:repos:'
|
|
117
286
|
;;
|
|
118
287
|
logs)
|
|
119
288
|
_arguments \
|
|
120
|
-
'
|
|
121
|
-
'--
|
|
289
|
+
'1:team name:' \
|
|
290
|
+
'--follow[Tail logs]' \
|
|
291
|
+
'--lines[Number of lines]:count:' \
|
|
292
|
+
'--grep[Search pattern]:pattern:'
|
|
122
293
|
;;
|
|
123
294
|
cleanup)
|
|
124
295
|
_arguments \
|
|
125
|
-
'--force[
|
|
296
|
+
'--force[Kill orphaned sessions]'
|
|
126
297
|
;;
|
|
127
298
|
upgrade)
|
|
128
299
|
_arguments \
|
|
129
|
-
'--apply[Apply
|
|
300
|
+
'--apply[Apply updates]'
|
|
130
301
|
;;
|
|
131
302
|
reaper)
|
|
132
303
|
_arguments \
|
|
@@ -137,4 +308,13 @@ _shipwright() {
|
|
|
137
308
|
esac
|
|
138
309
|
}
|
|
139
310
|
|
|
311
|
+
_pipeline_options() {
|
|
312
|
+
_arguments \
|
|
313
|
+
'--issue[GitHub issue number]:issue:' \
|
|
314
|
+
'--goal[Goal description]:goal:' \
|
|
315
|
+
'--worktree[Use isolated worktree]' \
|
|
316
|
+
'--template[Pipeline template]:file:_files' \
|
|
317
|
+
'--skip-gates[Auto-proceed all gates]'
|
|
318
|
+
}
|
|
319
|
+
|
|
140
320
|
_shipwright "$@"
|