Skip to content
Closed
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
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,4 @@ dist/
.venv/
venv/
env/
skills/swarm/scripts/skills/
skills/swarm/scripts/rules/
skills/swarm/scripts/agents/

41 changes: 5 additions & 36 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,10 @@
[![Python 3.11+](https://img.shields.io/badge/Python-3.11%2B-blue.svg)](./pyproject.toml)
[![Bun 1.0+](https://img.shields.io/badge/Bun-1.0%2B-orange.svg)](https://bun.sh)

**agystack** is an agentic engineering framework for Google Antigravity, created by [Joel Taroreh](https://x.com/joeltaroreh). It equips autonomous agents with a set of rigorous skills, playbooks, and cloud swarms built on the anti-slop foundation of [poteto](https://x.com/poteto)'s Cursor pstack.
**agystack** is an agentic engineering framework for Google Antigravity, created by [Joel Taroreh](https://x.com/joeltaroreh). It equips autonomous agents with a set of rigorous skills, playbooks, and adversarial workflows built on the anti-slop foundation of [poteto](https://x.com/poteto)'s Cursor pstack.

Where pstack brought anti-slop rigor to editor chats, **agystack expands it into a distributed, multi-tier engineering fleet**:
Where pstack brought anti-slop rigor to editor chats, **agystack brings it natively to Google Antigravity**:

- **Google Cloud Run Fleets (`/swarm`).** When local machines hit limits, fan out across headless cloud containers. Fleet workers run in parallel, stream real-time milestones, and deliver isolated candidate patches to GCS without git worktree collisions.
- **The `/loop` Hillclimb Engine.** Run automated hypothesis-and-verify loops against a concrete test command (`--verify "<cmd>"`). agystack applies discrete edits, reverts regressions, and reactively iterates until green without manual babysitting.
- **Automated PR Babysitting & Stack Shipping (`watch-pr`).** Eliminate GitHub PR friction. Dedicated tooling monitors CI checks, detects merge conflicts across Graphite stacks, and triages review comments. Real defects get fixed with runtime reproduction, while bot noise gets dismissed with concrete reasons.
- **Adversarial Reviews & Bakeoffs (`/interrogate`, `/arena`).** Prevent single-agent blind spots. Dispatch concurrent reviewers to attack diffs from independent angles before shipping, or run competing candidate implementations in parallel worktrees and graft winning pieces sequentially.
Expand Down Expand Up @@ -79,7 +78,7 @@ Restart Antigravity or open a new chat after install.

two steps:

1. run [`/setup-agystack`](./skills/setup-agystack/SKILL.md) and choose which models you want, choose if you want to setup cloud swarm with Google Cloud auth.
1. run [`/setup-agystack`](./skills/setup-agystack/SKILL.md) and choose which models you want per role.
2. use [`/agystack`](./skills/agystack/SKILL.md) or [`/poteto-mode`](./skills/poteto-mode/SKILL.md) whenever you're doing anything that requires rigor.

new here? the [agystack guide](./docs/guide/README.md) walks you through a first real task, from setup and prompting through verification and overnight runs.
Expand Down Expand Up @@ -149,38 +148,11 @@ the full rules and playbooks live in [`skills/poteto-mode/SKILL.md`](./skills/po

[`/agystack`](./skills/agystack/SKILL.md) and [`/poteto-mode`](./skills/poteto-mode/SKILL.md) are also sticky modes: once entered they stay on across turns, applying themselves when a playbook matches or the task needs rigor and staying out of the way otherwise. opt out any time by saying so.

they work seamlessly with Antigravity's `/goal` (for multi-hour overnight autonomy) and `/loop` (for inner-loop metric optimization and TDD hillclimbs). you can make agents work for many hours without sacrificing rigor.

## cloud swarms (Cloud Run)

local subagents work great for up to 8 workers. but when you want massive parallel exploration, parameter sweeps, or candidate bakeoffs, agystack fans out across Google Cloud Run instead.

workers run in isolated containers, never push to git directly, and upload `patch.diff` artifacts and streaming milestones to GCS. the coordinator ranks the winning diffs so you can review and apply them locally.

set it up with [`/setup-agystack`](./skills/setup-agystack/SKILL.md) with your Google Cloud auth and run [`/swarm`](./skills/swarm/SKILL.md) to dispatch.

### summoning cloud agents (Gemini & DeepSeek)

Cloud swarms run on Google Cloud Run with zero-friction serverless models:

```bash
# list supported cloud models and tiers
python3 skills/swarm/scripts/cloud_dispatch.py --list-models

# fan out 5 Gemini Argon agents
python3 skills/swarm/scripts/cloud_dispatch.py --tasks 5 --model gemini-4-argon

# fan out 5 DeepSeek Flash 4.1 agents
python3 skills/swarm/scripts/cloud_dispatch.py --tasks 5 --model deepseek-v4.1-flash
```

Or trigger `/swarm` right in chat:
- `/swarm 5 workers using Gemini Argon to test src/`
- `/swarm 5 workers using DeepSeek Flash to explore hypotheses`
they work seamlessly with Antigravity's `/goal` (for multi-hour overnight autonomy), `/loop` (for inner-loop metric optimization and TDD hillclimbs), and built-in `/swarm` (for multi-slice parallel fan-out). you can make agents work for many hours without sacrificing rigor.

## skills

[`/poteto-mode`](./skills/poteto-mode/SKILL.md) runs most of these for you when a step needs them (`how`, `why`, `architect`, `arena`, `swarm`, `interrogate`, `unslop`, `no-comments`, `technical-writing`, `tdd`, and the principles). the table below is for when you want one directly:
[`/poteto-mode`](./skills/poteto-mode/SKILL.md) runs most of these for you when a step needs them (`how`, `why`, `architect`, `arena`, `interrogate`, `unslop`, `no-comments`, `technical-writing`, `tdd`, and the principles). the table below is for when you want one directly:



Expand All @@ -206,7 +178,6 @@ Or trigger `/swarm` right in chat:
| `/grill-me` | your requirements are underspecified or ambiguous and you want Socratic pressure testing before kicking off architecture or autonomous execution ([guide](./docs/guide/04-design.md#flesh-out-ambiguous-requirements-with-grill-me)). |
| [`/architect`](./skills/architect/SKILL.md) | you're about to write code that crosses a function boundary and want the caller's usage, types, and module shape settled first. |
| [`/arena`](./skills/arena/SKILL.md) | you want N parallel attempts at the same thing, then to grab the best parts of each. |
| [`/swarm`](./skills/swarm/SKILL.md) | you want N parallel workers across different slices or races, then one aggregated report. |
| [`/interrogate`](./skills/interrogate/SKILL.md) | you have a diff and want several different models to try to break it, including a strict code-quality lens. |
| [`/automate-me`](./skills/automate-me/SKILL.md) | you want your own `-mode` skill, drafted from how you've actually worked. |
| [`/deslop`](./skills/deslop/SKILL.md) | you want to clean defensive code, redundant guards, and AI bloat out of diffs before commit. |
Expand Down Expand Up @@ -262,8 +233,6 @@ architect: design this instrumentation to be high signal with no false p
this first.
arena: /arena take my prompt to the arena verbatim. i want to compare their proposals
with yours.
swarm: /swarm check every package under packages/ against its check.sh. one worker per
package. one report.
interrogate: /interrogate review this pr.
tdd: /tdd implement
unslop: can we unslop and tighten the new changes?
Expand Down
1 change: 0 additions & 1 deletion agystack-models.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ reflect tooling: inherit
reflect judgment, divergent, synthesizer: inherit
arena runners: inherit, flash, pro
arena cross-judge pool: inherit, flash, pro
swarm workers: flash
architect runners: inherit, flash, pro
interrogate reviewers: inherit, flash, pro

Expand Down
12 changes: 0 additions & 12 deletions agystack-runtime.json.example

This file was deleted.

4 changes: 2 additions & 2 deletions docs/guide/01-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ In this page you install the plugin, pick which models agystack uses, and run yo

## Prerequisites

- `bun` (v1.0+) is mandatory for PR babysitting (`watch-pr`) and multi-agent orchestration (`orch`). Node.js is not supported.
- `bun` (v1.0+) is mandatory for PR babysitting (`watch-pr`) and TypeScript script tests (Node.js is used for `check-plan.mjs`).
- `gh` (GitHub CLI) is required for PR automation and preflight checks.
- `gt` (Graphite CLI) is recommended for stacked PRs.

Expand Down Expand Up @@ -54,7 +54,7 @@ Run:

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.

You might be wondering what happens if you use Auto. Set a role to `inherit-parent` or `auto` and agystack omits the subagent `model` field, so the subagent inherits your parent chat model. Both values mean the same thing, and neither is a model slug. For a panel role the value is a list, and one subagent runs per entry, so the list length sets the panel size. Setup also configures `swarm workers`, the default model for every `/swarm` worker unless a race names a model for each arm.
You might be wondering what happens if you use Auto. Set a role to `inherit-parent` or `auto` and agystack omits the subagent `model` field, so the subagent inherits your parent chat model. Both values mean the same thing, and neither is a model slug. For a panel role the value is a list, and one subagent runs per entry, so the list length sets the panel size.

## Accept the verification offer, or don't

Expand Down
10 changes: 5 additions & 5 deletions docs/guide/04-design.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Design before you write code

One attempt at a hard design locks in the first shape the model thought of. `/architect` settles types and boundaries before implementation. `/arena` runs several attempts at the same brief and merges the best parts. `/interrogate` has other models try to break the result. When the job is coverage rather than design synthesis, `/swarm` fans out slices or races and aggregates their results.
One attempt at a hard design locks in the first shape the model thought of. `/architect` settles types and boundaries before implementation. `/arena` runs several attempts at the same brief and merges the best parts. `/interrogate` has other models try to break the result. When the job is coverage rather than design synthesis, Antigravity's built-in `swarm` tool fans out slices or races and aggregates their results.

![Three robots draft competing bridge models at their own tables under /architect, /arena, and /interrogate panels, while a judge robot with a clipboard inspects skeptically.](./images/design.jpg)

Expand Down Expand Up @@ -56,15 +56,15 @@ The panel comes from your [`/setup-agystack`](../../skills/setup-agystack/SKILL.
/arena this, 5 candidates. the cache key format is expensive to change later.
```

## Cover slices and races with `/swarm`
## Cover slices and races with Antigravity's built-in `swarm`

```text
/swarm check every package under packages/ against its check.sh. one worker per package. one report.
```

[`/swarm`](../../skills/swarm/SKILL.md) fans N workers across independent slices, coverage matrices, gauntlet lanes, exploration partitions, or declared race arms. Each worker gets its own scope and check, then reports `PASS`, `ISSUES`, or `BLOCKED`. The parent waits for the workers and returns one compact report with any gaps or dropouts.
Antigravity's built-in `swarm` tool fans N workers across independent slices, coverage matrices, gauntlet lanes, exploration partitions, or declared race arms. Each worker gets its own scope and check, then reports back through the shared swarm board so the parent returns one compact report with any gaps or dropouts.

Reach for it when parallelism buys coverage or lets independent checks race. `/arena` gives every worker the same design or code brief, then picks a base and grafts the best parts. `/swarm` covers slices or runs a race with a selection rule declared up front. It does not use the base-selection and grafting ceremony.
Reach for it when parallelism buys coverage or lets independent checks race. `/arena` gives every worker the same design or code brief, then picks a base and grafts the best parts. Built-in `swarm` covers slices or runs a race with a selection rule declared up front without the base-selection and grafting ceremony.

## Break it with `/interrogate`

Expand All @@ -83,7 +83,7 @@ You might be wondering whether every change needs this. No. Most changes need no
- A small, finished change you're unsure about needs `/interrogate` alone.
- A change that crosses function boundaries or moves ownership earns `/architect`, which brings `/arena` with it.
- A standalone decision where independent attempts would help, like naming, formats, or an algorithm, is `/arena` directly.
- A coverage matrix, set of parallel checks, or race with declared arms is `/swarm`.
- A coverage matrix, set of parallel checks, or race with declared arms fits Antigravity's built-in `swarm`.
- A contested design that's expensive to reverse gets `/architect`, then `/interrogate` before shipping.

`/poteto-mode` already applies this ladder. Boundary-crossing work triggers `/architect` on its own, so you reach for these directly mainly when you want more or less scrutiny than the default.
Expand Down
2 changes: 1 addition & 1 deletion docs/guide/06-verify-and-ship.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ It writes `.agents/skills/verify-<app>/`, agent-facing instructions with exact L

From then on, "verify it in the app" is a step any agent can execute, in this repo, with no setup conversation.

Once the verify skill works, a [`/swarm`](../../skills/swarm/SKILL.md) can split a full pass by feature-map entry and aggregate the results.
Once the verify skill works, Antigravity's built-in `swarm` can split a full pass by feature-map entry and aggregate the results.

## Keep the verification skill honest

Expand Down
10 changes: 5 additions & 5 deletions docs/guide/10-recipes-and-pitfalls.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Your current design becomes one candidate among several, and the synthesis tells
/swarm check every package under packages/ against its check.sh. one worker per package. one report.
```

Each worker owns one package. The parent waits for every slice and returns one `PASS`, `ISSUES`, or `BLOCKED` report instead of raw worker dumps.
Antigravity's built-in `swarm` assigns each worker one package, waits for every slice, and returns one compact report instead of raw worker dumps.

## Review a branch skeptically

Expand Down Expand Up @@ -94,7 +94,7 @@ Whenever an agent uses `write_to_file`, the hook triggers `skills/poteto-mode/sc

## Destructive Command Guard with Antigravity PreToolUse Hooks

Prevent accidental catastrophic commands in interactive sessions without disrupting autonomous swarms or CI pipelines. Antigravity's `PreToolUse` lifecycle hook intercepts commands before execution and prompts for confirmation if a destructive command pattern is detected:
Prevent accidental catastrophic commands in interactive sessions without disrupting autonomous runs or CI pipelines. Antigravity's `PreToolUse` lifecycle hook intercepts commands before execution and prompts for confirmation if a destructive command pattern is detected:

```json
{
Expand All @@ -120,7 +120,7 @@ The hook evaluates `run_command` invocations for destructive signatures:
- Force-pushing to protected trunk branches (`git push --force origin main`, `git push origin +master`), while explicitly allowing `--force-with-lease` on feature branches
- Dropping databases (`drop database <name>`)

When running in headless environments (`NON_INTERACTIVE="1"`, `CI="true"`, or `CLOUD_RUN_TASK_INDEX` in Cloud Run worker containers), the hook automatically rejects destructive commands (`"decision": "reject"`) to prevent catastrophic corruption in unattended runs or automated test suites.
When running in headless environments (`NON_INTERACTIVE="1"` or `CI="true"`), the hook automatically rejects destructive commands (`"decision": "deny"`) to prevent catastrophic corruption in unattended runs or automated test suites.

To activate, copy or merge `hooks.json.example` into `.agents/hooks.json` (project-local) or `~/.gemini/config/hooks.json` (user-global).

Expand Down Expand Up @@ -151,15 +151,15 @@ The hook intercepts `write_to_file` and `replace_file_content` to keep coordinat
- Permits markdown deliverables (`*.md`, `*.markdown`) and scratch/slice files (`scratch/*`, `.slices/*`) immediately.
- Permits trivial surgical edits (<= 50 lines of code on a single existing file) directly.
- Bypasses checks for active subagents (`SUBAGENT=1`, `IS_SUBAGENT=1`, or child transcript detection).
- In headless/CI environments (`NON_INTERACTIVE="1"`, `CI="1"`, `CLOUD_RUN_TASK_INDEX`), rejects non-trivial direct code writes (`decision: reject`) unless subagents are disabled (`HEADLESS_NO_SUBAGENTS="1"`).
- In headless/CI environments (`NON_INTERACTIVE="1"`, `CI="1"`), rejects non-trivial direct code writes (`decision: reject`) unless subagents are disabled (`HEADLESS_NO_SUBAGENTS="1"` or `ALLOW_SUBAGENTS="false"`).
- In interactive sessions, prompts the user (`decision: force_ask`) on non-trivial writes (>50 lines on single existing files or creating new source files), preventing accidental coordinator bloat while providing an override when direct execution is explicitly desired.

## The pitfalls

- **Enumerating skills in the prompt.** "use /how then /architect then /arena" reorders steps the playbook already sequences. State the goal and constraints. Name a skill only to override a default.
- **A vague finish condition.** "make it better" gives `/loop` or `/goal` nothing to check. `/loop` requires a command that exits 0. `/goal` requires a checkable predicate or artifact. Give a command or artifact that can pass or fail.
- **Parallel agents in one worktree.** They overwrite each other and the diff becomes archaeology. Say "own worktree per attempt" and the isolation is free.
- **Using `/arena` for coverage.** `/arena` repeats one design or code brief, then picks a base and grafts the best parts. `/swarm` partitions slices or declared race arms and aggregates one report.
- **Using `/arena` for coverage.** `/arena` repeats one design or code brief, then picks a base and grafts the best parts. Antigravity's built-in `swarm` partitions slices or declared race arms and aggregates one report.
- **Accepting every review comment.** Bots and humans both file real catches and noise in one list. `/interrogate` sorts findings into act-on and dismissed buckets with reasons, and you can override either way.
- **Treating `auto` as a model slug.** `auto` and `inherit-parent` mean "omit the model field so the subagent inherits the parent chat model." [Setup](./01-setup.md) covers the roles.
- **Reporting success off a green build.** A build proves it compiles. Ask for the real command, flow, stored value, or profile, and expect the evidence in the reply.
Expand Down
2 changes: 1 addition & 1 deletion docs/guide/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Here's what you'll learn:
1. [Set up agystack](./01-setup.md). Install the plugin and pick your models.
2. [Route work through `/poteto-mode`](./02-poteto-mode.md). Give it a goal and watch it pick a playbook.
3. [Understand the code](./03-understand.md). `/how`, `/why`, `/teach`, and `/recall` before you edit anything.
4. [Design the change](./04-design.md). `/architect`, `/arena`, `/swarm`, and `/interrogate` before code locks in a shape.
4. [Design the change](./04-design.md). `/architect`, `/arena`, and `/interrogate` before code locks in a shape.
5. [Build and clean the change](./05-build-and-clean.md). The build playbooks, `/tdd`, `/deslop`, `/unslop`, and `/no-comments`.
6. [Verify and ship](./06-verify-and-ship.md). Prove behavior on the real app, then open a focused PR and drive it to merged.
7. [Run work while you sleep](./07-overnight.md). An overnight contract, a decision log you can audit, and the playbooks that scale past one agent.
Expand Down
Loading