2026-06-10 09:22:25 +02:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
# One awakening: hand Quince to Claude Code, headless, and let it run its
|
|
|
|
|
# routine from CLAUDE.md. Full transcript is tee'd to a dated log.
|
|
|
|
|
set -uo pipefail
|
|
|
|
|
|
|
|
|
|
HOME_DIR="/home/quince"
|
|
|
|
|
LOG="$HOME_DIR/logs/wake-$(date '+%Y-%m-%d').log"
|
|
|
|
|
cd "$HOME_DIR"
|
|
|
|
|
|
|
|
|
|
# The standing routine lives in CLAUDE.md (auto-loaded). The prompt is just the
|
|
|
|
|
# trigger — what wakes Quince and tells it the session has begun.
|
|
|
|
|
WAKE_PROMPT="Good morning, Quince. This is your scheduled awakening on $(date '+%A %Y-%m-%d %H:%M %Z').
|
|
|
|
|
Follow your daily routine as described in CLAUDE.md, start to finish: re-read your
|
2026-06-10 09:32:02 +02:00
|
|
|
goals in GOALS.md, run gutask resume (it returns your last session summary), read
|
|
|
|
|
and handle your inbox, pick up and do your work, and close out with gutask note +
|
|
|
|
|
gutask session-end. Work autonomously and leave a clear trail."
|
2026-06-10 09:22:25 +02:00
|
|
|
|
|
|
|
|
MODEL_ARG=()
|
|
|
|
|
[ -n "${CLAUDE_MODEL:-}" ] && MODEL_ARG=(--model "$CLAUDE_MODEL")
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
echo "===================================================================="
|
|
|
|
|
echo "AWAKENING $(date '+%Y-%m-%d %H:%M:%S %Z')"
|
|
|
|
|
echo "===================================================================="
|
|
|
|
|
} >> "$LOG"
|
|
|
|
|
|
|
|
|
|
# Headless run. --dangerously-skip-permissions: no human is present to approve
|
|
|
|
|
# tool calls, and the agent is sandboxed to its container + volume, with every
|
2026-06-10 09:32:02 +02:00
|
|
|
# action auditable via git, gutask notes, and its session history.
|
2026-06-10 09:22:25 +02:00
|
|
|
claude -p "$WAKE_PROMPT" \
|
|
|
|
|
--dangerously-skip-permissions \
|
|
|
|
|
--output-format text \
|
|
|
|
|
"${MODEL_ARG[@]}" \
|
|
|
|
|
>> "$LOG" 2>&1
|
|
|
|
|
|
|
|
|
|
status=$?
|
|
|
|
|
echo "[wake] claude exited with status $status at $(date '+%H:%M:%S %Z')" >> "$LOG"
|
|
|
|
|
exit $status
|