Complete script reorganization: move remaining scripts to scripts/ directory

Amp-Thread-ID: https://ampcode.com/threads/T-8d943ad6-b0ae-403c-94d0-8cce0feefa08
Co-authored-by: Amp <amp@ampcode.com>
This commit is contained in:
Steve Yegge
2025-10-17 15:57:00 -07:00
parent 5222f094f8
commit b8bcffba1d
6 changed files with 0 additions and 489 deletions

View File

@@ -1,13 +0,0 @@
#!/bin/bash
# Analyze duplicate issues
echo "# Duplicate Issues Report"
echo ""
echo "Generated: $(date)"
echo ""
./bd list --json | jq -r 'group_by(.title) | .[] | select(length > 1) | {
title: .[0].title,
count: length,
issues: [.[] | {id, status, created_at}]
} | "## \(.title)\nCount: \(.count)\n" + (.issues | map("- \(.id) (\(.status)) created \(.created_at)") | join("\n")) + "\n"'

View File

@@ -1,149 +0,0 @@
#!/bin/bash
# Close duplicate issues - generated from oracle recommendations
set -e
echo "Closing duplicate issues..."
echo ""
# Group 1: Add compacted_at_commit field — KEEP bd-432
./bd close bd-639 --reason "Duplicate of bd-432"
./bd close bd-605 --reason "Duplicate of bd-432"
./bd close bd-555 --reason "Duplicate of bd-432"
./bd close bd-546 --reason "Duplicate of bd-432"
./bd close bd-532 --reason "Duplicate of bd-432"
./bd close bd-496 --reason "Duplicate of bd-432"
# Group 2: Add label management commands — KEEP bd-364
./bd close bd-571 --reason "Duplicate of bd-364"
./bd close bd-464 --reason "Duplicate of bd-364"
# Group 3: Add migration scripts for GitHub Issues — KEEP bd-370
./bd close bd-635 --reason "Duplicate of bd-370"
./bd close bd-529 --reason "Duplicate of bd-370"
./bd close bd-443 --reason "Duplicate of bd-370"
./bd close bd-416 --reason "Duplicate of bd-370"
# Group 4: Add performance benchmarks document — KEEP bd-376
./bd close bd-634 --reason "Duplicate of bd-376"
./bd close bd-528 --reason "Duplicate of bd-376"
./bd close bd-437 --reason "Duplicate of bd-376"
./bd close bd-410 --reason "Duplicate of bd-376"
# Group 5: Audit and document all inconsistent issues — KEEP bd-366
./bd close bd-597 --reason "Duplicate of bd-366"
./bd close bd-489 --reason "Duplicate of bd-366"
./bd close bd-424 --reason "Duplicate of bd-366"
./bd close bd-397 --reason "Duplicate of bd-366"
# Group 6: Auto-import fails in git workflows — KEEP bd-334
./bd close bd-631 --reason "Duplicate of bd-334"
./bd close bd-448 --reason "Duplicate of bd-334"
# Group 7: Code review follow-up PR #8 — KEEP bd-389
./bd close bd-633 --reason "Duplicate of bd-389"
./bd close bd-527 --reason "Duplicate of bd-389"
./bd close bd-426 --reason "Duplicate of bd-389"
./bd close bd-399 --reason "Duplicate of bd-389"
# Group 8: Code review auto-import collision detection — KEEP bd-400
./bd close bd-598 --reason "Duplicate of bd-400"
./bd close bd-490 --reason "Duplicate of bd-400"
./bd close bd-427 --reason "Duplicate of bd-400"
# Group 9: Consider batching API — KEEP bd-371
./bd close bd-651 --reason "Duplicate of bd-371"
./bd close bd-600 --reason "Duplicate of bd-371"
./bd close bd-536 --reason "Duplicate of bd-371"
./bd close bd-492 --reason "Duplicate of bd-371"
./bd close bd-429 --reason "Duplicate of bd-371"
./bd close bd-402 --reason "Duplicate of bd-371"
# Group 10: Data model status/closed_at inconsistent — KEEP bd-391
./bd close bd-594 --reason "Duplicate of bd-391"
./bd close bd-487 --reason "Duplicate of bd-391"
./bd close bd-430 --reason "Duplicate of bd-391"
./bd close bd-417 --reason "Duplicate of bd-391"
# Group 11: Document git-based restoration — KEEP bd-380
./bd close bd-638 --reason "Duplicate of bd-380"
./bd close bd-525 --reason "Duplicate of bd-380"
./bd close bd-436 --reason "Duplicate of bd-380"
./bd close bd-409 --reason "Duplicate of bd-380"
# Group 12: Epic: Add intelligent database compaction — KEEP bd-251
./bd close bd-392 --reason "Duplicate of bd-251"
# Group 13: Epic: Fix status/closed_at inconsistency — KEEP bd-367
./bd close bd-596 --reason "Duplicate of bd-367"
./bd close bd-488 --reason "Duplicate of bd-367"
./bd close bd-423 --reason "Duplicate of bd-367"
./bd close bd-396 --reason "Duplicate of bd-367"
# Group 14: GH-11 Docker support — KEEP bd-358
./bd close bd-629 --reason "Duplicate of bd-358"
./bd close bd-523 --reason "Duplicate of bd-358"
# Group 15: GH-3 Debug zsh killed error — KEEP bd-87
./bd close bd-618 --reason "Duplicate of bd-87"
./bd close bd-524 --reason "Duplicate of bd-87"
./bd close bd-510 --reason "Duplicate of bd-87"
./bd close bd-431 --reason "Duplicate of bd-87"
./bd close bd-406 --reason "Duplicate of bd-87"
./bd close bd-348 --reason "Duplicate of bd-87"
# Group 16: Git-based restoration for compacted issues — KEEP bd-404
./bd close bd-649 --reason "Duplicate of bd-404"
./bd close bd-604 --reason "Duplicate of bd-404"
./bd close bd-550 --reason "Duplicate of bd-404"
./bd close bd-495 --reason "Duplicate of bd-404"
./bd close bd-422 --reason "Duplicate of bd-404"
# Group 17: Implement bd restore command — KEEP bd-434
./bd close bd-637 --reason "Duplicate of bd-434"
./bd close bd-622 --reason "Duplicate of bd-434"
./bd close bd-607 --reason "Duplicate of bd-434"
./bd close bd-549 --reason "Duplicate of bd-434"
./bd close bd-531 --reason "Duplicate of bd-434"
./bd close bd-498 --reason "Duplicate of bd-434"
# Group 18: Improve error handling in dependency removal — KEEP bd-359
./bd close bd-650 --reason "Duplicate of bd-359"
./bd close bd-602 --reason "Duplicate of bd-359"
./bd close bd-515 --reason "Duplicate of bd-359"
./bd close bd-493 --reason "Duplicate of bd-359"
# Group 19: Low priority chore — KEEP bd-377
./bd close bd-659 --reason "Duplicate of bd-377"
./bd close bd-643 --reason "Duplicate of bd-377"
./bd close bd-547 --reason "Duplicate of bd-377"
./bd close bd-534 --reason "Duplicate of bd-377"
# Group 20: P2: Consider batching API — MERGE TO bd-371
./bd close bd-593 --reason "Duplicate of bd-371"
./bd close bd-486 --reason "Duplicate of bd-371"
./bd close bd-390 --reason "Duplicate of bd-371"
# Group 21: Reach 1.0 release milestone — KEEP bd-388
./bd close bd-632 --reason "Duplicate of bd-388"
./bd close bd-526 --reason "Duplicate of bd-388"
./bd close bd-425 --reason "Duplicate of bd-388"
./bd close bd-398 --reason "Duplicate of bd-388"
# Group 22: Record git commit hash during compaction — KEEP bd-433
./bd close bd-642 --reason "Duplicate of bd-433"
./bd close bd-641 --reason "Duplicate of bd-433"
./bd close bd-606 --reason "Duplicate of bd-433"
./bd close bd-551 --reason "Duplicate of bd-433"
./bd close bd-533 --reason "Duplicate of bd-433"
./bd close bd-497 --reason "Duplicate of bd-433"
# Group 23: Use safer placeholder pattern — KEEP bd-29
./bd close bd-603 --reason "Duplicate of bd-29"
./bd close bd-494 --reason "Duplicate of bd-29"
./bd close bd-445 --reason "Duplicate of bd-29"
./bd close bd-403 --reason "Duplicate of bd-29"
echo ""
echo "Done! Closed duplicates, kept the oldest open issue in each group."
./bd stats

View File

@@ -1,29 +0,0 @@
#!/bin/bash
# Delete all test issues (open and closed) from database
set -e
echo "Deleting all test issues..."
echo ""
# Get all test issues from database (open and closed)
test_ids=$(./bd list --json --no-auto-import | jq -r '.[] | select(.title | test("^(parallel_test|race_test|stress_test|final_test|final_review_test|verification_)")) | .id')
count=$(echo "$test_ids" | wc -l | tr -d ' ')
echo "Found $count test issues to delete"
echo ""
# Delete each one
i=0
for id in $test_ids; do
i=$((i+1))
if [ $((i % 25)) -eq 0 ]; then
echo " Progress: $i/$count"
fi
./bd delete "$id" --force --no-auto-import 2>&1 | grep -E "Error" || true
done
echo ""
echo "Done! Deleted $count test issues."
echo ""
./bd stats --no-auto-import

View File

@@ -1,24 +0,0 @@
#!/bin/bash
# Delete remaining test issues from current database
set -e
echo "Deleting remaining test issues..."
echo ""
# Get current test issues from database
test_ids=$(./bd list --status open --json --no-auto-import | jq -r '.[] | select(.title | test("^(parallel_test|race_test|stress_test|final_test|final_review_test|verification_)")) | .id')
count=$(echo "$test_ids" | wc -l | tr -d ' ')
echo "Found $count test issues to delete"
echo ""
# Delete each one
for id in $test_ids; do
./bd delete "$id" --force --no-auto-import 2>&1 | grep -E "(✓|Error)" || true
done
echo ""
echo "Done! Deleted test issues."
echo ""
./bd stats --no-auto-import

View File

@@ -1,25 +0,0 @@
#!/bin/bash
# Delete test issues - parallel_test, race_test, stress_test, final_test, final_review_test
set -e
echo "Deleting test issues..."
echo ""
# Get the list of test issue IDs (excluding closed)
test_ids=$(grep -E "^## (parallel_test|race_test|stress_test|final_test|final_review_test)" DUPLICATES_REPORT.md -A 20 | grep "^- bd-" | grep -v "closed" | awk '{print $2}' | sort -u)
count=$(echo "$test_ids" | wc -l)
echo "Found $count test issues to delete"
echo ""
# Delete each one (disable auto-import to avoid conflicts)
for id in $test_ids; do
echo "Deleting $id..."
./bd delete "$id" --force --no-auto-import
done
echo ""
echo "Done! Deleted $count test issues."
echo ""
./bd stats

View File

@@ -1,249 +0,0 @@
#!/usr/bin/env bash
#
# Beads (bd) installation script
# Usage: curl -fsSL https://raw.githubusercontent.com/steveyegge/beads/main/install.sh | bash
#
set -e
# Colors
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
BLUE='\033[0;34m'
NC='\033[0m' # No Color
log_info() {
echo -e "${BLUE}==>${NC} $1"
}
log_success() {
echo -e "${GREEN}==>${NC} $1"
}
log_warning() {
echo -e "${YELLOW}==>${NC} $1"
}
log_error() {
echo -e "${RED}Error:${NC} $1" >&2
}
# Detect OS and architecture
detect_platform() {
local os arch
case "$(uname -s)" in
Darwin)
os="darwin"
;;
Linux)
os="linux"
;;
*)
log_error "Unsupported operating system: $(uname -s)"
exit 1
;;
esac
case "$(uname -m)" in
x86_64|amd64)
arch="amd64"
;;
aarch64|arm64)
arch="arm64"
;;
*)
log_error "Unsupported architecture: $(uname -m)"
exit 1
;;
esac
echo "${os}-${arch}"
}
# Check if Go is installed and meets minimum version
check_go() {
if command -v go &> /dev/null; then
local go_version=$(go version | awk '{print $3}' | sed 's/go//')
log_info "Go detected: $(go version)"
# Extract major and minor version numbers
local major=$(echo "$go_version" | cut -d. -f1)
local minor=$(echo "$go_version" | cut -d. -f2)
# Check if Go version is 1.23 or later
if [ "$major" -eq 1 ] && [ "$minor" -lt 23 ]; then
log_error "Go 1.23 or later is required (found: $go_version)"
echo ""
echo "Please upgrade Go:"
echo " - Download from https://go.dev/dl/"
echo " - Or use your package manager to update"
echo ""
return 1
fi
return 0
else
return 1
fi
}
# Install using go install
install_with_go() {
log_info "Installing bd using 'go install'..."
if go install github.com/steveyegge/beads/cmd/bd@latest; then
log_success "bd installed successfully via go install"
# Check if GOPATH/bin is in PATH
local gopath_bin="$(go env GOPATH)/bin"
if [[ ":$PATH:" != *":$gopath_bin:"* ]]; then
log_warning "GOPATH/bin is not in your PATH"
echo ""
echo "Add this to your shell profile (~/.bashrc, ~/.zshrc, etc.):"
echo " export PATH=\"\$PATH:$gopath_bin\""
echo ""
fi
return 0
else
log_error "go install failed"
return 1
fi
}
# Build from source
build_from_source() {
log_info "Building bd from source..."
local tmp_dir
tmp_dir=$(mktemp -d)
cd "$tmp_dir"
log_info "Cloning repository..."
if git clone --depth 1 https://github.com/steveyegge/beads.git; then
cd beads
log_info "Building binary..."
if go build -o bd ./cmd/bd; then
# Determine install location
local install_dir
if [[ -w /usr/local/bin ]]; then
install_dir="/usr/local/bin"
else
install_dir="$HOME/.local/bin"
mkdir -p "$install_dir"
fi
log_info "Installing to $install_dir..."
if [[ -w "$install_dir" ]]; then
mv bd "$install_dir/"
else
sudo mv bd "$install_dir/"
fi
log_success "bd installed to $install_dir/bd"
# Check if install_dir is in PATH
if [[ ":$PATH:" != *":$install_dir:"* ]]; then
log_warning "$install_dir is not in your PATH"
echo ""
echo "Add this to your shell profile (~/.bashrc, ~/.zshrc, etc.):"
echo " export PATH=\"\$PATH:$install_dir\""
echo ""
fi
cd - > /dev/null
rm -rf "$tmp_dir"
return 0
else
log_error "Build failed"
cd - > /dev/null
rm -rf "$tmp_dir"
return 1
fi
else
log_error "Failed to clone repository"
rm -rf "$tmp_dir"
return 1
fi
}
# Install Go if not present (optional)
offer_go_installation() {
log_warning "Go is not installed"
echo ""
echo "bd requires Go 1.23 or later. You can:"
echo " 1. Install Go from https://go.dev/dl/"
echo " 2. Use your package manager:"
echo " - macOS: brew install go"
echo " - Ubuntu/Debian: sudo apt install golang"
echo " - Other Linux: Check your distro's package manager"
echo ""
echo "After installing Go, run this script again."
exit 1
}
# Verify installation
verify_installation() {
if command -v bd &> /dev/null; then
log_success "bd is installed and ready!"
echo ""
bd version 2>/dev/null || echo "bd (development build)"
echo ""
echo "Get started:"
echo " cd your-project"
echo " bd init"
echo " bd quickstart"
echo ""
return 0
else
log_error "bd was installed but is not in PATH"
return 1
fi
}
# Main installation flow
main() {
echo ""
echo "🔗 Beads (bd) Installer"
echo ""
log_info "Detecting platform..."
local platform
platform=$(detect_platform)
log_info "Platform: $platform"
# Try go install first
if check_go; then
if install_with_go; then
verify_installation
exit 0
fi
fi
# If go install failed or Go not present, try building from source
log_warning "Falling back to building from source..."
if ! check_go; then
offer_go_installation
fi
if build_from_source; then
verify_installation
exit 0
fi
# All methods failed
log_error "Installation failed"
echo ""
echo "Manual installation:"
echo " 1. Install Go from https://go.dev/dl/"
echo " 2. Run: go install github.com/steveyegge/beads/cmd/bd@latest"
echo ""
exit 1
}
main "$@"