Skip to content

Commit 3ac2fca

Browse files
committed
Implemented Adapters to Google Antigravity
1 parent 6328fbb commit 3ac2fca

6 files changed

Lines changed: 111 additions & 9 deletions

File tree

README.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ brew install agentic-stack
2828
# drop the brain into any project — the onboarding wizard runs automatically
2929
cd your-project
3030
agentic-stack claude-code
31-
# or: cursor | windsurf | opencode | openclaw | hermes | pi | standalone-python
31+
# or: cursor | windsurf | opencode | openclaw | hermes | pi | standalone-python | antigravity
3232
```
3333

3434
### Windows (PowerShell)
@@ -52,7 +52,7 @@ brew update && brew upgrade agentic-stack
5252
git clone https://github.com/codejunkie99/agentic-stack.git
5353
cd agentic-stack && ./install.sh claude-code # mac / linux / git-bash
5454
# or on Windows PowerShell: .\install.ps1 claude-code
55-
# adapters: claude-code | cursor | windsurf | opencode | openclaw | hermes | pi | standalone-python
55+
# adapters: claude-code | cursor | windsurf | opencode | openclaw | hermes | pi | standalone-python | antigravity
5656
```
5757

5858
## Onboarding wizard
@@ -154,9 +154,9 @@ harnesses.
154154
- `show.py` — colorful dashboard of brain state (episodes, candidates,
155155
lessons, failing skills, 14d activity sparkline). `--json` / `--plain`
156156
/ `NO_COLOR` flags.
157-
- **Adapter wiring for recall across all 8 harnesses.** Every adapter
157+
- **Adapter wiring for recall across all harnesses.** Every adapter
158158
(`claude-code`, `cursor`, `windsurf`, `opencode`, `openclaw`, `hermes`,
159-
`pi`, `standalone-python`) now instructs the model to run
159+
`pi`, `standalone-python`, `antigravity`) now instructs the model to run
160160
`recall.py "<intent>"` before deploy / migration / timestamp / debug /
161161
refactor work, and to surface results in a `Consulted lessons before
162162
acting:` block.
@@ -256,7 +256,8 @@ adapters/ # one small shim per harness
256256
├── openclaw/ (system-prompt include)
257257
├── hermes/ (AGENTS.md)
258258
├── pi/ (AGENTS.md + .pi/skills symlink)
259-
└── standalone-python/ (DIY conductor entrypoint)
259+
├── standalone-python/ (DIY conductor entrypoint)
260+
└── antigravity/ (ANTIGRAVITY.md)
260261
261262
docs/ # architecture, getting-started, per-harness
262263
install.sh # mac / linux / git-bash installer
@@ -281,6 +282,7 @@ onboard_write.py # atomic file write with backup
281282
| **Hermes Agent** | `AGENTS.md` (agentskills.io compatible) | partial (own memory) |
282283
| **Pi Coding Agent** | `AGENTS.md` + `.pi/skills/` | no (extension system) |
283284
| **Standalone Python** | `run.py` (any LLM) | yes (full control) |
285+
| **Antigravity** | `ANTIGRAVITY.md` | yes (system context) |
284286

285287
## Seed skills
286288

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# Project Instructions (Antigravity)
2+
3+
This project uses the **agentic-stack** portable brain. All memory, skills,
4+
and protocols live in `.agent/`.
5+
6+
## Before doing anything
7+
1. Read `.agent/AGENTS.md` — it's the map.
8+
2. Read `.agent/memory/personal/PREFERENCES.md` — how the user works.
9+
3. Read `.agent/memory/semantic/LESSONS.md` — what we've learned.
10+
4. Read `.agent/protocols/permissions.md` — what you can and cannot do.
11+
12+
## Before every non-trivial task — recall first
13+
For any task involving **deploy**, **ship**, **release**, **migration**,
14+
**schema change**, **timestamp** / **timezone** / **date**, **failing test**,
15+
**debug**, **investigate**, or **refactor**, run recall FIRST and present
16+
the surfaced lessons to yourself before acting:
17+
18+
```bash
19+
python3 .agent/tools/recall.py "<one-line description of what you're about to do>"
20+
```
21+
22+
If the output contains a "Consulted lessons for intent:" block with one or
23+
more results, show them to the user in a `Consulted lessons before acting:`
24+
block and adjust your plan to respect them. If a surfaced lesson would be
25+
violated by your intended action, stop and explain.
26+
27+
This is how graduated lessons actually change behavior across harnesses.
28+
Skip it and the system is just files on disk.
29+
30+
## While working
31+
- Consult `.agent/skills/_index.md` and load the full `SKILL.md` for any
32+
skill whose triggers match the task.
33+
- Update `.agent/memory/working/WORKSPACE.md` as the task evolves.
34+
- Log significant actions to `.agent/memory/episodic/AGENT_LEARNINGS.jsonl`
35+
via `.agent/tools/memory_reflect.py`.
36+
- Quick state check any time: `python3 .agent/tools/show.py`.
37+
- Teach the agent a new rule in one shot:
38+
`python3 .agent/tools/learn.py "<the rule>" --rationale "<why>"`.
39+
40+
## Rules that override defaults
41+
- Never force push to `main`, `production`, or `staging`.
42+
- Never delete episodic or semantic memory entries — archive them.
43+
- Never modify `.agent/protocols/permissions.md`.
44+
- Prefer using the `agentic-stack` tools for all repository-level learning and recall chores.

adapters/antigravity/README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Antigravity adapter
2+
3+
## Install
4+
```bash
5+
./install.sh antigravity
6+
```
7+
8+
## What it wires up
9+
The Antigravity adapter drops `ANTIGRAVITY.md` into the project root. This file provides
10+
the system context needed for the agent to utilize the portable brain in `.agent/`.
11+
12+
## Verify
13+
Ask the agent "What's in your lessons file?" — it should read
14+
`.agent/memory/semantic/LESSONS.md`.
15+
16+
## Notes
17+
The Antigravity ruleset ensures that the agent is aware of the `agentic-stack`
18+
protocols and memory management tools, enabling knowledge persistence across sessions.
19+
It is designed to be compatible with any agent that respects root-level instruction
20+
files similar to `CLAUDE.md`.

docs/per-harness/antigravity.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Antigravity setup
2+
3+
## What the adapter installs
4+
- `ANTIGRAVITY.md` at project root
5+
6+
## Install
7+
```bash
8+
./install.sh antigravity
9+
```
10+
11+
## How it works
12+
The Antigravity agent detects the `ANTIGRAVITY.md` file in the project root. This
13+
file instructs the agent to consult the `.agent/` folder for all knowledge, skills,
14+
and memory requirements. It follows a similar pattern to `CLAUDE.md` but is
15+
tailored for the Antigravity ruleset.
16+
17+
## Logging note
18+
Antigravity agents are instructed to call `memory_reflect.py` after significant
19+
actions to maintain the episodic memory layer. If the harness supports automated
20+
hooks, these should be configured to run `.agent/memory/auto_dream.py` on session exit.
21+
22+
## Troubleshooting
23+
- If the agent is not following the instructions in `ANTIGRAVITY.md`, prompt it to "Consult the project instructions in ANTIGRAVITY.md".
24+
- Ensure that the `.agent` folder exists and is populated. If not, re-run the installer.
25+
26+
## Manual Usage
27+
The tools can be manually triggered from the terminal:
28+
- `python3 .agent/tools/recall.py "intent"` to search semantic memory.
29+
- `python3 .agent/tools/learn.py "rule"` to graduate a new lesson permanently.
30+
- `python3 .agent/tools/show.py` to see the dashboard of brain state.

install.ps1

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# install.ps1 — Windows PowerShell installer (parallel to install.sh)
22
# Usage: .\install.ps1 <adapter-name> [target-dir] [-Yes] [-Reconfigure] [-Force]
3-
# adapter-name: claude-code | cursor | windsurf | opencode | openclaw | hermes | standalone-python
3+
# adapter-name: claude-code | cursor | windsurf | opencode | openclaw | hermes | standalone-python | antigravity
44
# target-dir: where your project lives (default: current dir)
55
# -Yes accept all wizard defaults (safe for CI)
66
# -Reconfigure re-run the wizard on an existing project
@@ -25,7 +25,7 @@ $Here = Split-Path -Parent $MyInvocation.MyCommand.Path
2525
$ValidAdapters = @(
2626
'claude-code', 'cursor', 'windsurf',
2727
'opencode', 'openclaw', 'hermes',
28-
'standalone-python'
28+
'standalone-python', 'antigravity'
2929
)
3030
if ($Adapter -notin $ValidAdapters) {
3131
Write-Error "unknown adapter '$Adapter'. valid: $($ValidAdapters -join ' ')"
@@ -75,6 +75,9 @@ switch ($Adapter) {
7575
'standalone-python' {
7676
Copy-Item (Join-Path $Src 'run.py') (Join-Path $TargetDir 'run.py') -Force
7777
}
78+
'antigravity' {
79+
Copy-Item (Join-Path $Src 'ANTIGRAVITY.md') (Join-Path $TargetDir 'ANTIGRAVITY.md') -Force
80+
}
7881
}
7982

8083
Write-Host "done."

install.sh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env bash
22
# install.sh — copy an adapter into the consuming project, then run the onboarding wizard
33
# Usage: ./install.sh <adapter-name> [target-dir] [--yes] [--reconfigure]
4-
# adapter-name: claude-code | cursor | windsurf | opencode | openclaw | hermes | pi | standalone-python
4+
# adapter-name: claude-code | cursor | windsurf | opencode | openclaw | hermes | pi | standalone-python | antigravity
55
# target-dir: where your project lives (default: current dir)
66
# --yes accept all wizard defaults without prompting (safe for CI)
77
# --reconfigure re-run the wizard even if PREFERENCES.md is already filled
@@ -13,7 +13,7 @@ HERE="$(cd "$(dirname "$0")" && pwd)"
1313

1414
if [[ -z "$ADAPTER" ]]; then
1515
echo "usage: $0 <adapter-name> [target-dir]" >&2
16-
echo "adapters: claude-code cursor windsurf opencode openclaw hermes pi standalone-python" >&2
16+
echo "adapters: claude-code cursor windsurf opencode openclaw hermes pi standalone-python antigravity" >&2
1717
exit 2
1818
fi
1919

@@ -88,6 +88,9 @@ case "$ADAPTER" in
8888
standalone-python)
8989
cp "$SRC/run.py" "$TARGET/run.py"
9090
;;
91+
antigravity)
92+
cp "$SRC/ANTIGRAVITY.md" "$TARGET/ANTIGRAVITY.md"
93+
;;
9194
*)
9295
echo "error: unknown adapter '$ADAPTER'" >&2
9396
exit 1

0 commit comments

Comments
 (0)