# yuting0624/antigravity-for-claude-code architecture

> Architecture diagram of the GitHub repository yuting0624/antigravity-for-claude-code, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-03). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/yuting0624/antigravity-for-claude-code
- Repository: https://github.com/yuting0624/antigravity-for-claude-code

## Overview

Antigravity for Claude Code is a Claude Code plugin that delegates execution-heavy work to the Antigravity CLI (agy/Gemini), while Claude remains responsible for direction and verification. The principal workflow is a user request in Claude Code, routed through a plugin command or delegate, executed by agy, then reviewed by Claude. The README also documents research, review, media, Cloud Run debugging, background jobs, setup, and migration. Most runtime scripts were not sampled, so edges for those workflows rely on README descriptions; the sampled migration and session-measurement code provide narrower implementation evidence.

Main entry points: [`commands`](https://github.com/yuting0624/antigravity-for-claude-code/tree/master/commands) (Deep research), [`scripts/cloud-debug.sh`](https://github.com/yuting0624/antigravity-for-claude-code/blob/master/scripts/cloud-debug.sh) (Cloud Run debug), [`scripts/agy-delegate.sh`](https://github.com/yuting0624/antigravity-for-claude-code/blob/master/scripts/agy-delegate.sh) (Delegation), [`scripts/agy-media.sh`](https://github.com/yuting0624/antigravity-for-claude-code/blob/master/scripts/agy-media.sh) (Media analysis)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_orchestration["Claude orchestration"]
  node_plugin_commands["Slash commands"]
  node_review["Cross-model review"]
end

subgraph group_execution["Gemini execution"]
  node_delegate["Delegation<br/>[agy-delegate.sh]"]
  node_jobs["Background jobs<br/>[agy-job.sh]"]
  node_trace["Agent traces<br/>[agy-trace.sh]"]
end

subgraph group_capabilities["Specialized capabilities"]
  node_research["Deep research"]
  node_search["Search tools<br/>[agy-delegate.sh]"]
  node_media["Media analysis<br/>[agy-media.sh]"]
  node_cloud_debug["Cloud Run debug<br/>[cloud-debug.sh]"]
end

subgraph group_operations["Setup and measurement"]
  node_migrate_command["Migration command<br/>[migrate.md]"]
  node_migration["Setup migration<br/>[agy-migrate.py]"]
  node_policy["Routing policy"]
  node_setup["Health check"]
  node_measure["Cost measurement<br/>[measure-session.py]"]
  node_prices["Rate table<br/>[prices.json]"]
end

node_user(("User"))
node_claude(("Claude Code"))
node_agy{{"agy / Gemini"}}
node_web{{"Google / web"}}
node_vertex{{"Vertex AI Search"}}
node_cloud_logging{{"Cloud Logging"}}

node_user -->|"requests work"| node_claude
node_claude -->|"invokes commands"| node_plugin_commands
node_plugin_commands -->|"delegates tasks"| node_delegate
node_delegate -->|"runs work"| node_agy
node_claude -->|"requests review"| node_review
node_review -->|"gets opinion"| node_agy
node_claude -->|"orchestrates research"| node_research
node_research -->|"grounds research"| node_web
node_research -.->|"searches internal data"| node_vertex
node_claude -->|"requests analysis"| node_media
node_media -->|"analyzes media"| node_agy
node_claude -->|"requests diagnosis"| node_cloud_debug
node_cloud_debug -->|"digests logs"| node_agy
node_cloud_debug -->|"reads logs"| node_cloud_logging
node_claude -->|"starts delegation"| node_jobs
node_claude -->|"collects results"| node_jobs
node_agy -->|"leaves trajectories"| node_trace
node_claude -->|"requests migration"| node_migrate_command
node_migrate_command -->|"runs migration"| node_migration
node_claude -->|"receives policy"| node_policy
node_claude -->|"checks environment"| node_setup
node_measure -->|"loads rates"| node_prices

click node_plugin_commands "https://github.com/yuting0624/antigravity-for-claude-code/tree/master/commands"
click node_delegate "https://github.com/yuting0624/antigravity-for-claude-code/blob/master/scripts/agy-delegate.sh"
click node_review "https://github.com/yuting0624/antigravity-for-claude-code/tree/master/commands"
click node_research "https://github.com/yuting0624/antigravity-for-claude-code/tree/master/commands"
click node_search "https://github.com/yuting0624/antigravity-for-claude-code/blob/master/scripts/agy-delegate.sh"
click node_media "https://github.com/yuting0624/antigravity-for-claude-code/blob/master/scripts/agy-media.sh"
click node_cloud_debug "https://github.com/yuting0624/antigravity-for-claude-code/blob/master/scripts/cloud-debug.sh"
click node_jobs "https://github.com/yuting0624/antigravity-for-claude-code/blob/master/scripts/agy-job.sh"
click node_trace "https://github.com/yuting0624/antigravity-for-claude-code/blob/master/scripts/agy-trace.sh"
click node_migrate_command "https://github.com/yuting0624/antigravity-for-claude-code/blob/master/commands/migrate.md"
click node_migration "https://github.com/yuting0624/antigravity-for-claude-code/blob/master/scripts/agy-migrate.py"
click node_policy "https://github.com/yuting0624/antigravity-for-claude-code/tree/master/hooks"
click node_setup "https://github.com/yuting0624/antigravity-for-claude-code/blob/master/bin/agy-doctor"
click node_measure "https://github.com/yuting0624/antigravity-for-claude-code/blob/master/scripts/measure-session.py"
click node_prices "https://github.com/yuting0624/antigravity-for-claude-code/blob/master/prices.json"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_plugin_commands,node_review,node_user toneBlue
class node_delegate,node_jobs,node_trace toneAmber
class node_research,node_search,node_media,node_cloud_debug toneMint
class node_migrate_command,node_migration,node_policy,node_setup,node_measure,node_prices toneRose
class node_claude,node_agy,node_web,node_vertex,node_cloud_logging toneIndigo
```

## Components

### Claude orchestration

- [Slash commands](https://github.com/yuting0624/antigravity-for-claude-code/tree/master/commands): `commands`
- [Cross-model review](https://github.com/yuting0624/antigravity-for-claude-code/tree/master/commands): `commands`

### Gemini execution

- [Delegation](https://github.com/yuting0624/antigravity-for-claude-code/blob/master/scripts/agy-delegate.sh): `scripts/agy-delegate.sh`
- [Background jobs](https://github.com/yuting0624/antigravity-for-claude-code/blob/master/scripts/agy-job.sh): `scripts/agy-job.sh`
- [Agent traces](https://github.com/yuting0624/antigravity-for-claude-code/blob/master/scripts/agy-trace.sh): `scripts/agy-trace.sh`

### Specialized capabilities

- [Deep research](https://github.com/yuting0624/antigravity-for-claude-code/tree/master/commands): `commands`
- [Search tools](https://github.com/yuting0624/antigravity-for-claude-code/blob/master/scripts/agy-delegate.sh): `scripts/agy-delegate.sh`
- [Media analysis](https://github.com/yuting0624/antigravity-for-claude-code/blob/master/scripts/agy-media.sh): `scripts/agy-media.sh`
- [Cloud Run debug](https://github.com/yuting0624/antigravity-for-claude-code/blob/master/scripts/cloud-debug.sh): `scripts/cloud-debug.sh`

### Setup and measurement

- [Migration command](https://github.com/yuting0624/antigravity-for-claude-code/blob/master/commands/migrate.md): `commands/migrate.md`
- [Setup migration](https://github.com/yuting0624/antigravity-for-claude-code/blob/master/scripts/agy-migrate.py): `scripts/agy-migrate.py`
- [Routing policy](https://github.com/yuting0624/antigravity-for-claude-code/tree/master/hooks): `hooks`
- [Health check](https://github.com/yuting0624/antigravity-for-claude-code/blob/master/bin/agy-doctor): `bin/agy-doctor`
- [Cost measurement](https://github.com/yuting0624/antigravity-for-claude-code/blob/master/scripts/measure-session.py): `scripts/measure-session.py`
- [Rate table](https://github.com/yuting0624/antigravity-for-claude-code/blob/master/prices.json): `prices.json`

### Other components

- **User**
- **Claude Code**
- **agy / Gemini**
- **Google / web**
- **Vertex AI Search**
- **Cloud Logging**

## Connections

- User → Claude Code: requests work (evidence: `README.md`)
- Claude Code → Slash commands: invokes commands (evidence: `README.md`)
- Slash commands → Delegation: delegates tasks (evidence: `README.md`)
- Delegation → agy / Gemini: runs work (evidence: `README.md`)
- Claude Code → Cross-model review: requests review (evidence: `README.md`)
- Cross-model review → agy / Gemini: gets opinion (evidence: `README.md`)
- Claude Code → Deep research: orchestrates research (evidence: `README.md`)
- Deep research → Google / web: grounds research (evidence: `README.md`)
- Deep research → Vertex AI Search: searches internal data (evidence: `README.md`)
- Claude Code → Media analysis: requests analysis (evidence: `README.md`)
- Media analysis → agy / Gemini: analyzes media (evidence: `README.md`)
- Claude Code → Cloud Run debug: requests diagnosis (evidence: `README.md`)
- Cloud Run debug → agy / Gemini: digests logs (evidence: `README.md`)
- Cloud Run debug → Cloud Logging: reads logs (evidence: `README.md`)
- Claude Code → Background jobs: starts delegation (evidence: `README.md`)
- Claude Code → Background jobs: collects results (evidence: `README.md`)
- agy / Gemini → Agent traces: leaves trajectories (evidence: `README.md`)
- Claude Code → Migration command: requests migration (evidence: `README.md`)
- Migration command → Setup migration: runs migration (evidence: `README.md`)
- Claude Code → Routing policy: receives policy (evidence: `README.md`)
- Claude Code → Health check: checks environment (evidence: `README.md`)
- Cost measurement → Rate table: loads rates (evidence: `scripts/measure-session.py`)
