#!/usr/bin/env bash # .agents/bin/dev — box-box agentic dev CLI. Works from any harness's shell. # # dev implement --harness [--dry-run] [--base ] # # Grooming is driven interactively via the Claude Code /groom skill; this CLI covers # the implement lane (dispatch a Ready issue to a harness → worktree → gate → PR). set -o pipefail ROOT="$(cd "$(dirname "${BASH_SOURCE[0]:-$0}")/../.." && pwd)" usage() { cat >&2 < --harness [--dry-run] [--base ] harnesses: codex, cursor (recommended) · claude, opencode (available) · agy (dry-run only, disabled for dispatch) · pi (verify flags) --dry-run render the prompt + plan, touch nothing (no worktree/PR/state change) --base base branch for the worktree/PR (default: main) EOF exit 2 } cmd="${1:-}"; shift 2>/dev/null || true case "$cmd" in implement) issue="${1:-}"; shift 2>/dev/null || true harness=""; passthru=() while [ $# -gt 0 ]; do case "$1" in --harness) harness="${2:-}"; shift 2 ;; --dry-run) passthru+=(--dry-run); shift ;; --base) passthru+=(--base "${2:-}"); shift 2 ;; *) echo "unknown arg: $1" >&2; usage ;; esac done [ -n "$issue" ] && [ -n "$harness" ] || usage # shellcheck source=/dev/null source "$ROOT/.agents/lib/dispatch.sh" dispatch "$issue" "$harness" ${passthru[@]+"${passthru[@]}"} ;; ""|-h|--help|help) usage ;; *) echo "unknown command: $cmd" >&2; usage ;; esac