Skip to content

feat(agents): add a Gemini style rewriter and pin agy-reviewer to a larger model - #659

Merged
mblauberg merged 1 commit into
mainfrom
feat/agy-stylist
Aug 5, 2026
Merged

feat(agents): add a Gemini style rewriter and pin agy-reviewer to a larger model#659
mblauberg merged 1 commit into
mainfrom
feat/agy-stylist

Conversation

@mblauberg

Copy link
Copy Markdown
Owner

Adds agy-stylist, a dispatcher that rewrites prose through Gemini via agy, 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.

Never edits the source verified by checksum before and after
Never applies the rewrite proposes only; the caller decides
Never writes the rewrite itself agy writes it, or the run failed
Returns a change ledger what was dropped, and where meaning could have shifted

Two 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:

  • the concision specialist proposed cutting in any circumstances from an exclusion, trading legal emphasis for word count. The consolidator rejected it.
  • the clarity specialist found sub-paragraphing that the single pass had missed.

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, kept any and all, and flagged each as deliberately retained with the reason.

agy-reviewer pinned to sonnet

On 2026-08-05 agy-reviewer returned a fluent, severity-ordered review after one tool call and 56 seconds, never invoked agy, and cited the file under review as the path to the full review. agy was 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 models lists current identifiers, and effort is baked into 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 guess a replacement or quietly do the work themselves.

Tests

Both installer suites hardcoded the agent count, one as a literal existing=3. Derived from AGENT_NAMES. Full check-harness green: 1268 passed, 2 xfailed.

https://claude.ai/code/session_01DsDFRG6NVWb2VBNNtVkQ6N

…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.
Copilot AI lite review requested due to automatic review settings August 5, 2026 13:19

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@mblauberg
mblauberg merged commit e0d7beb into main Aug 5, 2026
7 checks passed
@mblauberg
mblauberg deleted the feat/agy-stylist branch August 5, 2026 13:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants