shipwright-cli 1.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (72) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +926 -0
  3. package/claude-code/CLAUDE.md.shipwright +125 -0
  4. package/claude-code/hooks/notify-idle.sh +35 -0
  5. package/claude-code/hooks/pre-compact-save.sh +57 -0
  6. package/claude-code/hooks/task-completed.sh +170 -0
  7. package/claude-code/hooks/teammate-idle.sh +68 -0
  8. package/claude-code/settings.json.template +184 -0
  9. package/completions/_shipwright +140 -0
  10. package/completions/shipwright.bash +89 -0
  11. package/completions/shipwright.fish +107 -0
  12. package/docs/KNOWN-ISSUES.md +199 -0
  13. package/docs/TIPS.md +331 -0
  14. package/docs/definition-of-done.example.md +16 -0
  15. package/docs/patterns/README.md +139 -0
  16. package/docs/patterns/audit-loop.md +149 -0
  17. package/docs/patterns/bug-hunt.md +183 -0
  18. package/docs/patterns/feature-implementation.md +159 -0
  19. package/docs/patterns/refactoring.md +183 -0
  20. package/docs/patterns/research-exploration.md +144 -0
  21. package/docs/patterns/test-generation.md +173 -0
  22. package/package.json +49 -0
  23. package/scripts/adapters/docker-deploy.sh +50 -0
  24. package/scripts/adapters/fly-deploy.sh +41 -0
  25. package/scripts/adapters/iterm2-adapter.sh +122 -0
  26. package/scripts/adapters/railway-deploy.sh +34 -0
  27. package/scripts/adapters/tmux-adapter.sh +87 -0
  28. package/scripts/adapters/vercel-deploy.sh +35 -0
  29. package/scripts/adapters/wezterm-adapter.sh +103 -0
  30. package/scripts/cct +242 -0
  31. package/scripts/cct-cleanup.sh +172 -0
  32. package/scripts/cct-cost.sh +590 -0
  33. package/scripts/cct-daemon.sh +3189 -0
  34. package/scripts/cct-doctor.sh +328 -0
  35. package/scripts/cct-fix.sh +478 -0
  36. package/scripts/cct-fleet.sh +904 -0
  37. package/scripts/cct-init.sh +282 -0
  38. package/scripts/cct-logs.sh +273 -0
  39. package/scripts/cct-loop.sh +1332 -0
  40. package/scripts/cct-memory.sh +1148 -0
  41. package/scripts/cct-pipeline.sh +3844 -0
  42. package/scripts/cct-prep.sh +1352 -0
  43. package/scripts/cct-ps.sh +168 -0
  44. package/scripts/cct-reaper.sh +390 -0
  45. package/scripts/cct-session.sh +284 -0
  46. package/scripts/cct-status.sh +169 -0
  47. package/scripts/cct-templates.sh +242 -0
  48. package/scripts/cct-upgrade.sh +422 -0
  49. package/scripts/cct-worktree.sh +405 -0
  50. package/scripts/postinstall.mjs +96 -0
  51. package/templates/pipelines/autonomous.json +71 -0
  52. package/templates/pipelines/cost-aware.json +95 -0
  53. package/templates/pipelines/deployed.json +79 -0
  54. package/templates/pipelines/enterprise.json +114 -0
  55. package/templates/pipelines/fast.json +63 -0
  56. package/templates/pipelines/full.json +104 -0
  57. package/templates/pipelines/hotfix.json +63 -0
  58. package/templates/pipelines/standard.json +91 -0
  59. package/tmux/claude-teams-overlay.conf +109 -0
  60. package/tmux/templates/architecture.json +19 -0
  61. package/tmux/templates/bug-fix.json +24 -0
  62. package/tmux/templates/code-review.json +24 -0
  63. package/tmux/templates/devops.json +19 -0
  64. package/tmux/templates/documentation.json +19 -0
  65. package/tmux/templates/exploration.json +19 -0
  66. package/tmux/templates/feature-dev.json +24 -0
  67. package/tmux/templates/full-stack.json +24 -0
  68. package/tmux/templates/migration.json +24 -0
  69. package/tmux/templates/refactor.json +19 -0
  70. package/tmux/templates/security-audit.json +24 -0
  71. package/tmux/templates/testing.json +24 -0
  72. package/tmux/tmux.conf +167 -0
@@ -0,0 +1,24 @@
1
+ {
2
+ "name": "code-review",
3
+ "description": "Code review with quality, security, and test coverage agents",
4
+ "agents": [
5
+ {
6
+ "name": "code-quality",
7
+ "role": "Code quality, logic errors, design patterns, readability",
8
+ "focus": "src/, apps/"
9
+ },
10
+ {
11
+ "name": "security",
12
+ "role": "Security vulnerabilities, auth flaws, injection risks",
13
+ "focus": "src/auth/, src/api/, *.config.*"
14
+ },
15
+ {
16
+ "name": "test-coverage",
17
+ "role": "Test completeness, edge cases, missing assertions",
18
+ "focus": "*.test.*, __tests__/, *.spec.*"
19
+ }
20
+ ],
21
+ "layout": "tiled",
22
+ "layout_style": "main-horizontal",
23
+ "main_pane_percent": 65
24
+ }
@@ -0,0 +1,19 @@
1
+ {
2
+ "name": "devops",
3
+ "description": "DevOps with CI/CD pipeline and infrastructure agents",
4
+ "agents": [
5
+ {
6
+ "name": "pipeline",
7
+ "role": "CI/CD workflows, build steps, test stages, deployment automation",
8
+ "focus": ".github/workflows/, .gitlab-ci.yml, Jenkinsfile, buildspec.yml"
9
+ },
10
+ {
11
+ "name": "infrastructure",
12
+ "role": "Docker, Terraform, CloudFormation, Kubernetes manifests, environment config",
13
+ "focus": "Dockerfile, docker-compose.*, terraform/, k8s/, infra/, *.tf"
14
+ }
15
+ ],
16
+ "layout": "even-horizontal",
17
+ "layout_style": "main-vertical",
18
+ "main_pane_percent": 60
19
+ }
@@ -0,0 +1,19 @@
1
+ {
2
+ "name": "documentation",
3
+ "description": "Documentation with API docs and user guide agents",
4
+ "agents": [
5
+ {
6
+ "name": "api-docs",
7
+ "role": "API reference, endpoint docs, request/response examples, OpenAPI spec",
8
+ "focus": "docs/api/, openapi.*, swagger.*, src/api/"
9
+ },
10
+ {
11
+ "name": "guides",
12
+ "role": "User guides, tutorials, README, getting started, architecture docs",
13
+ "focus": "docs/, README.md, ARCHITECTURE.md, *.md"
14
+ }
15
+ ],
16
+ "layout": "even-horizontal",
17
+ "layout_style": "main-vertical",
18
+ "main_pane_percent": 60
19
+ }
@@ -0,0 +1,19 @@
1
+ {
2
+ "name": "exploration",
3
+ "description": "Codebase exploration with one agent researching and one synthesizing",
4
+ "agents": [
5
+ {
6
+ "name": "explorer",
7
+ "role": "Deep-dive into code, trace execution paths, map dependencies",
8
+ "focus": "src/, apps/, lib/"
9
+ },
10
+ {
11
+ "name": "synthesizer",
12
+ "role": "Summarize findings, document architecture, identify patterns",
13
+ "focus": "docs/, README.md, *.md"
14
+ }
15
+ ],
16
+ "layout": "even-horizontal",
17
+ "layout_style": "main-vertical",
18
+ "main_pane_percent": 60
19
+ }
@@ -0,0 +1,24 @@
1
+ {
2
+ "name": "feature-dev",
3
+ "description": "Feature development with backend, frontend, and tests agents",
4
+ "agents": [
5
+ {
6
+ "name": "backend",
7
+ "role": "API routes, services, data layer",
8
+ "focus": "src/api/, src/services/, src/models/"
9
+ },
10
+ {
11
+ "name": "frontend",
12
+ "role": "UI components, state management, styling",
13
+ "focus": "apps/web/src/, src/components/"
14
+ },
15
+ {
16
+ "name": "tests",
17
+ "role": "Unit tests, integration tests, test utilities",
18
+ "focus": "*.test.ts, __tests__/, *.spec.ts"
19
+ }
20
+ ],
21
+ "layout": "tiled",
22
+ "layout_style": "main-horizontal",
23
+ "main_pane_percent": 65
24
+ }
@@ -0,0 +1,24 @@
1
+ {
2
+ "name": "full-stack",
3
+ "description": "Full-stack development with API, database, and UI agents",
4
+ "agents": [
5
+ {
6
+ "name": "api",
7
+ "role": "REST/GraphQL endpoints, middleware, request validation, auth",
8
+ "focus": "src/api/, src/routes/, src/middleware/"
9
+ },
10
+ {
11
+ "name": "database",
12
+ "role": "Schema, migrations, queries, models, seed data",
13
+ "focus": "src/models/, src/db/, migrations/, schema.*, prisma/"
14
+ },
15
+ {
16
+ "name": "ui",
17
+ "role": "Pages, components, state management, styling, forms",
18
+ "focus": "apps/web/, src/components/, src/pages/, *.css"
19
+ }
20
+ ],
21
+ "layout": "tiled",
22
+ "layout_style": "main-horizontal",
23
+ "main_pane_percent": 65
24
+ }
@@ -0,0 +1,24 @@
1
+ {
2
+ "name": "migration",
3
+ "description": "Data/schema migration with schema, code adaptation, and rollback agents",
4
+ "agents": [
5
+ {
6
+ "name": "schema",
7
+ "role": "Write migration scripts, update schema, handle data transformations",
8
+ "focus": "migrations/, schema.*, prisma/, src/db/"
9
+ },
10
+ {
11
+ "name": "adapter",
12
+ "role": "Update application code to work with new schema, fix queries, update models",
13
+ "focus": "src/models/, src/services/, src/api/"
14
+ },
15
+ {
16
+ "name": "rollback",
17
+ "role": "Write rollback scripts, verify backward compatibility, test migration reversal",
18
+ "focus": "migrations/, *.test.*, scripts/"
19
+ }
20
+ ],
21
+ "layout": "tiled",
22
+ "layout_style": "main-horizontal",
23
+ "main_pane_percent": 65
24
+ }
@@ -0,0 +1,19 @@
1
+ {
2
+ "name": "refactor",
3
+ "description": "Refactoring with one agent for changes and one for consumers/tests",
4
+ "agents": [
5
+ {
6
+ "name": "refactor",
7
+ "role": "Refactor target code, update interfaces, improve structure",
8
+ "focus": "src/"
9
+ },
10
+ {
11
+ "name": "consumers",
12
+ "role": "Update all consumers, imports, tests that reference refactored code",
13
+ "focus": "*.test.*, apps/, src/"
14
+ }
15
+ ],
16
+ "layout": "even-horizontal",
17
+ "layout_style": "main-vertical",
18
+ "main_pane_percent": 60
19
+ }
@@ -0,0 +1,24 @@
1
+ {
2
+ "name": "security-audit",
3
+ "description": "Security audit with code analysis, dependency scanning, and config review agents",
4
+ "agents": [
5
+ {
6
+ "name": "code-analysis",
7
+ "role": "SAST: injection flaws, auth bypasses, XSS, CSRF, insecure deserialization",
8
+ "focus": "src/, apps/, lib/"
9
+ },
10
+ {
11
+ "name": "dependencies",
12
+ "role": "Dependency vulnerabilities, outdated packages, license compliance, supply chain risks",
13
+ "focus": "package.json, package-lock.json, yarn.lock, pnpm-lock.yaml, go.mod, requirements.txt"
14
+ },
15
+ {
16
+ "name": "config-review",
17
+ "role": "Secrets exposure, insecure defaults, CORS, CSP headers, environment config",
18
+ "focus": "*.config.*, .env*, docker*, *.yaml, *.yml, nginx.conf"
19
+ }
20
+ ],
21
+ "layout": "tiled",
22
+ "layout_style": "main-horizontal",
23
+ "main_pane_percent": 65
24
+ }
@@ -0,0 +1,24 @@
1
+ {
2
+ "name": "testing",
3
+ "description": "Comprehensive testing with unit, integration, and e2e agents",
4
+ "agents": [
5
+ {
6
+ "name": "unit-tests",
7
+ "role": "Unit tests for individual functions, classes, and modules",
8
+ "focus": "*.test.ts, *.spec.ts, __tests__/unit/"
9
+ },
10
+ {
11
+ "name": "integration-tests",
12
+ "role": "Integration tests for API endpoints, service interactions, database queries",
13
+ "focus": "__tests__/integration/, *.integration.test.*"
14
+ },
15
+ {
16
+ "name": "e2e-tests",
17
+ "role": "End-to-end tests for user flows, UI interactions, cross-service scenarios",
18
+ "focus": "e2e/, cypress/, playwright/, *.e2e.test.*"
19
+ }
20
+ ],
21
+ "layout": "tiled",
22
+ "layout_style": "main-horizontal",
23
+ "main_pane_percent": 65
24
+ }
package/tmux/tmux.conf ADDED
@@ -0,0 +1,167 @@
1
+ # ╔═══════════════════════════════════════════════════════════════════════════╗
2
+ # ║ TMUX CONFIGURATION ║
3
+ # ║ Premium Developer Theme ║
4
+ # ╚═══════════════════════════════════════════════════════════════════════════╝
5
+
6
+ # ═══════════════════════════════════════════════════════════════════════════
7
+ # GENERAL SETTINGS
8
+ # ═══════════════════════════════════════════════════════════════════════════
9
+
10
+ set -g default-terminal "tmux-256color"
11
+ set -ag terminal-overrides ",xterm-256color:RGB"
12
+ set -g mouse on
13
+ set -g base-index 1
14
+ setw -g pane-base-index 1
15
+ set -g renumber-windows on
16
+ set -g history-limit 50000
17
+ set -sg escape-time 0
18
+ set -g focus-events on
19
+ setw -g monitor-activity on
20
+ set -g visual-activity off
21
+
22
+ # ═══════════════════════════════════════════════════════════════════════════
23
+ # STATUS BAR CONFIGURATION
24
+ # ═══════════════════════════════════════════════════════════════════════════
25
+
26
+ set -g status-position bottom
27
+ set -g status-interval 1
28
+ set -g status-justify left
29
+ set -g status-style "bg=#1a1a2e,fg=#e4e4e7"
30
+ set -g status-left-length 100
31
+ set -g status-right-length 150
32
+
33
+ # Left: session name, prefix indicator, zoom warning
34
+ set -g status-left "#[fg=#1e1e32,bg=#00d4ff,bold] #S #[fg=#00d4ff,bg=#0066ff]#[fg=#1e1e32,bg=#0066ff,bold] #{?client_prefix,⌨ ,λ }#[fg=#0066ff,bg=#1a1a2e]#{?window_zoomed_flag, #[fg=#facc15]#[bold]🔍 ZOOM ,} "
35
+
36
+ setw -g window-status-separator " "
37
+ # Inactive windows; team windows (claude-*) get a λ icon
38
+ # NOTE: use separate #[fg=]#[bg=] blocks — commas inside #{?} branches break parsing
39
+ setw -g window-status-format "#{?#{m:claude-*,#W},#[fg=#7c3aed]#[bg=#252538] λ #I:#W ,#[fg=#71717a]#[bg=#252538] #I:#W }#[fg=#252538]#[bg=#1a1a2e]"
40
+ # Active window; team windows get λ icon in cyan
41
+ setw -g window-status-current-format "#{?#{m:claude-*,#W},#[fg=#1e1e32]#[bg=#00d4ff]#[bold] λ #I:#W ,#[fg=#1e1e32]#[bg=#00d4ff]#[bold] #I:#W }#[fg=#00d4ff]#[bg=#1a1a2e]"
42
+
43
+ # Right side: normal info OR key hints when prefix is active
44
+ # NOTE: use separate #[fg=]#[bg=] blocks — commas inside #{?} branches break parsing
45
+ set -g status-right "#{?client_prefix,#[fg=#1e1e32]#[bg=#0066ff]#[bold] T team | split - split hjkl nav G zoom S sync x kill #[fg=#1e1e32]#[bg=#00d4ff]#[bold] ^a ,#[fg=#71717a]#[bg=#252538] #(whoami)@#h #[fg=#1e1e32]#[bg=#7c3aed]#[bold] %H:%M #[fg=#e4e4e7]#[bg=#0066ff]#[bold] %b %d #[fg=#1e1e32]#[bg=#00d4ff]#[bold] %a }"
46
+
47
+ # ═══════════════════════════════════════════════════════════════════════════
48
+ # PANE STYLING
49
+ # ═══════════════════════════════════════════════════════════════════════════
50
+
51
+ set -g window-style 'bg=#1a1a2e,fg=#e4e4e7'
52
+ set -g window-active-style 'bg=#1a1a2e,fg=#e4e4e7'
53
+ set -g pane-border-style "fg=#333355,bg=#1a1a2e"
54
+ set -g pane-active-border-style "fg=#00d4ff,bg=#1a1a2e"
55
+ set -g display-panes-colour "#333355"
56
+ set -g display-panes-active-colour "#00d4ff"
57
+
58
+ # ═══════════════════════════════════════════════════════════════════════════
59
+ # MESSAGE STYLING
60
+ # ═══════════════════════════════════════════════════════════════════════════
61
+
62
+ set -g message-style "bg=#00d4ff,fg=#1e1e32,bold"
63
+ set -g message-command-style "bg=#7c3aed,fg=#e4e4e7,bold"
64
+
65
+ # ═══════════════════════════════════════════════════════════════════════════
66
+ # MODE STYLING (copy mode, etc.)
67
+ # ═══════════════════════════════════════════════════════════════════════════
68
+
69
+ setw -g mode-style "bg=#0066ff,fg=#e4e4e7,bold"
70
+ setw -g clock-mode-colour "#00d4ff"
71
+ setw -g clock-mode-style 24
72
+
73
+ # ═══════════════════════════════════════════════════════════════════════════
74
+ # KEY BINDINGS
75
+ # ═══════════════════════════════════════════════════════════════════════════
76
+
77
+ unbind C-b
78
+ set -g prefix C-a
79
+ bind C-a send-prefix
80
+
81
+ bind r source-file ~/.tmux.conf \; display-message "Config reloaded!"
82
+
83
+ bind | split-window -h -c "#{pane_current_path}"
84
+ bind - split-window -v -c "#{pane_current_path}"
85
+ unbind '"'
86
+ unbind %
87
+
88
+ bind h select-pane -L
89
+ bind j select-pane -D
90
+ bind k select-pane -U
91
+ bind l select-pane -R
92
+
93
+ bind -r H resize-pane -L 5
94
+ bind -r J resize-pane -D 5
95
+ bind -r K resize-pane -U 5
96
+ bind -r L resize-pane -R 5
97
+
98
+ bind -r C-h select-window -t :-
99
+ bind -r C-l select-window -t :+
100
+
101
+ bind c new-window -c "#{pane_current_path}"
102
+
103
+ bind x kill-pane
104
+ bind X kill-window
105
+
106
+ setw -g mode-keys vi
107
+ bind -T copy-mode-vi v send-keys -X begin-selection
108
+ bind -T copy-mode-vi r send-keys -X rectangle-toggle
109
+ bind p paste-buffer
110
+
111
+ # System clipboard integration (macOS pbcopy, Linux xclip/xsel fallback)
112
+ if-shell "command -v pbcopy" \
113
+ "bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel 'pbcopy'" \
114
+ "bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel 'xclip -selection clipboard 2>/dev/null || xsel --clipboard 2>/dev/null'"
115
+
116
+ # Mouse drag also copies to system clipboard
117
+ if-shell "command -v pbcopy" \
118
+ "bind -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel 'pbcopy'" \
119
+ "bind -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel 'xclip -selection clipboard 2>/dev/null || xsel --clipboard 2>/dev/null'"
120
+
121
+ bind S setw synchronize-panes \; display-message "Sync #{?synchronize-panes,ON,OFF}"
122
+
123
+ # ═══════════════════════════════════════════════════════════════════════════
124
+ # SMART PANE SWITCHING (vim-tmux-navigator style)
125
+ # ═══════════════════════════════════════════════════════════════════════════
126
+
127
+ is_vim="ps -o state= -o comm= -t '#{pane_tty}' \
128
+ | grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|l?n?vim?x?|fzf)(diff)?$'"
129
+ bind -n 'C-h' if-shell "$is_vim" 'send-keys C-h' 'select-pane -L'
130
+ bind -n 'C-j' if-shell "$is_vim" 'send-keys C-j' 'select-pane -D'
131
+ bind -n 'C-k' if-shell "$is_vim" 'send-keys C-k' 'select-pane -U'
132
+ bind -n 'C-l' if-shell "$is_vim" 'send-keys C-l' 'select-pane -R'
133
+
134
+ # ═══════════════════════════════════════════════════════════════════════════
135
+ # SESSION MANAGEMENT
136
+ # ═══════════════════════════════════════════════════════════════════════════
137
+
138
+ bind s choose-tree -sZ -O name
139
+ bind N new-session
140
+
141
+ # ═══════════════════════════════════════════════════════════════════════════
142
+ # PLUGINS (via TPM - optional)
143
+ # ═══════════════════════════════════════════════════════════════════════════
144
+
145
+ set -g @plugin 'tmux-plugins/tpm'
146
+ set -g @plugin 'tmux-plugins/tmux-sensible'
147
+ set -g @plugin 'tmux-plugins/tmux-resurrect'
148
+ set -g @plugin 'tmux-plugins/tmux-continuum'
149
+
150
+ set -g @resurrect-capture-pane-contents 'on'
151
+ set -g @continuum-restore 'on'
152
+
153
+ # ═══════════════════════════════════════════════════════════════════════════
154
+ # CLAUDE CODE TEAMS INTEGRATION
155
+ # ═══════════════════════════════════════════════════════════════════════════
156
+
157
+ # Source teams overlay (agent pane styling, keybindings)
158
+ source-file -q ~/.tmux/claude-teams-overlay.conf
159
+
160
+ # Quick launch: prefix + T → start a Claude team session
161
+ bind T run-shell "shipwright session"
162
+
163
+ # Quick status: prefix + C-t → show team dashboard in floating popup
164
+ bind C-t display-popup -w 80% -h 70% -E "shipwright status; echo ''; echo 'Press ENTER to close'; read"
165
+
166
+ # Initialize TPM (keep at very bottom)
167
+ run-shell '~/.tmux/plugins/tpm/tpm'