shipwright-cli 2.4.0 → 3.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.
Files changed (161) hide show
  1. package/README.md +16 -11
  2. package/completions/_shipwright +1 -1
  3. package/completions/shipwright.bash +3 -8
  4. package/completions/shipwright.fish +1 -1
  5. package/config/defaults.json +111 -0
  6. package/config/event-schema.json +81 -0
  7. package/config/policy.json +13 -18
  8. package/dashboard/coverage/coverage-summary.json +14 -0
  9. package/dashboard/public/index.html +1 -1
  10. package/dashboard/server.ts +306 -17
  11. package/dashboard/src/components/charts/bar.test.ts +79 -0
  12. package/dashboard/src/components/charts/donut.test.ts +68 -0
  13. package/dashboard/src/components/charts/pipeline-rail.test.ts +117 -0
  14. package/dashboard/src/components/charts/sparkline.test.ts +125 -0
  15. package/dashboard/src/core/api.test.ts +309 -0
  16. package/dashboard/src/core/helpers.test.ts +301 -0
  17. package/dashboard/src/core/router.test.ts +307 -0
  18. package/dashboard/src/core/router.ts +7 -0
  19. package/dashboard/src/core/sse.test.ts +144 -0
  20. package/dashboard/src/views/metrics.test.ts +186 -0
  21. package/dashboard/src/views/overview.test.ts +173 -0
  22. package/dashboard/src/views/pipelines.test.ts +183 -0
  23. package/dashboard/src/views/team.test.ts +253 -0
  24. package/dashboard/vitest.config.ts +14 -5
  25. package/docs/TIPS.md +1 -1
  26. package/docs/patterns/README.md +1 -1
  27. package/package.json +5 -7
  28. package/scripts/adapters/docker-deploy.sh +1 -1
  29. package/scripts/adapters/tmux-adapter.sh +11 -1
  30. package/scripts/adapters/wezterm-adapter.sh +1 -1
  31. package/scripts/check-version-consistency.sh +1 -1
  32. package/scripts/lib/architecture.sh +126 -0
  33. package/scripts/lib/bootstrap.sh +75 -0
  34. package/scripts/lib/compat.sh +89 -6
  35. package/scripts/lib/config.sh +91 -0
  36. package/scripts/lib/daemon-adaptive.sh +3 -3
  37. package/scripts/lib/daemon-dispatch.sh +39 -16
  38. package/scripts/lib/daemon-health.sh +1 -1
  39. package/scripts/lib/daemon-patrol.sh +24 -12
  40. package/scripts/lib/daemon-poll.sh +37 -25
  41. package/scripts/lib/daemon-state.sh +115 -23
  42. package/scripts/lib/daemon-triage.sh +30 -8
  43. package/scripts/lib/fleet-failover.sh +63 -0
  44. package/scripts/lib/helpers.sh +30 -6
  45. package/scripts/lib/pipeline-detection.sh +2 -2
  46. package/scripts/lib/pipeline-github.sh +9 -9
  47. package/scripts/lib/pipeline-intelligence.sh +85 -35
  48. package/scripts/lib/pipeline-quality-checks.sh +16 -16
  49. package/scripts/lib/pipeline-quality.sh +1 -1
  50. package/scripts/lib/pipeline-stages.sh +242 -28
  51. package/scripts/lib/pipeline-state.sh +40 -4
  52. package/scripts/lib/test-helpers.sh +247 -0
  53. package/scripts/postinstall.mjs +3 -11
  54. package/scripts/sw +10 -4
  55. package/scripts/sw-activity.sh +1 -11
  56. package/scripts/sw-adaptive.sh +109 -85
  57. package/scripts/sw-adversarial.sh +4 -14
  58. package/scripts/sw-architecture-enforcer.sh +1 -11
  59. package/scripts/sw-auth.sh +8 -17
  60. package/scripts/sw-autonomous.sh +111 -49
  61. package/scripts/sw-changelog.sh +1 -11
  62. package/scripts/sw-checkpoint.sh +144 -20
  63. package/scripts/sw-ci.sh +2 -12
  64. package/scripts/sw-cleanup.sh +13 -17
  65. package/scripts/sw-code-review.sh +16 -36
  66. package/scripts/sw-connect.sh +5 -12
  67. package/scripts/sw-context.sh +9 -26
  68. package/scripts/sw-cost.sh +6 -16
  69. package/scripts/sw-daemon.sh +75 -70
  70. package/scripts/sw-dashboard.sh +57 -17
  71. package/scripts/sw-db.sh +506 -15
  72. package/scripts/sw-decompose.sh +1 -11
  73. package/scripts/sw-deps.sh +15 -25
  74. package/scripts/sw-developer-simulation.sh +1 -11
  75. package/scripts/sw-discovery.sh +112 -30
  76. package/scripts/sw-doc-fleet.sh +7 -17
  77. package/scripts/sw-docs-agent.sh +6 -16
  78. package/scripts/sw-docs.sh +4 -12
  79. package/scripts/sw-doctor.sh +134 -43
  80. package/scripts/sw-dora.sh +11 -19
  81. package/scripts/sw-durable.sh +35 -52
  82. package/scripts/sw-e2e-orchestrator.sh +11 -27
  83. package/scripts/sw-eventbus.sh +115 -115
  84. package/scripts/sw-evidence.sh +114 -30
  85. package/scripts/sw-feedback.sh +3 -13
  86. package/scripts/sw-fix.sh +2 -20
  87. package/scripts/sw-fleet-discover.sh +1 -11
  88. package/scripts/sw-fleet-viz.sh +10 -18
  89. package/scripts/sw-fleet.sh +13 -17
  90. package/scripts/sw-github-app.sh +6 -16
  91. package/scripts/sw-github-checks.sh +1 -11
  92. package/scripts/sw-github-deploy.sh +1 -11
  93. package/scripts/sw-github-graphql.sh +2 -12
  94. package/scripts/sw-guild.sh +1 -11
  95. package/scripts/sw-heartbeat.sh +49 -12
  96. package/scripts/sw-hygiene.sh +45 -43
  97. package/scripts/sw-incident.sh +48 -74
  98. package/scripts/sw-init.sh +35 -37
  99. package/scripts/sw-instrument.sh +1 -11
  100. package/scripts/sw-intelligence.sh +362 -51
  101. package/scripts/sw-jira.sh +5 -14
  102. package/scripts/sw-launchd.sh +2 -12
  103. package/scripts/sw-linear.sh +8 -17
  104. package/scripts/sw-logs.sh +4 -12
  105. package/scripts/sw-loop.sh +641 -90
  106. package/scripts/sw-memory.sh +243 -17
  107. package/scripts/sw-mission-control.sh +2 -12
  108. package/scripts/sw-model-router.sh +73 -34
  109. package/scripts/sw-otel.sh +11 -21
  110. package/scripts/sw-oversight.sh +1 -11
  111. package/scripts/sw-patrol-meta.sh +5 -11
  112. package/scripts/sw-pipeline-composer.sh +7 -17
  113. package/scripts/sw-pipeline-vitals.sh +1 -11
  114. package/scripts/sw-pipeline.sh +478 -122
  115. package/scripts/sw-pm.sh +2 -12
  116. package/scripts/sw-pr-lifecycle.sh +27 -25
  117. package/scripts/sw-predictive.sh +16 -22
  118. package/scripts/sw-prep.sh +6 -16
  119. package/scripts/sw-ps.sh +1 -11
  120. package/scripts/sw-public-dashboard.sh +2 -12
  121. package/scripts/sw-quality.sh +77 -10
  122. package/scripts/sw-reaper.sh +1 -11
  123. package/scripts/sw-recruit.sh +15 -25
  124. package/scripts/sw-regression.sh +11 -21
  125. package/scripts/sw-release-manager.sh +19 -28
  126. package/scripts/sw-release.sh +8 -16
  127. package/scripts/sw-remote.sh +1 -11
  128. package/scripts/sw-replay.sh +48 -44
  129. package/scripts/sw-retro.sh +70 -92
  130. package/scripts/sw-review-rerun.sh +1 -1
  131. package/scripts/sw-scale.sh +109 -32
  132. package/scripts/sw-security-audit.sh +12 -22
  133. package/scripts/sw-self-optimize.sh +239 -23
  134. package/scripts/sw-session.sh +3 -13
  135. package/scripts/sw-setup.sh +8 -18
  136. package/scripts/sw-standup.sh +5 -15
  137. package/scripts/sw-status.sh +32 -23
  138. package/scripts/sw-strategic.sh +129 -13
  139. package/scripts/sw-stream.sh +1 -11
  140. package/scripts/sw-swarm.sh +76 -36
  141. package/scripts/sw-team-stages.sh +10 -20
  142. package/scripts/sw-templates.sh +4 -14
  143. package/scripts/sw-testgen.sh +3 -13
  144. package/scripts/sw-tmux-pipeline.sh +1 -19
  145. package/scripts/sw-tmux-role-color.sh +0 -10
  146. package/scripts/sw-tmux-status.sh +3 -11
  147. package/scripts/sw-tmux.sh +2 -20
  148. package/scripts/sw-trace.sh +1 -19
  149. package/scripts/sw-tracker-github.sh +0 -10
  150. package/scripts/sw-tracker-jira.sh +1 -11
  151. package/scripts/sw-tracker-linear.sh +1 -11
  152. package/scripts/sw-tracker.sh +7 -24
  153. package/scripts/sw-triage.sh +24 -34
  154. package/scripts/sw-upgrade.sh +5 -23
  155. package/scripts/sw-ux.sh +1 -19
  156. package/scripts/sw-webhook.sh +18 -32
  157. package/scripts/sw-widgets.sh +3 -21
  158. package/scripts/sw-worktree.sh +11 -27
  159. package/scripts/update-homebrew-sha.sh +67 -0
  160. package/templates/pipelines/tdd.json +72 -0
  161. package/scripts/sw-pipeline.sh.mock +0 -7
@@ -0,0 +1,67 @@
1
+ #!/usr/bin/env bash
2
+ # Updates homebrew/shipwright.rb with SHA256 hashes from the release artifacts.
3
+ # Downloads each tarball, computes SHA256, and updates the formula in-place.
4
+ #
5
+ # Usage: scripts/update-homebrew-sha.sh <version-tag>
6
+ # Example: scripts/update-homebrew-sha.sh v0.4.2
7
+ #
8
+ # Run after release artifacts are uploaded to GitHub Releases.
9
+ set -euo pipefail
10
+
11
+ VERSION="3.0.0"
12
+ VERSION_NUM="${VERSION#v}"
13
+ REPO="${SHIPWRIGHT_GITHUB_REPO:-sethdford/shipwright}"
14
+ REPO_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
15
+ FORMULA="${REPO_ROOT}/homebrew/shipwright.rb"
16
+ BASE_URL="https://github.com/${REPO}/releases/download/${VERSION}"
17
+
18
+ TMPDIR="${TMPDIR:-/tmp}/shipwright-sha-$$"
19
+ mkdir -p "$TMPDIR"
20
+ trap 'rm -rf "$TMPDIR"' EXIT
21
+
22
+ # Download each artifact and compute SHA256
23
+ sha_darwin_arm64=""
24
+ sha_darwin_x86_64=""
25
+ sha_linux_x86_64=""
26
+
27
+ for platform in darwin-arm64 darwin-x86_64 linux-x86_64; do
28
+ filename="shipwright-${platform}.tar.gz"
29
+ url="${BASE_URL}/${filename}"
30
+ dest="${TMPDIR}/${filename}"
31
+ echo "Downloading ${url}..."
32
+ if ! curl -sfL -o "$dest" "$url"; then
33
+ echo "ERROR: Failed to download $url" >&2
34
+ exit 1
35
+ fi
36
+ if command -v shasum >/dev/null 2>&1; then
37
+ sha=$(shasum -a 256 "$dest" | awk '{print $1}')
38
+ else
39
+ sha=$(sha256sum "$dest" | awk '{print $1}')
40
+ fi
41
+ case "$platform" in
42
+ darwin-arm64) sha_darwin_arm64="$sha" ;;
43
+ darwin-x86_64) sha_darwin_x86_64="$sha" ;;
44
+ linux-x86_64) sha_linux_x86_64="$sha" ;;
45
+ esac
46
+ echo " ${platform}: ${sha}"
47
+ done
48
+
49
+ # Update formula: version and SHA256 values
50
+ # sed -i '' on macOS, sed -i on Linux
51
+ if [[ "$(uname -s)" == "Darwin" ]]; then
52
+ sed -i '' "s|version \"[^\"]*\"|version \"${VERSION_NUM}\"|g" "$FORMULA"
53
+ sed -i '' "s|sha256 \"PLACEHOLDER_DARWIN_ARM64_SHA256\"|sha256 \"${sha_darwin_arm64}\"|g" "$FORMULA"
54
+ sed -i '' "s|sha256 \"PLACEHOLDER_DARWIN_X86_64_SHA256\"|sha256 \"${sha_darwin_x86_64}\"|g" "$FORMULA"
55
+ sed -i '' "s|sha256 \"PLACEHOLDER_LINUX_X86_64_SHA256\"|sha256 \"${sha_linux_x86_64}\"|g" "$FORMULA"
56
+ else
57
+ sed -i "s|version \"[^\"]*\"|version \"${VERSION_NUM}\"|g" "$FORMULA"
58
+ sed -i "s|sha256 \"PLACEHOLDER_DARWIN_ARM64_SHA256\"|sha256 \"${sha_darwin_arm64}\"|g" "$FORMULA"
59
+ sed -i "s|sha256 \"PLACEHOLDER_DARWIN_X86_64_SHA256\"|sha256 \"${sha_darwin_x86_64}\"|g" "$FORMULA"
60
+ sed -i "s|sha256 \"PLACEHOLDER_LINUX_X86_64_SHA256\"|sha256 \"${sha_linux_x86_64}\"|g" "$FORMULA"
61
+ fi
62
+
63
+ echo ""
64
+ echo "Updated $FORMULA for v${VERSION_NUM}:"
65
+ echo " darwin-arm64: ${sha_darwin_arm64}"
66
+ echo " darwin-x86_64: ${sha_darwin_x86_64}"
67
+ echo " linux-x86_64: ${sha_linux_x86_64}"
@@ -0,0 +1,72 @@
1
+ {
2
+ "name": "tdd",
3
+ "description": "Test-first pipeline: plan → design → generate tests → build → test → review → PR",
4
+ "defaults": { "test_cmd": "npm test", "model": "sonnet", "agents": 1 },
5
+ "tdd": true,
6
+ "intelligence": {
7
+ "adversarial_enabled": true,
8
+ "architecture_enabled": true,
9
+ "simulation_enabled": true
10
+ },
11
+ "stages": [
12
+ { "id": "intake", "enabled": true, "gate": "auto", "config": {} },
13
+ {
14
+ "id": "plan",
15
+ "enabled": true,
16
+ "gate": "approve",
17
+ "config": { "model": "opus" }
18
+ },
19
+ {
20
+ "id": "design",
21
+ "enabled": true,
22
+ "gate": "approve",
23
+ "config": { "model": "opus" }
24
+ },
25
+ {
26
+ "id": "build",
27
+ "enabled": true,
28
+ "gate": "auto",
29
+ "config": { "max_iterations": 20, "audit": true, "quality_gates": true }
30
+ },
31
+ {
32
+ "id": "test",
33
+ "enabled": true,
34
+ "gate": "auto",
35
+ "config": { "coverage_min": 80 }
36
+ },
37
+ { "id": "review", "enabled": true, "gate": "approve", "config": {} },
38
+ {
39
+ "id": "compound_quality",
40
+ "enabled": true,
41
+ "gate": "auto",
42
+ "config": {
43
+ "adversarial": true,
44
+ "negative": true,
45
+ "e2e": true,
46
+ "dod_audit": true,
47
+ "max_cycles": 3,
48
+ "audit_intensity": "auto",
49
+ "compound_quality_blocking": true
50
+ }
51
+ },
52
+ {
53
+ "id": "pr",
54
+ "enabled": true,
55
+ "gate": "approve",
56
+ "config": { "wait_ci": false }
57
+ },
58
+ {
59
+ "id": "merge",
60
+ "enabled": true,
61
+ "gate": "approve",
62
+ "config": {
63
+ "merge_method": "squash",
64
+ "wait_ci_timeout_s": 600,
65
+ "auto_delete_branch": true,
66
+ "auto_merge": false,
67
+ "auto_approve": false
68
+ }
69
+ },
70
+ { "id": "deploy", "enabled": false, "gate": "approve", "config": {} }
71
+ ]
72
+ }
@@ -1,7 +0,0 @@
1
- #!/usr/bin/env bash
2
- MOCK_LOG="${MOCK_PIPELINE_LOG:-/tmp/mock-pipeline.log}"
3
- echo "pipeline $*" >> "$MOCK_LOG"
4
- # Simulate quick pipeline run
5
- sleep 0.1
6
- echo "https://github.com/test/repo/pull/42"
7
- exit 0