feat(pi): pi-automaton.sh startup context printer for Pi Dev
Pi Dev doesn't auto-load automaton's system prompt (unlike opencode), so the agent has no awareness of tasks, phases, or status.py commands. This bridges that gap: - scripts/pi-automaton.sh: NEW — detects scope (framework/project), reads active tasks, default model, config snippet, AGENTS.md rules, and prints a formatted context block the user pastes as their first message to the Pi Dev agent. Does NOT launch pi. - scripts/register-guards.sh: EXTENDED — after Pi Dev guard install, offers to symlink pi-automaton.sh to ~/bin/pi-automaton (interactive prompt only when stdin is a terminal). - README.md: added 'Using Pi Dev with automaton' FAQ subsection documenting the context printer workflow.
This commit is contained in:
@@ -66,6 +66,31 @@ if command -v pi &>/dev/null; then
|
||||
INSTALLED_PI=true
|
||||
echo "Pi Dev: installed"
|
||||
fi
|
||||
# Offer pi-automaton startup wrapper
|
||||
PI_WRAPPER="$FRAMEWORK_DIR/scripts/pi-automaton.sh"
|
||||
if [ -f "$PI_WRAPPER" ]; then
|
||||
echo ""
|
||||
echo "Pi Dev context wrapper available at:"
|
||||
echo " $PI_WRAPPER"
|
||||
echo ""
|
||||
echo "Before starting a Pi Dev session, run this script to print"
|
||||
echo "automaton project context that you can paste as your first message."
|
||||
echo ""
|
||||
echo " bash ~/.automaton/scripts/pi-automaton.sh"
|
||||
echo ""
|
||||
# Only prompt interactively if stdin is a terminal
|
||||
BIN_DIR="$HOME/bin"
|
||||
if [ -t 0 ] && [ ! -f "$BIN_DIR/pi-automaton" ]; then
|
||||
echo -n "Symlink to ~/bin/pi-automaton for easier access? [Y/n] "
|
||||
read -r REPLY
|
||||
if [ -z "$REPLY" ] || [ "$REPLY" = "y" ] || [ "$REPLY" = "Y" ]; then
|
||||
mkdir -p "$BIN_DIR"
|
||||
ln -sf "$PI_WRAPPER" "$BIN_DIR/pi-automaton"
|
||||
echo " Created $BIN_DIR/pi-automaton → $PI_WRAPPER"
|
||||
echo " (ensure ~/bin is in your PATH)"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
else
|
||||
echo "Pi Dev: not detected (pi not in PATH)"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user