DEEP DIVE· 2 min read

An autonomous GitHub bot that knows when not to act

The cookbook’s GitHub agent recipe wires triage, PR review, and bug-fix automation into GitHub Actions on OpenCode and Muse Spark. Its most transferable lessons are the guardrails.

#github-actions#automation#agents#code-review

What the bot does

The recipe builds an autonomous GitHub Actions bot with four jobs: issue triage, pull-request review, AI-slop detection, and bug-fix PRs — running on OpenCode with Muse Spark as the model, via the Model API’s drop-in compatibility with existing agent CLIs. Everything runs inside your repository’s own Actions, not on someone else’s infrastructure.

Restraint as a design requirement

What separates this recipe from a naive “wire an LLM to webhooks” project is how much of it is about not acting. The review agent carries an explicit “NOT slop” list — criteria for changes it must not flag, so it doesn’t cry wolf on legitimate patterns. Triage never closes issues; that stays a human decision. The bug-fix agent opens no PR if it can’t reproduce the bug first. Meta’s framing is blunt: over-triggering is treated as a failure mode, not a nicety.

There’s a citation discipline too: the Q&A function must answer only from repository files, attach a file-and-section citation to its claims, and refuse to fabricate when the answer isn’t in the repo. For a bot speaking with your project’s voice in public threads, grounded-or-silent is the only defensible policy.

AGENTS.md: one file to rule the fleet

Every agent in the recipe auto-loads a shared AGENTS.md carrying repository context — so agents don’t guess at conventions — and the security rules they all inherit. Meta calls it the single most important file to adapt to your own project: the shipped version is a worked example for a Python/pytest/uv stack, meant to be rewritten for yours while keeping the SECURITY section verbatim.

Roll out in phases, earn writes

The deployment guidance is a four-phase trust ladder. Phase one: PR review and triage, read-only — validate quality on real traffic with zero blast radius. Phase two: explicit /oc commands, so maintainers invoke agent work deliberately. Phase three: label-gated automatic bug fixing. Phase four: hardening — branch protection, CODEOWNERS, CI gates. Write access is earned by a track record, never granted on day one. It’s the same philosophy as Muse Code’s own auditability story: autonomy expands only as fast as verification does.

How Meta validated it

A detail worth copying: the recipe was validated by driving the real agents headless against scripted issue and PR scenarios — reconstructing the Action’s prompt with a fake gh on PATH so nothing touched a live repository — then reading what they produced. Test your bot the way you’d test any untrusted automation: in a jar, before it meets production. The runnable recipe is in the cookbook under use cases.

Keep reading