scripts: forge-driven fix-loop launcher (git→gitea→agentic→tmux)
First live test of the sx-forge technology driving a real work session: - sx-fix-up.sh <forge-agent> <briefing.md>: reads the agent's briefing FROM the rose-ash/sx-review forge (agentic-sx branch), materialises a git worktree + branch (loops/sx-<slug>), and spins up a tmux+claude session briefed from the forge. Commits are LOCAL by default (no push). - sx-fix-down.sh [--clean]: stop the sx-fix session; --clean removes worktrees. - plans/agent-briefings/sx-gate-loop.md: W14 (test gate) briefing — the safe first payload (test-only, cannot regress the 5762p/274f baseline), scoped commit-no-push with hard guardrails. Verified live: launcher read the W14 briefing from the forge, created worktree /root/rose-ash-loops/sx-ws-w14 on loops/sx-ws-w14, booted claude, and the agent picked up the briefing. Watch: tmux a -t sx-fix. Note: MCP servers need /mcp auth in a fresh worktree (agent works via Bash meanwhile). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
23
scripts/sx-fix-down.sh
Executable file
23
scripts/sx-fix-down.sh
Executable file
@@ -0,0 +1,23 @@
|
||||
#!/usr/bin/env bash
|
||||
# sx-fix-down.sh — stop the sx-fix tmux session (and optionally remove worktrees).
|
||||
# Usage: ./scripts/sx-fix-down.sh [--clean]
|
||||
# --clean also `git worktree remove` every /root/rose-ash-loops/sx-* worktree
|
||||
# Commits on loops/sx-* branches are preserved either way (branches are not deleted).
|
||||
set -euo pipefail
|
||||
ROOT="$(cd "$(dirname "$0")/.." && pwd)"; cd "$ROOT"
|
||||
SESSION="sx-fix"
|
||||
|
||||
if tmux has-session -t "$SESSION" 2>/dev/null; then
|
||||
tmux kill-session -t "$SESSION"
|
||||
echo "killed tmux session '$SESSION'."
|
||||
else
|
||||
echo "no tmux session '$SESSION'."
|
||||
fi
|
||||
|
||||
if [ "${1:-}" = "--clean" ]; then
|
||||
for wt in /root/rose-ash-loops/sx-*; do
|
||||
[ -d "$wt" ] || continue
|
||||
git worktree remove --force "$wt" 2>/dev/null && echo "removed worktree $wt" || echo "skip $wt"
|
||||
done
|
||||
echo "branches loops/sx-* are kept (commits preserved)."
|
||||
fi
|
||||
Reference in New Issue
Block a user