{"slug": "agents-concerto-orchestrating-claude-code-for-prs", "title": "Agents-Concerto: Orchestrating Claude Code for PRs", "summary": "Developer moruno21 released agents-concerto, an orchestration layer for Claude Code that enforces a four-role agent pipeline to generate pull requests without auto-merge. The system uses a Given-When-Then format for acceptance criteria, worktree isolation, and a two-party authority rule to keep final human control over merges. The open-source code is available at github.com/moruno21/agents-concerto.", "body_md": "# Agents-Concerto: Orchestrating Claude Code for PRs\n\nTo fix this, I built agents-concerto. It isn't a standalone app, but an orchestration layer for [Claude](/en/tags/claude/) Code. Think of it as a conductor and a set of players; the conductor manages the flow but never touches an instrument, ensuring the final merge always stays in human hands.\n\nThe system relies on a strict set of constraints to maintain quality:\n\n**Two-party authority:** No agent that writes code is allowed to approve or merge it.**Worktree isolation:** Every agent operates in its own git worktree to avoid messing up the local checkout.**No auto-merge:** The process stops exactly at \"PR ready.\"**Model by complexity:** The model isn't tied to a role; it's picked based on the complexity tier of the task.\n\n## The Logic of Acceptance Criteria\n\nThe biggest shift in my AI workflow was treating acceptance criteria as test specs rather than human notes. Using a Given-When-Then format (Given `X`\n\n, when `Y`\n\n, then `Z`\n\n), the system ensures that every requirement has an observable result.\n\nThis criterion travels through the pipeline: it's defined during the shaping phase, converted into a test during implementation, and verified by the reviewer. Because the \"then\" must be observable, it prevents the AI from cheating by asserting on internal state.\n\n## The Agent Pipeline\n\nI've divided the labor across four distinct roles:\n\n**Orchestrator (Opus):** Handles decomposition and dispatching. It is strictly forbidden from writing application code.**Classifier (Sonnet):** A read-only agent that assigns a complexity tier (`complex`\n\nvs`standard`\n\n) to determine which model handles the task.**Implementer:** This agent uses a \"Tidy First\" approach—it submits a structural refactor commit first, then a separate behavioral commit. It never mixes the two.**Reviewer (Opus):** Limited to`Read`\n\n,`Grep`\n\n,`Glob`\n\n, and`Bash`\n\n. It has no`Write`\n\nor`Edit`\n\npermissions, meaning it can describe a fix but cannot apply it.\n\nBy forcing \"outside-in\" testing—asserting only on outputs, UI, or API responses—we've eliminated the \"green tests, zero confidence\" problem.\n\n```\n# Example of the lightweight orchestration structure\n# CLAUDE.md (Instruction set)\n# agents/ (Markdown definitions for the 4 roles)\n# scripts/ (Bash wrappers for execution)\n```\n\nFor those looking for a real-world LLM agent deployment, the full logic is available here:`https://github.com/moruno21/agents-concerto`\n\n[Next AI Agents for Regulated Industries: My Workflow →](/en/threads/3719/)", "url": "https://wpnews.pro/news/agents-concerto-orchestrating-claude-code-for-prs", "canonical_source": "https://promptcube3.com/en/threads/3729/", "published_at": "2026-07-26 15:02:09+00:00", "updated_at": "2026-07-26 15:11:18.966551+00:00", "lang": "en", "topics": ["ai-agents", "developer-tools", "large-language-models"], "entities": ["moruno21", "Claude Code", "agents-concerto", "Opus", "Sonnet"], "alternates": {"html": "https://wpnews.pro/news/agents-concerto-orchestrating-claude-code-for-prs", "markdown": "https://wpnews.pro/news/agents-concerto-orchestrating-claude-code-for-prs.md", "text": "https://wpnews.pro/news/agents-concerto-orchestrating-claude-code-for-prs.txt", "jsonld": "https://wpnews.pro/news/agents-concerto-orchestrating-claude-code-for-prs.jsonld"}}