Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 12 additions & 5 deletions agystack-models.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
# agystack model configuration. One line per role. Delete a line to fall back to the skill default.
# Antigravity invoke_subagent model tiers:
# - inherit (Runs on the active parent chat session model, e.g. Gemini 3.8 Flash High)
# - pro (High-capability tier: deep reasoning, large refactors, complex design)
# - flash (Fast / balanced reasoning tier: exploration, reading, standard generation)
# - flash_lite (Lightweight tier: fast mechanical scans and lookups)
#
# Supported Model Identifiers:
# 1. Universal Tiers (Default, compatible with Gemini 3.8 Flash and any active parent session model):
# - inherit (Runs on the active parent chat session model, e.g. Gemini 3.8 Flash High or Gemini 4 Neon)
# - pro (High-capability tier: deep reasoning, large refactors, complex design)
# - flash (Fast / balanced reasoning tier: exploration, reading, standard generation)
# - flash_lite (Lightweight tier: fast mechanical scans and lookups)
#
# 2. Gemini 4 Effort-Balanced Identifiers (Automatically translated at each tool boundary):
# - gemini-4-neon-{low,medium,high,xhigh} (maps to 'pro' on invoke_subagent, 'gemini-4-neon' on /cloud-swarm, exact ID on native swarm)
# - gemini-4-argon-{low,medium,high} (maps to 'inherit' on invoke_subagent, 'gemini-4-argon' on /cloud-swarm, exact ID on native swarm)
# - gemini-4-hydrogen-{low,medium,high,xhigh} (maps to 'flash' on invoke_subagent, 'gemini-4-hydrogen' on /cloud-swarm, exact ID on native swarm)

feature, refactoring: inherit
bug-fix: inherit
Expand Down
2 changes: 1 addition & 1 deletion docs/guide/01-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ Run:
/setup-agystack
```

[`/setup-agystack`](../../skills/setup-agystack/SKILL.md) detects the models you have access to, shows you each role (code delegates, judgment, the review panels), and asks what you want. Answer the questions. It writes `~/.gemini/config/plugins/agystack/agystack-models.md`, a configuration file every agystack skill reads.
[`/setup-agystack`](../../skills/setup-agystack/SKILL.md) detects the models you have access to, shows you each role (code delegates, judgment, the review panels), and asks what you want. It offers both the **Universal / Gemini 3.8 Flash Compatible** default (`inherit`, `flash`, `pro`, ideal for Gemini 3.8 Flash users and following your active session model) and the **Gemini 4 Effort-Balanced** preset (`gemini-4-neon`, `gemini-4-argon`, `gemini-4-hydrogen` with `-low`, `-medium`, `-high`, `-xhigh` effort suffixes, which translate automatically across `invoke_subagent`, `/cloud-swarm`, and native `swarm`). Answer the questions. It writes `~/.gemini/config/plugins/agystack/agystack-models.md`, a configuration file every agystack skill reads.

You only override what you care about. A role with no line in the rule keeps the skill's default. To restore a default later, delete that role's line, or just run `/setup-agystack` again.

Expand Down
2 changes: 1 addition & 1 deletion rules/AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Mirroring pstack in Cursor, enforce strict separation between coordination and c
- **Autonomous & Hillclimb Playbooks (`Autonomous run`, `Hillclimb`, `Swarm`, `/goal`, `/loop`):** Unattended throughput invariant. Use `RequestFeedback: false`. Domain deliverables (`decision_trail.md`, `score.json`, `receipts/`) take precedence without interactive blocking.
- **Read-Only Investigation Playbooks (`Investigation`, `How`, `Why`, `Runtime Forensics`):** Produces `investigation_report.md` with `RequestFeedback: false`.
6. **Cloud Swarm Model Selection & Zero-Friction Fallback:**
- **Prefer Tier 1 Serverless Models:** Default to frictionless serverless models that require zero console forms: `gemini-3.8-flash`, `gemini-4-argon`, or `deepseek-v4.1-flash` (MaaS).
- **Prefer Tier 1 Serverless Models:** Default to frictionless serverless models that require zero console forms: `gemini-4-neon`, `gemini-4-argon`, `gemini-4-hydrogen`, `gemini-3.8-flash`, or `deepseek-v4.1-flash` (MaaS).
- **Gated Partner Gating Detection:** If a user requests an Anthropic partner model (`claude-3-opus`, `claude-3-5-sonnet`) that is not yet enabled in Vertex AI Model Garden, explain that Google enforces a one-time console form click-through that agents cannot accept programmatically, and immediately offer the Tier 1 zero-friction alternative.
- **Open-Weights vs. MaaS Distinction:** Models like `GLM 5.3` or `Llama 3.3` on Model Garden are deployable open-weights requiring dedicated GPU endpoints (8x H100/B200 instances), not on-demand serverless APIs. Never attempt to dispatch Cloud Run tasks against deploy-only models without an active dedicated endpoint.

Expand Down
2 changes: 1 addition & 1 deletion skills/architect/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Skip Phase A only when the work is genuinely greenfield with no surrounding syst

Run the **arena** skill with the design-sketch task and the Phase A grounding artifacts. Pass `references/runner-prompt.md` as each runner's prompt. Each candidate produces a design package shaped per `references/rationale-template.md`: the caller's usage written first, then the type sketch, function signatures, module map, and prose rationale derived from it.

Use your configured architect runners (defaults `pro`, `flash`, `inherit`).
Use your configured architect runners (defaults `pro`, `flash`, `inherit`). When `agystack-models.md` specifies Gemini 4 effort-suffixed entries (`gemini-4-neon-xhigh`, `gemini-4-argon-high`, `gemini-4-hydrogen-high`), translate them to the `invoke_subagent` enum (`pro`, `inherit`, `flash`), and if an account only has access to a single model tier (such as Gemini 3.8 Flash) or hits HTTP 429 `RESOURCE_EXHAUSTED` on `pro` or `flash`, fall back to `Model: "inherit"` so all panel slots complete.

Design it twice. Require at least two structurally distinct candidates before synthesis, even when the first looks sufficient. This is the **exhaust-the-design-space** principle skill made concrete. Whole-shape alternatives, not point fixes inside one shape.

Expand Down
2 changes: 1 addition & 1 deletion skills/cloud-swarm/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Before launching cloud swarms, match the model to the project's Model Garden ena

| Tier | Models | Endpoint Type | Friction | Setup Required |
|---|---|---|---|---|
| **Tier 1: Native MaaS** | `gemini-4-argon`, `gemini-3.8-flash`, `deepseek-v4.1-flash` | Global Serverless | **Zero** | Instant via existing ADC / project IAM |
| **Tier 1: Native MaaS** | `gemini-4-neon`, `gemini-4-argon`, `gemini-4-hydrogen`, `gemini-3.8-flash`, `deepseek-v4.1-flash` | Global Serverless | **Zero** | Instant via existing ADC / project IAM |
| **Tier 2: Gated Partner MaaS** | `claude-3-7-sonnet`, `claude-3-5-sonnet`, `claude-3-opus` | Regional Serverless | **Low / One-Time** | Console agreement click-through required |
| **Tier 3: Dedicated GPU** | `glm-5-3-flash`, `llama-3.3-70b` | Dedicated Endpoint | **High** | Dedicated 8x H100/B200 GPU instance provisioning |

Expand Down
55 changes: 45 additions & 10 deletions skills/cloud-swarm/scripts/cloud_dispatch.py
Original file line number Diff line number Diff line change
Expand Up @@ -1054,6 +1054,17 @@ def run_preflight(
raise RuntimeError(f"Gemini API ping failed: {exc}") from exc


def _strip_effort_suffix(model_str: str) -> str:
if not model_str:
return ""
cleaned = model_str.strip()
norm = cleaned.lower().replace("_", "-")
for suffix in ("-xhigh", "-high", "-medium", "-low"):
if norm.endswith(suffix) and len(cleaned) > len(suffix):
return cleaned[: -len(suffix)]
return cleaned


def resolve_swarm_model(
cli_model: Optional[str] = None,
runtime_model: Optional[str] = None,
Expand All @@ -1067,6 +1078,17 @@ def resolve_swarm_model(
or os.environ.get("GEMINI_MODEL", "").strip()
or None
)
if parent:
parent = _strip_effort_suffix(parent)
if parent.lower().replace("_", "-") in (
"inherit",
"auto",
"inherit-parent",
"orchestrator",
"gemini-pro-orchestrator-g1-pro",
"gemini-pro-orchestrator-neon",
):
parent = None

if cli_model and cli_model.strip():
chosen = cli_model.strip()
Expand Down Expand Up @@ -1110,13 +1132,20 @@ def resolve_swarm_model(

default_model = parent or "gemini-3.8-flash"
tier_map = {
"neon": "gemini-4-neon",
"gemini-neon": "gemini-4-neon",
"gemini-4-neon": "gemini-4-neon",
"argon": "gemini-4-argon",
"gemini-argon": "gemini-4-argon",
"gemini-4-argon": "gemini-4-argon",
"gemini-4": "gemini-4-argon",
"hydrogen": "gemini-4-hydrogen",
"gemini-hydrogen": "gemini-4-hydrogen",
"gemini-4-hydrogen": "gemini-4-hydrogen",
"flash": "gemini-3.8-flash",
"pro": "gemini-3.1-pro",
"flash_lite": "gemini-3.1-flash-lite",
"flash-lite": "gemini-3.1-flash-lite",
"argon": "gemini-4-argon",
"gemini-argon": "gemini-4-argon",
"gemini-4": "gemini-4-argon",
"gemini": "gemini-3.8-flash",
"deepseek": "deepseek-v4.1-flash",
"deepseek-flash": "deepseek-v4.1-flash",
Expand All @@ -1128,13 +1157,17 @@ def resolve_swarm_model(
"auto": default_model,
"inherit-parent": default_model,
"inherit_parent": default_model,
"orchestrator": default_model,
"gemini-pro-orchestrator-g1-pro": default_model,
"gemini-pro-orchestrator-neon": default_model,
}
norm_chosen = chosen.lower().replace("_", "-")
if chosen.lower() in tier_map:
return tier_map[chosen.lower()]
if norm_chosen in tier_map:
return tier_map[norm_chosen]
return chosen
stripped = _strip_effort_suffix(chosen)
norm_stripped = stripped.lower().replace("_", "-")
if stripped.lower() in tier_map:
return tier_map[stripped.lower()]
if norm_stripped in tier_map:
return tier_map[norm_stripped]
return stripped


try:
Expand Down Expand Up @@ -1306,7 +1339,9 @@ def main() -> None:
Vertex AI Model Garden Tiers for Cloud Swarms:
-----------------------------------------------------------------------------------------
Tier 1: Native MaaS (Instant Serverless, Zero Forms)
- gemini-4-argon Global Vertex AI endpoint, deep reasoning
- gemini-4-neon Global Vertex AI endpoint, frontier reasoning & coding
- gemini-4-argon Global Vertex AI endpoint, deep reasoning & systems engineering
- gemini-4-hydrogen Global Vertex AI endpoint, high-speed execution & verification
- gemini-3.8-flash Global Vertex AI endpoint, balanced speed
- gemini-3.1-pro Global Vertex AI endpoint, high capability
- deepseek-v4.1-flash Global Vertex AI endpoint (deepseek-ai namespace)
Expand Down
47 changes: 40 additions & 7 deletions skills/cloud-swarm/scripts/cloud_worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -703,6 +703,17 @@ def parse_porcelain_status(stdout: str) -> List[str]:
is_partner_model as is_partner_model,
measure_partner_client_startup as measure_partner_client_startup,
)
def _strip_effort_suffix(model_str: str) -> str:
if not model_str:
return ""
cleaned = model_str.strip()
norm = cleaned.lower().replace("_", "-")
for suffix in ("-xhigh", "-high", "-medium", "-low"):
if norm.endswith(suffix) and len(cleaned) > len(suffix):
return cleaned[: -len(suffix)]
return cleaned


def resolve_worker_model(raw_model: Optional[str] = None, task_item: Any = None) -> str:
"""
Resolves the worker model for a task, respecting per-task overrides in task_item,
Expand All @@ -722,20 +733,38 @@ def resolve_worker_model(raw_model: Optional[str] = None, task_item: Any = None)
else:
candidate = os.environ.get("MODEL_OVERRIDE", "").strip()

default_model = (
raw_default = (
os.environ.get("DEFAULT_SWARM_MODEL", "").strip()
or os.environ.get("DEFAULT_MODEL", "").strip()
or "gemini-3.8-flash"
)
stripped_default = _strip_effort_suffix(raw_default)
if not stripped_default or stripped_default.lower().replace("_", "-") in (
"inherit",
"auto",
"inherit-parent",
"orchestrator",
"gemini-pro-orchestrator-g1-pro",
"gemini-pro-orchestrator-neon",
):
default_model = "gemini-3.8-flash"
else:
default_model = stripped_default

alias_map = {
"neon": "gemini-4-neon",
"gemini-neon": "gemini-4-neon",
"gemini-4-neon": "gemini-4-neon",
"argon": "gemini-4-argon",
"gemini-argon": "gemini-4-argon",
"gemini-4-argon": "gemini-4-argon",
"gemini-4": "gemini-4-argon",
"hydrogen": "gemini-4-hydrogen",
"gemini-hydrogen": "gemini-4-hydrogen",
"gemini-4-hydrogen": "gemini-4-hydrogen",
"flash": "gemini-3.8-flash",
"pro": "gemini-3.1-pro",
"flash_lite": "gemini-3.1-flash-lite",
"flash-lite": "gemini-3.1-flash-lite",
"argon": "gemini-4-argon",
"gemini-argon": "gemini-4-argon",
"gemini-4": "gemini-4-argon",
"gemini": "gemini-3.8-flash",
"deepseek": "publishers/deepseek-ai/models/deepseek-v4.1-flash-maas",
"deepseek-flash": "publishers/deepseek-ai/models/deepseek-v4.1-flash-maas",
Expand All @@ -748,17 +777,21 @@ def resolve_worker_model(raw_model: Optional[str] = None, task_item: Any = None)
"inherit": default_model,
"inherit-parent": default_model,
"inherit_parent": default_model,
"orchestrator": default_model,
"gemini-pro-orchestrator-g1-pro": default_model,
"gemini-pro-orchestrator-neon": default_model,
"": default_model,
}
alias_map.update(PARTNER_MODEL_ALIASES)

norm = candidate.lower()
stripped_candidate = _strip_effort_suffix(candidate)
norm = stripped_candidate.lower()
if norm in alias_map:
return alias_map[norm]
norm_hyphen = norm.replace("_", "-")
if norm_hyphen in alias_map:
return alias_map[norm_hyphen]
return candidate
return stripped_candidate


def execute_task(
Expand Down
2 changes: 1 addition & 1 deletion skills/interrogate/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Use the `interrogate reviewers` list from `~/.gemini/config/plugins/agystack/agy
For each reviewer:
- `TypeName`: `research` (or `self`)
- `Role`: `Adversarial Reviewer (<model tier>)`
- `Model`: configured tier (or `pro`, `flash`, `inherit`)
- `Model`: configured tier (or `pro`, `flash`, `inherit`). When `agystack-models.md` specifies Gemini 4 effort-suffixed entries (`gemini-4-neon-high`, `gemini-4-argon-high`, `gemini-4-hydrogen-medium`), translate them to the `invoke_subagent` enum (`pro`, `inherit`, `flash`). If an account only has access to a single model tier (such as Gemini 3.8 Flash) or hits HTTP 429 `RESOURCE_EXHAUSTED` on `pro` or `flash`, fall back to `Model: "inherit"` so all panel slots complete.
- `Workspace`: `inherit`

Fill `references/reviewer-prompt.md` with:
Expand Down
39 changes: 33 additions & 6 deletions skills/poteto-mode/references/antigravity-tools.md
Original file line number Diff line number Diff line change
Expand Up @@ -189,19 +189,46 @@ Every playbook completion requires concrete proof on the real target surface bef

## Models

Antigravity subagents use native `invoke_subagent` model tiers. Model tiers (`inherit`, `pro`, `flash`, `flash_lite`) represent Gemini depth and compute budget tiers, not cross-family priors.
Antigravity subagents use native `invoke_subagent` model tiers (`inherit`, `pro`, `flash`, `flash_lite`), while `/cloud-swarm` and native `swarm` accept concrete model identifiers and effort suffixes.

- `inherit` (Inherits the active parent model, running your current session choice such as Gemini 3.8 Flash High with Antigravity 2.12.2 ADC support)
### Universal `invoke_subagent` Tiers

- `inherit` (Inherits the active parent model, running your current session choice such as Gemini 3.8 Flash High or Gemini 4 Neon with Antigravity 2.12.2 ADC support)
- `pro` (High-capability tier)
- `flash` (Balanced fast tier: fast exploration, standard implementation, and reviews)
- `flash_lite` (Lightweight tier: fast mechanical scans and lookups)

### Gemini 4 Family & Effort Suffixes

`agystack-models.md` also supports Gemini 4 family identifiers with optional `-low`, `-medium`, `-high`, or `-xhigh` effort suffixes:
- `gemini-4-neon` (`gemini-4-neon-{low,medium,high,xhigh}`): Frontier reasoning and coding tier.
- `gemini-4-argon` (`gemini-4-argon-{low,medium,high}`): Deep reasoning and systems engineering tier.
- `gemini-4-hydrogen` (`gemini-4-hydrogen-{low,medium,high,xhigh}`): High-speed execution and verification tier.

### Cross-Surface Boundary Translation

Because each execution surface enforces its own schema, model identifiers configured in `agystack-models.md` translate deterministically at each tool boundary (`setup_runtime.normalize_model_for_surface`):

| Configured `agystack-models.md` Entry | `invoke_subagent` (`Model` enum) | `/cloud-swarm` (Vertex AI / AI Studio) | Native `swarm` |
| --- | --- | --- | --- |
| `inherit` / `auto` | `inherit` | Active parent base model or `gemini-3.8-flash` | `inherit` |
| `pro` / `gemini-4-neon` / `gemini-4-neon-{low,medium,high,xhigh}` | `pro` | `gemini-3.1-pro` / `gemini-4-neon` (suffix stripped) | `gemini-4-neon-high` (or exact suffixed ID) |
| `gemini-4-argon` / `gemini-4-argon-{low,medium,high}` | `inherit` | `gemini-4-argon` (suffix stripped) | `gemini-4-argon-high` (or exact suffixed ID) |
| `flash` / `gemini-4-hydrogen` / `gemini-4-hydrogen-{low,medium,high,xhigh}` | `flash` | `gemini-3.8-flash` / `gemini-4-hydrogen` (suffix stripped) | `gemini-4-hydrogen-medium` (or exact suffixed ID) |
| `gemini-3.8-flash` / `gemini-3.8-flash-high` | `flash` | `gemini-3.8-flash` (suffix stripped) | `gemini-3.8-flash-high` |
| `flash_lite` / `gemini-3.1-flash-lite` | `flash_lite` | `gemini-3.1-flash-lite` | `gemini-3.1-flash-lite` |
| `orchestrator` / `gemini-pro-orchestrator-*` | `inherit` | Active parent base model or `gemini-3.8-flash` | `gemini-pro-orchestrator-g1-pro` (or exact ID) |

### Quota / Single-Tier Fallback

If an account only has access to a single model tier (such as Gemini 3.8 Flash) or encounters HTTP 429 `RESOURCE_EXHAUSTED` when spawning a `pro` or `flash` subagent via `invoke_subagent`, fall back immediately to `Model: "inherit"` so all subagents and multi-reviewer panel slots complete on the active session model without dropping coverage.

| Role / Intent | Antigravity Model Tier |
| --- | --- |
| Primary reasoning / difficult tasks | `inherit` (runs on your active chat model, e.g. Gemini 3.8 Flash High) |
| Fast mechanical scanning / exploration | `flash` or `flash_lite` |
| Deep judgment, prose, architecture | `inherit` or `pro` |
| Multi-model review panels | Diverse combination across `inherit`, `flash`, and `pro` |
| Primary reasoning / difficult tasks | `inherit` (runs on your active chat model, e.g. Gemini 3.8 Flash High or Gemini 4 Neon) |
| Fast mechanical scanning / exploration | `flash` or `flash_lite` (or `gemini-4-hydrogen-medium`) |
| Deep judgment, prose, architecture | `inherit` or `pro` (or `gemini-4-neon-xhigh`, `gemini-4-argon-high`) |
| Multi-model review panels | Diverse combination across `inherit`, `flash`, and `pro` (or Neon, Argon, Hydrogen) |

Read per-role overrides from `~/.gemini/config/plugins/agystack/agystack-models.md` (or `.agents/plugins/agystack/agystack-models.md`). If a line is missing, use the defaults above.

Expand Down
Loading
Loading