#!/usr/bin/env bash
# setup-nomos-soul.sh — provision Nomos agent persona.
# Copies ~/.nomos/SOUL.md from nomos/SOUL.md. No-op on non-Nomos agents.
set -euo pipefail

CLONE_DIR="${HOMELAB_CONTEXT_DIR:-/opt/homelab}"

if [ -f "$CLONE_DIR/nomos/SOUL.md" ]; then
    mkdir -p "$HOME/.nomos"
    cp "$CLONE_DIR/nomos/SOUL.md" "$HOME/.nomos/SOUL.md"
    echo "[setup-nomos-soul] SOUL.md provisioned"
else
    echo "[setup-nomos-soul] no nomos/SOUL.md found; skipping"
fi
