mirror of
https://github.com/galoryber/daedalus
synced 2026-06-21 13:51:16 +00:00
813a6a185e
A framework for running Claude Code as a fully autonomous agent via cron, with persistent memory, task management, and session handoff. Core features: - Checkpoint-based session handoff (save game system) - File-based state: tasks, worklog, questions, lessons-learned - Full autonomy with human-in-the-loop via questions + Pushover - PID management with stale session detection - 11-step autonomous workflow prompt - Customizable for any project via CLAUDE.md + ADAPTING.md guide Named for the myth: Daedalus, the master craftsman who built autonomous machines that worked tirelessly without supervision.
30 lines
835 B
Bash
Executable File
30 lines
835 B
Bash
Executable File
#!/bin/bash
|
|
# Generic prompt runner — pass any prompt file as an argument
|
|
# Usage: ./run-prompt.sh /path/to/prompt.md [max-turns]
|
|
set -euo pipefail
|
|
|
|
PROJECT_DIR="$(cd "$(dirname "$0")/.." && pwd)"
|
|
PROMPT_FILE="${1:?Usage: $0 <prompt-file> [max-turns]}"
|
|
MAX_TURNS="${2:-15}"
|
|
LOG_DIR="$PROJECT_DIR/logs"
|
|
PROMPT_NAME="$(basename "$PROMPT_FILE" .md)"
|
|
LOG_FILE="$LOG_DIR/${PROMPT_NAME}-$(date +%Y%m%d-%H%M%S).log"
|
|
|
|
if [ ! -f "$PROMPT_FILE" ]; then
|
|
echo "Error: Prompt file not found: $PROMPT_FILE" >&2
|
|
exit 1
|
|
fi
|
|
|
|
mkdir -p "$LOG_DIR"
|
|
cd "$PROJECT_DIR"
|
|
|
|
echo "=== Running prompt: $PROMPT_NAME — $(date) ===" >> "$LOG_FILE"
|
|
|
|
claude -p "$(cat "$PROMPT_FILE")" \
|
|
--dangerously-skip-permissions \
|
|
--max-turns "$MAX_TURNS" \
|
|
--output-format text \
|
|
>> "$LOG_FILE" 2>&1
|
|
|
|
echo "=== Completed: $(date) — exit: $? ===" >> "$LOG_FILE"
|