Skip to content

feat(crossreview): Antigravity CLI as a reviewer and a host - #1

Merged
EvilFreelancer merged 3 commits into
EvilFreelancer:mainfrom
Sargares22:feat/antigravity-reviewer
Nov 1, 2026
Merged

EvilFreelancer merged 3 commits into
EvilFreelancer:mainfrom
Sargares22:feat/antigravity-reviewer

Conversation

@Sargares22

@Sargares22 Sargares22 commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

What

Adds the Antigravity CLI (agy) as a reviewer, antigravity:<model>, and as a host. Like every other row of the table it is offered only when the CLI is installed, and the model is whatever the user picks at setup.

Why it needs more than a table row

Checked on agy 1.3.0:

  • In print mode the prompt is only the value of -p, an argument. Plain text on stdin is ignored, so < {brief} > {out} cannot work as is, and a brief in argv is what rule 3 of AGENTS.md forbids.
  • --input-format stream-json does read stdin: one JSON message per line, {"event":"user","message":{"content":"…"}}. It requires --output-format stream-json, so stdout becomes an event stream and the answer is result.response.

How

The exchange lives in a small adapter next to the table, scripts/agy-stream.py (brief on stdin, review on stdout), and the row stays an ordinary command line:

python3 '{scripts}/agy-stream.py' {bin} {model} < {brief} > {out}
cmd /d /c --% python "{scripts}\agy-stream.py" {bin} {model} < {brief} > {out}

{scripts} is the one new placeholder: the directory of the table, filled in together with {bin} by the helper and both detection twins. The run and collect code of crossreview.py is untouched; the helper gains the placeholder, a parser for agy models and the host entry.

The first commit of this branch did it differently: two placeholders only the helper understood ({brief_json}, {out_json}). The second commit replaces that, because a roster command has three runners, the helper, Coddy's built-in coordinator and a shell without Python, and the coordinator skips an entry without {brief} and {out}. Squash on merge if you prefer one commit.

What the adapter does with the stream:

Stream Reviewer
result with SUCCESS the review is response
result with another status exit code 1 whatever the CLI's own, so failed; response, or failing that the streamed text, is still printed
denied_actions in the result listed on stderr
the CLI dies without a result the last agent response is printed, the exit code is kept
brief is not UTF-8 refused with a note, instead of being altered

The conversation id goes to stderr as soon as the CLI reports it, so a reviewer that timed out can be recovered with agy --conversation <id>.

Host: the global roster sits next to Antigravity's settings.json in ~/.gemini/antigravity-cli, the local one in .agents; aliases agy and antigravity-cli.

Version 2.1.0 in SKILL.md and the three manifests. The release mirror into rpa-skills and coddy-agent is left to you.

Things to decide

  1. It is not read-only. In print mode --mode plan did not stop a file write, inside or outside the working directory, when the prompt asked for one. Shell commands are denied, because print mode cannot ask for the permission. I found no per-run switch in 1.3.0. So this reviewer rests on the brief's tool ban and the empty work directory, the footing Kimi and Koda already have. references/agents.md and the README say so.
  2. The price of the adapter. This reviewer needs Python, the roster holds the absolute path of the script (a roster moved to another machine wants init --import --refresh, and roster warns about it), and a timeout leaves no partial review.
  3. Where Antigravity loads global skills from is not clear from its documentation. I added ~/.gemini/antigravity-cli/skills to the README install loop and to the lookup list in SKILL.md because that directory exists and holds skills on the machine I checked. Drop both lines if you know better.

Verification

  • python -m unittest discover -s tests: 61 tests pass on Windows 11 (Python 3.14) and on Ubuntu 24.04 under WSL (Python 3.12). Not run on macOS or on Python 3.8.
  • New tests drive a stub agy through the table's own row: a 150 KB brief with CRLF and non-ASCII text arrives byte for byte; error, aborted, denied-tool, died, timeout and non-UTF-8 cases; detection agreeing in the Python, sh and PowerShell twins with {scripts} filled; the row run through PowerShell with the prologue Coddy wraps around a command; the parser against event lines captured from the real CLI.
  • Real CLI, Windows: detect in both twins, models antigravity, probe, and a real review through run / wait / collect on gemini-3.8-flash-low (5 KB brief, 32 s).
  • Cross-reviewed with this skill. Fixed from it: the conversation id was written only after the CLI had exited, so a timeout lost it; a failed result with an empty response dropped the streamed text; the adapter path in double quotes let a shell expand $ in it. Not taken: resolving $PSScriptRoot through junctions (a warning at most).

Sargares22 and others added 3 commits October 7, 2026 08:06
In print mode `agy` takes the prompt only as the value of -p and reads no
plain text from stdin, so a `< {brief} > {out}` template cannot reach it
without putting the brief into argv. Its stream-json input has no such
limit, so the helper now speaks it:

- {brief_json}: the brief wrapped into one ASCII JSON line, written once
  per run as brief.stream.json and fed to stdin;
- {out_json}: reviews/<name>.jsonl, the CLI's event stream; when the
  reviewer ends, the response of the last `result` event becomes the
  usual reviews/<name>.md.

A result whose status is not SUCCESS fails the reviewer whatever the exit
code and keeps the text it carried; denied tool calls go to .err; a stream
cut short by a timeout leaves the last agent response as a partial review;
a brief that is not UTF-8 is refused up front instead of being altered.

Also: the agents.tsv row, a parser for `agy models`, a warning for a
command that mixes the plain and the stream placeholders, tests with a stub
agy driven through the table's own template, the documentation, and the
version bump to 2.1.0.

Checked on Antigravity CLI 1.3.0 (Windows): detect, models, probe, and real
reviews on gemini-3.8-flash-high and gemini-3.1-pro-high. Its print mode
does not block file writes even with --mode plan; references/agents.md and
the README say so.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…}/{out} command

The first version taught the helper two placeholders of its own,
{brief_json} and {out_json}. A roster command is run by three runners: the
helper, Coddy's built-in coordinator, and a shell without Python. Only the
first knew those placeholders; the coordinator skips an entry that has no
{brief} and {out}, so the reviewer would not have run inside Coddy.

Now the stream-json exchange lives in scripts/agy-stream.py (brief on
stdin, review on stdout) and the table row is an ordinary line:

  python3 "{scripts}/agy-stream.py" {bin} {model} < {brief} > {out}

{scripts}, the directory of the table, is filled in together with {bin} by
the helper and both detection twins. The run and collect code of the helper
is back to what it was; it keeps the `agy models` parser.

Also: `antigravity` as a host (global roster next to its settings.json in
~/.gemini/antigravity-cli, local one in .agents; aliases agy and
antigravity-cli), and a test that runs the row through PowerShell the way
Coddy does.

The cost: this reviewer needs Python, the roster holds the absolute path of
the adapter, and a timeout no longer leaves a partial review (the
conversation id in .err recovers it).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Found by a cross-review of the branch (Claude Fable 5.1, Codex gpt-6.1-sol):

- the conversation id was reported only after the CLI had exited, so a
  reviewer that timed out left nothing to recover it with; the adapter now
  reads the event stream line by line and writes the id at once;
- a failed result with an empty response dropped the text the CLI had
  streamed; it is printed now;
- the adapter path sat in double quotes, where a POSIX shell expands `$` and
  backticks; the POSIX column quotes it in single quotes.

Tests: the id survives a timeout, the aborted turn keeps its text, and the
parser is checked against event lines captured from agy 1.3.0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Sargares22 Sargares22 changed the title feat(crossreview): Antigravity CLI as a reviewer, over stream-json feat(crossreview): Antigravity CLI as a reviewer and a host Oct 7, 2026
@EvilFreelancer

Copy link
Copy Markdown
Owner

Superseded by branch feat/antigravity-reviewer (pushed to this repository, keeping your commits in history).

Review findings:

  • the stream-json adapter (agy-stream.py, the {scripts} placeholder) is replaced by the plain -p "\$(cat brief)" template, the same deal koda already has: agy -p takes the prompt only as an argument anyway, so the adapter bought freedom from the OS argument limit at the price of an extra script, a Python dependency inside the stored roster command and quoting caveats;
  • the koda-specific argument-limit warning and the exec-mode check now follow the template's shape instead of the agent name;
  • the ANSI parser for agy models was widened to the full CSI range;
  • AGENTS.md now records antigravity as the exception to the read-only hard rule.

Thank you for the contribution - the model listing, host/roster wiring and documentation are kept.

EvilFreelancer added a commit that referenced this pull request Nov 1, 2026
Antigravity (agy) joins the reviewer table: --mode plan with the brief as the
-p argument (the koda pattern; the helper refuses a brief too long for one
argument), agy models parsing, host/roster folders, detection on all three
platforms, docs and tests. Supersedes PR #1, keeping the author's commits.
@EvilFreelancer
EvilFreelancer merged commit be4837b into EvilFreelancer:main Nov 1, 2026
EvilFreelancer added a commit that referenced this pull request Nov 1, 2026
Antigravity (agy) joins the reviewer table: --mode plan with the brief as the
-p argument (the koda pattern; the helper refuses a brief too long for one
argument), agy models parsing, host/roster folders, detection on all three
platforms, docs and tests. Supersedes PR #1, keeping the author's commits.
EvilFreelancer added a commit that referenced this pull request Nov 1, 2026
Antigravity (agy) joins the reviewer table: --mode plan with the brief as the
-p argument (the koda pattern; the helper refuses a brief too long for one
argument), agy models parsing, host/roster folders, detection on all three
platforms, docs and tests. Supersedes PR #1, keeping the author's commits.
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