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
@@ -6,7 +6,7 @@
6
6
  set -euo pipefail
7
7
  trap 'echo "ERROR: $BASH_SOURCE:$LINENO exited with status $?" >&2' ERR
8
8
 
9
- VERSION="1.10.0"
9
+ VERSION="2.1.0"
10
10
  SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
11
11
  REPO_DIR="$(cd "$SCRIPT_DIR/.." && pwd)"
12
12
 
@@ -101,6 +101,14 @@ load_tracker_config() {
101
101
  warn "Jira provider script not found: $SCRIPT_DIR/sw-tracker-jira.sh"
102
102
  fi
103
103
  ;;
104
+ github)
105
+ if [[ -f "$SCRIPT_DIR/sw-tracker-github.sh" ]]; then
106
+ source "$SCRIPT_DIR/sw-tracker-github.sh"
107
+ return 0
108
+ else
109
+ warn "GitHub provider script not found: $SCRIPT_DIR/sw-tracker-github.sh"
110
+ fi
111
+ ;;
104
112
  none|"") return 0 ;;
105
113
  *)
106
114
  warn "Unknown tracker provider: $TRACKER_PROVIDER"
@@ -116,6 +124,98 @@ tracker_available() {
116
124
  [[ "$TRACKER_PROVIDER" != "none" && -n "$TRACKER_PROVIDER" ]]
117
125
  }
118
126
 
127
+ # ─── Internal Dispatcher ──────────────────────────────────────────────────
128
+ # Routes a provider function call to the loaded provider, with fallback to GitHub
129
+
130
+ _dispatch_provider() {
131
+ local func="$1"
132
+ shift
133
+
134
+ load_tracker_config
135
+
136
+ # Build the function name
137
+ local provider_func="provider_${func}"
138
+
139
+ # Provider scripts define provider_* functions
140
+ if type "$provider_func" &>/dev/null; then
141
+ "$provider_func" "$@"
142
+ return $?
143
+ else
144
+ # Fall back to GitHub if provider doesn't define the function
145
+ # (for backward compatibility with minimal providers like Jira/Linear notify-only)
146
+ if [[ "$TRACKER_PROVIDER" != "github" && "$TRACKER_PROVIDER" != "none" ]]; then
147
+ # Try GitHub provider
148
+ if [[ -f "$SCRIPT_DIR/sw-tracker-github.sh" ]]; then
149
+ source "$SCRIPT_DIR/sw-tracker-github.sh"
150
+ if type "$provider_func" &>/dev/null; then
151
+ "$provider_func" "$@"
152
+ return $?
153
+ fi
154
+ fi
155
+ fi
156
+ return 1
157
+ fi
158
+ }
159
+
160
+ # ─── Discovery Interface ────────────────────────────────────────────────────
161
+ # Used by daemon to discover issues from the configured tracker
162
+
163
+ # Discover issues matching criteria
164
+ # Usage: tracker_discover_issues <label> [state] [limit]
165
+ # Output: JSON array of {id, title, labels[], state}
166
+ tracker_discover_issues() {
167
+ _dispatch_provider "discover_issues" "$@"
168
+ }
169
+
170
+ # Fetch single issue details
171
+ # Usage: tracker_get_issue <issue_id>
172
+ # Output: JSON {id, title, body, labels[], state}
173
+ tracker_get_issue() {
174
+ _dispatch_provider "get_issue" "$@"
175
+ }
176
+
177
+ # Fetch issue body text only
178
+ # Usage: tracker_get_issue_body <issue_id>
179
+ # Output: plain text body
180
+ tracker_get_issue_body() {
181
+ _dispatch_provider "get_issue_body" "$@"
182
+ }
183
+
184
+ # ─── CRUD Interface ───────────────────────────────────────────────────────
185
+ # Used by pipeline to modify issues
186
+
187
+ # Add label to issue
188
+ # Usage: tracker_add_label <issue_id> <label>
189
+ tracker_add_label() {
190
+ _dispatch_provider "add_label" "$@"
191
+ }
192
+
193
+ # Remove label from issue
194
+ # Usage: tracker_remove_label <issue_id> <label>
195
+ tracker_remove_label() {
196
+ _dispatch_provider "remove_label" "$@"
197
+ }
198
+
199
+ # Add comment to issue
200
+ # Usage: tracker_comment <issue_id> <body>
201
+ tracker_comment() {
202
+ _dispatch_provider "comment" "$@"
203
+ }
204
+
205
+ # Close/resolve issue
206
+ # Usage: tracker_close_issue <issue_id>
207
+ tracker_close_issue() {
208
+ _dispatch_provider "close_issue" "$@"
209
+ }
210
+
211
+ # Create new issue
212
+ # Usage: tracker_create_issue <title> <body> [labels]
213
+ # Output: JSON {id, title}
214
+ tracker_create_issue() {
215
+ _dispatch_provider "create_issue" "$@"
216
+ }
217
+
218
+ # ─── Notification Interface (Legacy) ───────────────────────────────────────
119
219
  # Route notification to the active provider
120
220
  # Usage: tracker_notify <event> <gh_issue> [detail]
121
221
  # Events: spawn, started, stage_complete, stage_failed, review, pr-created, completed, done, failed
@@ -361,9 +461,24 @@ show_help() {
361
461
  echo -e " ${CYAN}help${RESET} Show this help"
362
462
  echo ""
363
463
  echo -e "${BOLD}PROVIDERS${RESET}"
464
+ echo -e " ${CYAN}github${RESET} GitHub (native, gh CLI)"
364
465
  echo -e " ${CYAN}linear${RESET} Linear.app (GraphQL API)"
365
466
  echo -e " ${CYAN}jira${RESET} Atlassian Jira (REST API v3)"
366
467
  echo ""
468
+ echo -e "${BOLD}DISCOVERY INTERFACE${RESET} (for daemon)"
469
+ echo -e " Provider-agnostic issue discovery and metadata:"
470
+ echo -e " ${CYAN}tracker_discover_issues${RESET} <label> [state] [limit]"
471
+ echo -e " ${CYAN}tracker_get_issue${RESET} <issue_id>"
472
+ echo -e " ${CYAN}tracker_get_issue_body${RESET} <issue_id>"
473
+ echo ""
474
+ echo -e "${BOLD}CRUD INTERFACE${RESET} (for pipeline)"
475
+ echo -e " Provider-agnostic issue modification:"
476
+ echo -e " ${CYAN}tracker_add_label${RESET} <issue_id> <label>"
477
+ echo -e " ${CYAN}tracker_remove_label${RESET} <issue_id> <label>"
478
+ echo -e " ${CYAN}tracker_comment${RESET} <issue_id> <body>"
479
+ echo -e " ${CYAN}tracker_close_issue${RESET} <issue_id>"
480
+ echo -e " ${CYAN}tracker_create_issue${RESET} <title> <body> [labels]"
481
+ echo ""
367
482
  echo -e "${BOLD}NOTIFICATION EVENTS${RESET}"
368
483
  echo -e " ${CYAN}spawn${RESET} Pipeline started"
369
484
  echo -e " ${CYAN}stage_complete${RESET} Stage finished (detail: stage_id|duration|description)"
@@ -374,7 +489,7 @@ show_help() {
374
489
  echo ""
375
490
  echo -e "${BOLD}CONFIGURATION${RESET}"
376
491
  echo -e " Config file: ${DIM}~/.shipwright/tracker-config.json${RESET}"
377
- echo -e " Env override: ${DIM}TRACKER_PROVIDER_OVERRIDE=linear|jira|none${RESET}"
492
+ echo -e " Env override: ${DIM}TRACKER_PROVIDER_OVERRIDE=github|linear|jira|none${RESET}"
378
493
  echo -e " Daemon block: ${DIM}.claude/daemon-config.json → .tracker.provider${RESET}"
379
494
  echo ""
380
495
  echo -e "${BOLD}EXAMPLES${RESET}"