shipwright-cli 2.0.0 → 2.1.1
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/README.md +160 -72
- package/completions/_shipwright +59 -7
- package/completions/shipwright.bash +24 -4
- package/completions/shipwright.fish +80 -2
- package/dashboard/server.ts +208 -0
- package/docs/tmux-research/TMUX-ARCHITECTURE.md +567 -0
- package/docs/tmux-research/TMUX-AUDIT.md +925 -0
- package/docs/tmux-research/TMUX-BEST-PRACTICES-2025-2026.md +829 -0
- package/docs/tmux-research/TMUX-QUICK-REFERENCE.md +543 -0
- package/docs/tmux-research/TMUX-RESEARCH-INDEX.md +438 -0
- package/package.json +2 -2
- package/scripts/lib/helpers.sh +7 -0
- package/scripts/sw +116 -2
- package/scripts/sw-activity.sh +1 -1
- package/scripts/sw-adaptive.sh +1 -1
- package/scripts/sw-adversarial.sh +1 -1
- package/scripts/sw-architecture-enforcer.sh +1 -1
- package/scripts/sw-auth.sh +1 -1
- package/scripts/sw-autonomous.sh +128 -38
- package/scripts/sw-changelog.sh +1 -1
- package/scripts/sw-checkpoint.sh +1 -1
- package/scripts/sw-ci.sh +1 -1
- package/scripts/sw-cleanup.sh +1 -1
- package/scripts/sw-code-review.sh +62 -1
- package/scripts/sw-connect.sh +1 -1
- package/scripts/sw-context.sh +1 -1
- package/scripts/sw-cost.sh +44 -3
- package/scripts/sw-daemon.sh +155 -27
- package/scripts/sw-dashboard.sh +1 -1
- package/scripts/sw-db.sh +958 -118
- package/scripts/sw-decompose.sh +1 -1
- package/scripts/sw-deps.sh +1 -1
- package/scripts/sw-developer-simulation.sh +1 -1
- package/scripts/sw-discovery.sh +1 -1
- package/scripts/sw-docs-agent.sh +1 -1
- package/scripts/sw-docs.sh +1 -1
- package/scripts/sw-doctor.sh +49 -1
- package/scripts/sw-dora.sh +1 -1
- package/scripts/sw-durable.sh +1 -1
- package/scripts/sw-e2e-orchestrator.sh +1 -1
- package/scripts/sw-eventbus.sh +1 -1
- package/scripts/sw-feedback.sh +23 -15
- package/scripts/sw-fix.sh +1 -1
- package/scripts/sw-fleet-discover.sh +1 -1
- package/scripts/sw-fleet-viz.sh +1 -1
- package/scripts/sw-fleet.sh +1 -1
- package/scripts/sw-github-app.sh +1 -1
- package/scripts/sw-github-checks.sh +4 -4
- package/scripts/sw-github-deploy.sh +1 -1
- package/scripts/sw-github-graphql.sh +1 -1
- package/scripts/sw-guild.sh +1 -1
- package/scripts/sw-heartbeat.sh +1 -1
- package/scripts/sw-hygiene.sh +1 -1
- package/scripts/sw-incident.sh +45 -6
- package/scripts/sw-init.sh +150 -24
- package/scripts/sw-instrument.sh +1 -1
- package/scripts/sw-intelligence.sh +1 -1
- package/scripts/sw-jira.sh +1 -1
- package/scripts/sw-launchd.sh +1 -1
- package/scripts/sw-linear.sh +1 -1
- package/scripts/sw-logs.sh +1 -1
- package/scripts/sw-loop.sh +204 -19
- package/scripts/sw-memory.sh +18 -1
- package/scripts/sw-mission-control.sh +1 -1
- package/scripts/sw-model-router.sh +1 -1
- package/scripts/sw-otel.sh +1 -1
- package/scripts/sw-oversight.sh +76 -1
- package/scripts/sw-pipeline-composer.sh +1 -1
- package/scripts/sw-pipeline-vitals.sh +1 -1
- package/scripts/sw-pipeline.sh +302 -18
- package/scripts/sw-pm.sh +70 -5
- package/scripts/sw-pr-lifecycle.sh +1 -1
- package/scripts/sw-predictive.sh +8 -1
- package/scripts/sw-prep.sh +1 -1
- package/scripts/sw-ps.sh +1 -1
- package/scripts/sw-public-dashboard.sh +1 -1
- package/scripts/sw-quality.sh +1 -1
- package/scripts/sw-reaper.sh +1 -1
- package/scripts/sw-recruit.sh +1853 -178
- package/scripts/sw-regression.sh +1 -1
- package/scripts/sw-release-manager.sh +1 -1
- package/scripts/sw-release.sh +1 -1
- package/scripts/sw-remote.sh +1 -1
- package/scripts/sw-replay.sh +1 -1
- package/scripts/sw-retro.sh +1 -1
- package/scripts/sw-scale.sh +1 -1
- package/scripts/sw-security-audit.sh +1 -1
- package/scripts/sw-self-optimize.sh +1 -1
- package/scripts/sw-session.sh +1 -1
- package/scripts/sw-setup.sh +263 -127
- package/scripts/sw-standup.sh +1 -1
- package/scripts/sw-status.sh +44 -2
- package/scripts/sw-strategic.sh +189 -41
- package/scripts/sw-stream.sh +1 -1
- package/scripts/sw-swarm.sh +42 -5
- package/scripts/sw-team-stages.sh +1 -1
- package/scripts/sw-templates.sh +4 -4
- package/scripts/sw-testgen.sh +66 -15
- package/scripts/sw-tmux-pipeline.sh +1 -1
- package/scripts/sw-tmux-role-color.sh +58 -0
- package/scripts/sw-tmux-status.sh +128 -0
- package/scripts/sw-tmux.sh +1 -1
- package/scripts/sw-trace.sh +1 -1
- package/scripts/sw-tracker.sh +1 -1
- package/scripts/sw-triage.sh +61 -37
- package/scripts/sw-upgrade.sh +1 -1
- package/scripts/sw-ux.sh +30 -2
- package/scripts/sw-webhook.sh +1 -1
- package/scripts/sw-widgets.sh +1 -1
- package/scripts/sw-worktree.sh +1 -1
- package/tmux/shipwright-overlay.conf +35 -17
- package/tmux/tmux.conf +26 -21
package/scripts/sw-pm.sh
CHANGED
|
@@ -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="2.
|
|
9
|
+
VERSION="2.1.1"
|
|
10
10
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
11
11
|
|
|
12
12
|
# ─── Colors (matches Seth's tmux theme) ─────────────────────────────────────
|
|
@@ -223,9 +223,57 @@ analyze_issue() {
|
|
|
223
223
|
|
|
224
224
|
# ─── recommend_team <analysis_json> ──────────────────────────────────────────
|
|
225
225
|
# Based on analysis, recommend team composition
|
|
226
|
+
# Tries recruit's AI/heuristic team composition first, falls back to hardcoded rules.
|
|
226
227
|
recommend_team() {
|
|
227
228
|
local analysis="$1"
|
|
228
229
|
|
|
230
|
+
# ── Try recruit-powered team composition first ──
|
|
231
|
+
if [[ -x "${SCRIPT_DIR:-}/sw-recruit.sh" ]]; then
|
|
232
|
+
local issue_title
|
|
233
|
+
issue_title=$(echo "$analysis" | jq -r '.title // .recommendation // ""' 2>/dev/null || true)
|
|
234
|
+
if [[ -n "$issue_title" ]]; then
|
|
235
|
+
local recruit_result
|
|
236
|
+
recruit_result=$(bash "$SCRIPT_DIR/sw-recruit.sh" team --json "$issue_title" 2>/dev/null) || true
|
|
237
|
+
if [[ -n "$recruit_result" ]] && echo "$recruit_result" | jq -e '.team' &>/dev/null 2>&1; then
|
|
238
|
+
local recruit_roles recruit_model recruit_agents recruit_cost
|
|
239
|
+
recruit_roles=$(echo "$recruit_result" | jq -r '.team | join(",")')
|
|
240
|
+
recruit_model=$(echo "$recruit_result" | jq -r '.model // "sonnet"')
|
|
241
|
+
recruit_agents=$(echo "$recruit_result" | jq -r '.agents // 2')
|
|
242
|
+
recruit_cost=$(echo "$recruit_result" | jq -r '.estimated_cost // 0')
|
|
243
|
+
|
|
244
|
+
# Map recruit roles/model to PM output format
|
|
245
|
+
local max_iterations=5
|
|
246
|
+
local template="standard"
|
|
247
|
+
if [[ "$recruit_agents" -ge 4 ]]; then template="full"; max_iterations=8;
|
|
248
|
+
elif [[ "$recruit_agents" -le 1 ]]; then template="fast"; max_iterations=3;
|
|
249
|
+
fi
|
|
250
|
+
|
|
251
|
+
local team_rec
|
|
252
|
+
team_rec=$(jq -n \
|
|
253
|
+
--arg roles "$recruit_roles" \
|
|
254
|
+
--arg template "$template" \
|
|
255
|
+
--arg model "$recruit_model" \
|
|
256
|
+
--arg max_iter "$max_iterations" \
|
|
257
|
+
--arg agents "$recruit_agents" \
|
|
258
|
+
--arg cost "$recruit_cost" \
|
|
259
|
+
'{
|
|
260
|
+
roles: ($roles | split(",")),
|
|
261
|
+
template: $template,
|
|
262
|
+
model: $model,
|
|
263
|
+
max_iterations: ($max_iter | tonumber),
|
|
264
|
+
estimated_agents: ($agents | tonumber),
|
|
265
|
+
confidence_percent: 80,
|
|
266
|
+
risk_factors: "recruit-powered recommendation",
|
|
267
|
+
mitigation_strategies: "AI-optimized team composition",
|
|
268
|
+
source: "recruit"
|
|
269
|
+
}')
|
|
270
|
+
echo "$team_rec"
|
|
271
|
+
return 0
|
|
272
|
+
fi
|
|
273
|
+
fi
|
|
274
|
+
fi
|
|
275
|
+
|
|
276
|
+
# ── Fallback: hardcoded heuristic team composition ──
|
|
229
277
|
local complexity risk is_security is_perf file_scope
|
|
230
278
|
complexity=$(echo "$analysis" | jq -r '.complexity')
|
|
231
279
|
risk=$(echo "$analysis" | jq -r '.risk')
|
|
@@ -442,15 +490,22 @@ cmd_orchestrate() {
|
|
|
442
490
|
emit_event "pm.orchestrate" "issue=${issue_num}"
|
|
443
491
|
}
|
|
444
492
|
|
|
445
|
-
# ─── cmd_recommend <issue_num>
|
|
493
|
+
# ─── cmd_recommend <issue_num> [--json] ──────────────────────────────────────
|
|
446
494
|
cmd_recommend() {
|
|
447
|
-
local
|
|
495
|
+
local json_mode="false"
|
|
496
|
+
local issue_num=""
|
|
497
|
+
if [[ "${1:-}" == "--json" ]]; then
|
|
498
|
+
json_mode="true"
|
|
499
|
+
issue_num="${2:-}"
|
|
500
|
+
else
|
|
501
|
+
issue_num="${1:-}"
|
|
502
|
+
fi
|
|
448
503
|
if [[ -z "$issue_num" ]]; then
|
|
449
|
-
error "Usage: shipwright pm recommend <issue-num>"
|
|
504
|
+
error "Usage: shipwright pm recommend <issue-num> [--json]"
|
|
450
505
|
return 1
|
|
451
506
|
fi
|
|
452
507
|
|
|
453
|
-
info "Generating full PM recommendation for issue #${issue_num}..."
|
|
508
|
+
[[ "$json_mode" != "true" ]] && info "Generating full PM recommendation for issue #${issue_num}..."
|
|
454
509
|
local analysis team_rec stages
|
|
455
510
|
|
|
456
511
|
analysis=$(analyze_issue "$issue_num")
|
|
@@ -472,6 +527,16 @@ cmd_recommend() {
|
|
|
472
527
|
recommendation_timestamp: "'$(now_iso)'"
|
|
473
528
|
}')
|
|
474
529
|
|
|
530
|
+
if [[ "$json_mode" == "true" ]]; then
|
|
531
|
+
echo "$recommendation"
|
|
532
|
+
ensure_pm_history
|
|
533
|
+
local tmp_hist
|
|
534
|
+
tmp_hist=$(mktemp)
|
|
535
|
+
jq --argjson rec "$recommendation" '.decisions += [$rec]' "$PM_HISTORY" > "$tmp_hist" && mv "$tmp_hist" "$PM_HISTORY"
|
|
536
|
+
emit_event "pm.recommend" "issue=${issue_num}"
|
|
537
|
+
return 0
|
|
538
|
+
fi
|
|
539
|
+
|
|
475
540
|
# Pretty-print
|
|
476
541
|
echo ""
|
|
477
542
|
echo -e "${BOLD}PM RECOMMENDATION FOR ISSUE #${issue_num}${RESET}"
|
package/scripts/sw-predictive.sh
CHANGED
|
@@ -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="2.
|
|
9
|
+
VERSION="2.1.1"
|
|
10
10
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
11
11
|
REPO_DIR="$(cd "$SCRIPT_DIR/.." && pwd)"
|
|
12
12
|
|
|
@@ -810,6 +810,13 @@ main() {
|
|
|
810
810
|
confirm-anomaly) predictive_confirm_anomaly "$@" ;;
|
|
811
811
|
patrol) patrol_ai_analyze "$@" ;;
|
|
812
812
|
baseline) predict_update_baseline "$@" ;;
|
|
813
|
+
inject-prevention)
|
|
814
|
+
local stage="${1:-build}"
|
|
815
|
+
local issue_json="${2:-{}}"
|
|
816
|
+
local mem_ctx="${3:-}"
|
|
817
|
+
[[ -n "$mem_ctx" && -f "$mem_ctx" ]] && mem_ctx=$(cat "$mem_ctx" 2>/dev/null || true)
|
|
818
|
+
predict_inject_prevention "$stage" "$issue_json" "$mem_ctx" || true
|
|
819
|
+
;;
|
|
813
820
|
help|--help|-h) show_help ;;
|
|
814
821
|
*) error "Unknown command: $cmd"; exit 1 ;;
|
|
815
822
|
esac
|
package/scripts/sw-prep.sh
CHANGED
|
@@ -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="2.
|
|
9
|
+
VERSION="2.1.1"
|
|
10
10
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
11
11
|
|
|
12
12
|
# ─── Handle subcommands ───────────────────────────────────────────────────────
|
package/scripts/sw-ps.sh
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
# ║ Displays a table of agents running in claude-* tmux windows with ║
|
|
6
6
|
# ║ PID, status, idle time, and pane references. ║
|
|
7
7
|
# ╚═══════════════════════════════════════════════════════════════════════════╝
|
|
8
|
-
VERSION="2.
|
|
8
|
+
VERSION="2.1.1"
|
|
9
9
|
set -euo pipefail
|
|
10
10
|
trap 'echo "ERROR: $BASH_SOURCE:$LINENO exited with status $?" >&2' ERR
|
|
11
11
|
|
package/scripts/sw-quality.sh
CHANGED
package/scripts/sw-reaper.sh
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
# ║ shipwright reaper --watch Continuous loop (default: 5s) ║
|
|
12
12
|
# ║ shipwright reaper --dry-run Preview what would be reaped ║
|
|
13
13
|
# ╚═══════════════════════════════════════════════════════════════════════════╝
|
|
14
|
-
VERSION="2.
|
|
14
|
+
VERSION="2.1.1"
|
|
15
15
|
set -euo pipefail
|
|
16
16
|
trap 'echo "ERROR: $BASH_SOURCE:$LINENO exited with status $?" >&2' ERR
|
|
17
17
|
|