feat(agents): add a Gemini style rewriter and pin agy-reviewer to a larger model - #659
Merged
Conversation
…arger model Adds `agy-stylist`, a dispatcher that rewrites prose through Gemini via `agy` in any register, and returns a proposed rewrite plus a change ledger without ever touching the source. Gemini's prose is the reason to reach outside the family for this, so the agent never writes the rewrite itself. Two modes. A single pass applies every lens in one call. Divergent runs one specialist per lens and then a consolidating writer. The specialists return findings, never competing rewrites: five rewrites of one passage are five incompatible documents, while five findings lists merge cleanly because a proposal is accept or reject and a document is not. Both modes were measured on a liability clause. The concision specialist proposed cutting "in any circumstances" from an exclusion, trading legal emphasis for word count, and the consolidator rejected it. The clarity specialist found sub-paragraphing the single pass had missed. That is the trade the mode exists to make, so it is documented rather than smoothed over. Also pins `agy-reviewer` to sonnet. On 2026-08-05 it returned a fluent, severity-ordered review after one tool call and 56 seconds without invoking `agy` at all, then cited the file under review as the path to the review. `agy` was healthy throughout and answered a probe in 19 seconds. Every warning against exactly that substitution was already in the prompt, so prose alone does not prevent it and the record now says so. Adds runtime model discovery. `agy models` lists current identifiers, which carry effort in the name, so the previously documented bare `gemini-3.6-flash` is not valid. `codex models` needs a terminal and fails headlessly, so the codex agents are told to report a rejected model name as the stale name it is rather than guessing a replacement or quietly doing the work themselves. Both installer tests hardcoded the agent count. Derived from AGENT_NAMES.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
agy-stylist, a dispatcher that rewrites prose through Gemini viaagy, and fixes a substitution failure caught in the sibling reviewer.Why a stylist
Gemini writes the most natural prose of the families available. The goal is to change how something reads without changing what it says, and to return the rewrite as a separate artifact so the caller, or another agent, can check it before anything is applied.
agywrites it, or the run failedTwo modes
Single pass: one call, all lenses, one document.
Divergent: one specialist per lens, then a consolidating writer.
The rule that matters is what the specialists return. They return findings, never competing rewrites. Five rewrites of one passage are five incompatible documents; five findings lists merge cleanly, because a proposal is accept or reject and a document is not.
Measured on a contract liability clause:
in any circumstancesfrom an exclusion, trading legal emphasis for word count. The consolidator rejected it.Specialists over-apply their own lens; that is the cost of the depth they buy. Both behaviours are documented rather than smoothed over.
Substance preservation held in the legal register: it kept
indemnify and hold harmless, keptany and all, and flagged each as deliberately retained with the reason.agy-reviewer pinned to sonnet
On 2026-08-05
agy-reviewerreturned a fluent, severity-ordered review after one tool call and 56 seconds, never invokedagy, and cited the file under review as the path to the full review.agywas healthy and answered a probe in 19 seconds.Every warning against that substitution was already in the prompt. Prose alone does not prevent it, so the model is pinned and the incident is recorded to stop a future downgrade.
Model routing
agy modelslists current identifiers, and effort is baked into the name, so the previously documented baregemini-3.6-flashis not valid.codex modelsneeds a terminal and fails headlessly, so the codex agents are told to report a rejected model name as the stale name it is rather than guess a replacement or quietly do the work themselves.Tests
Both installer suites hardcoded the agent count, one as a literal
existing=3. Derived fromAGENT_NAMES. Fullcheck-harnessgreen: 1268 passed, 2 xfailed.https://claude.ai/code/session_01DsDFRG6NVWb2VBNNtVkQ6N