mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2026-08-09 08:04:45 +00:00
tools/buzz-agent/agent-exec.sh — the last mile from the scheduler to a live channel. Honors the `amy buzz agent serve --exec` contract: reads the task on stdin, runs a coding agent (Claude Code by default, or any $AGENT_CMD) inside the job's git worktree, verifies a diff exists, commits, pushes the `claude/job-*` feature branch, opens (or reuses) a PR, and prints the PR URL as the job result (kind-43004); any failure exits non-zero → job error (kind-43006). It never touches the default branch and never force-pushes — merge stays a human action on GitHub. README documents the load-bearing guardrails, since Buzz enforces none of them: a PR-only fine-grained token (Contents + Pull requests write, nothing else), branch protection on the default branch (require PR + review + CI, block force-push/deletion), and scoped intake (--accept-from) + agent tool allowlist. Verified end-to-end against a throwaway repo with a stubbed gh + agent (happy path pushes the branch and prints the PR URL; no-change path errors cleanly). Plan doc follow-up #3 marked done. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011mApqAbr8vkLC7gUDjavu6