diff --git a/.claude/scripts/implement-all-issues.sh b/.claude/scripts/implement-all-issues.sh new file mode 100755 index 00000000..4f267c91 --- /dev/null +++ b/.claude/scripts/implement-all-issues.sh @@ -0,0 +1,597 @@ +#!/usr/bin/env bash +# +# implement-all-issues.sh +# Two-phase workflow: +# 1. Planning: LLM analyzes issues and creates implementation order +# 2. Execution: Loop through plan, invoke /implement-issue for each +# +# This script is an ORCHESTRATOR only. Quality checks (PR review, coverage, +# Greptile, CI validation) are handled by /implement-issue command. +# + +set -euo pipefail + +# ============================================================================ +# CONFIGURATION +# ============================================================================ + +PLAN_FILE="${PLAN_FILE:-$HOME/.claude/implementation-plan.json}" +STATE_FILE="${STATE_FILE:-$HOME/.claude/implementation-state.json}" +MAX_ISSUES="${MAX_ISSUES:-}" # Empty = unlimited +LABEL_FILTER="${LABEL_FILTER:-}" # Only process issues with this label +ASSIGNEE_FILTER="${ASSIGNEE_FILTER:-}" # Only issues for this assignee ("none" = unassigned) +ITERATION_DELAY="${ITERATION_DELAY:-5}" # Seconds between issues + +# ============================================================================ +# LOGGING +# ============================================================================ + +LOG_COLOR="\033[0;32m" +WARN_COLOR="\033[0;33m" +ERROR_COLOR="\033[0;31m" +RESET_COLOR="\033[0m" + +log() { echo -e "${LOG_COLOR}[INFO]${RESET_COLOR} $*"; } +log_warn() { echo -e "${WARN_COLOR}[WARN]${RESET_COLOR} $*"; } +log_error() { echo -e "${ERROR_COLOR}[ERROR]${RESET_COLOR} $*"; } +log_sep() { echo "─────────────────────────────────────────────────────────"; } + +# ============================================================================ +# USAGE +# ============================================================================ + +usage() { + cat <<'EOF' +Usage: implement-all-issues.sh [OPTIONS] + +Two-phase orchestrator for implementing GitHub issues. +Quality checks (PR review, coverage, Greptile, CI) are handled by /implement-issue. + +PHASE 1 - Planning: LLM analyzes issues and creates implementation order +PHASE 2 - Execution: Execute each issue using /implement-issue command + +OPTIONS: + --repo Repository (default: auto-detect from git origin) + --label