diff options
| author | Jesse Vincent <jesse@primeradiant.com> | 2026-06-01 10:18:28 -0700 |
|---|---|---|
| committer | Drew Ritter <drew@primeradiant.com> | 2026-06-16 10:09:44 -0700 |
| commit | 36ce0a21e409cfb3be498fae52e01a70589a04a6 (patch) | |
| tree | 9b21929043fb2bf36dc82763996b54e1adce7714 /tests | |
| parent | 3608167e0598b204e9ef219cdce0712ff515746b (diff) | |
feat: add Antigravity CLI (agy) support
Antigravity (Google's `agy` CLI) installs the existing Superpowers plugin
directly:
agy plugin install https://github.com/obra/superpowers
agy imports the bundled skills and runs the plugin's SessionStart hook, so
using-superpowers bootstraps from the first message — verified on agy 1.0.3:
a fresh session given "Let's make a react todo list" auto-triggers the
brainstorming skill instead of writing code. agy discovers skills natively
and, having no Skill tool, loads them by reading SKILL.md with view_file.
No scaffold, installer, or generated context file is needed. This adds only:
- README.md: an Antigravity install section + Quickstart link
- skills/using-superpowers/SKILL.md: reference to the agy tool mapping
- skills/using-superpowers/references/antigravity-tools.md: action->tool
mapping for agy (view_file, write_to_file, invoke_subagent, manage_task,
and skill loading via view_file on SKILL.md)
- tests/antigravity/: structural test for the tool mapping, mirroring
tests/pi/
Diffstat (limited to 'tests')
| -rwxr-xr-x | tests/antigravity/run-tests.sh | 16 | ||||
| -rwxr-xr-x | tests/antigravity/test-antigravity-tools.sh | 53 |
2 files changed, 69 insertions, 0 deletions
diff --git a/tests/antigravity/run-tests.sh b/tests/antigravity/run-tests.sh new file mode 100755 index 0000000..2d0c869 --- /dev/null +++ b/tests/antigravity/run-tests.sh @@ -0,0 +1,16 @@ +#!/usr/bin/env bash +# Run all Antigravity (agy) integration tests. +set -euo pipefail + +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" + +echo "=== Antigravity integration tests ===" + +for t in "$SCRIPT_DIR"/test-*.sh; do + echo + echo ">>> $t" + bash "$t" +done + +echo +echo "=== All Antigravity tests passed ===" diff --git a/tests/antigravity/test-antigravity-tools.sh b/tests/antigravity/test-antigravity-tools.sh new file mode 100755 index 0000000..e370ac0 --- /dev/null +++ b/tests/antigravity/test-antigravity-tools.sh @@ -0,0 +1,53 @@ +#!/usr/bin/env bash +# Validate the Antigravity (agy) integration. agy installs the existing plugin +# directly (`agy plugin install <repo-url>`): it loads the bundled skills and +# runs the SessionStart hook for bootstrap, so there is no agy-specific scaffold +# to test. What IS agy-specific is the tool mapping — agy has no `Skill` tool and +# loads skills by reading SKILL.md with view_file — and SKILL.md pointing at it. +# +# Mirrors tests/pi/test-pi-extension.mjs's "tools reference documents +# harness-specific mappings" check. CI-safe: does not require `agy` installed. +set -euo pipefail + +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +REPO_ROOT="$(cd "$SCRIPT_DIR/../.." && pwd)" + +MAPPING="$REPO_ROOT/skills/using-superpowers/references/antigravity-tools.md" +SKILL="$REPO_ROOT/skills/using-superpowers/SKILL.md" + +fail() { echo "FAIL: $*" >&2; exit 1; } + +echo "test-antigravity-tools: checking Antigravity tool mapping" + +# --- Mapping exists --------------------------------------------------------- +[ -f "$MAPPING" ] || fail "tool mapping missing at $MAPPING" + +# --- Skill-load mechanism: view_file on SKILL.md (IsSkillFile), no Skill tool - +grep -qiE "view_file" "$MAPPING" \ + || fail "mapping does not document view_file as the file/skill-read tool" +grep -qiE "SKILL\.md" "$MAPPING" \ + || fail "mapping does not document reading SKILL.md as the skill-load path" +grep -q "IsSkillFile" "$MAPPING" \ + || fail "mapping does not document setting IsSkillFile when loading a skill" + +# --- Core action→tool mappings are documented ------------------------------- +for tool in write_to_file replace_file_content run_command grep_search invoke_subagent; do + grep -q "$tool" "$MAPPING" \ + || fail "mapping does not document the '$tool' tool" +done + +# --- Subagents use the built-in self/research types ------------------------- +grep -q '`self`' "$MAPPING" \ + || fail "mapping does not document the built-in 'self' subagent type" +grep -q '`research`' "$MAPPING" \ + || fail "mapping does not document the built-in 'research' subagent type" + +# --- Task tracking documents the 'task' artifact mechanism ------------------ +grep -qE 'ArtifactType.*task|task. artifact' "$MAPPING" \ + || fail "mapping does not document task tracking as a 'task' artifact" + +# --- SKILL.md Platform Adaptation links the mapping ------------------------- +grep -q "antigravity-tools.md" "$SKILL" \ + || fail "SKILL.md Platform Adaptation does not reference antigravity-tools.md" + +echo "PASS: Antigravity tool mapping valid (view_file skill-load, agy tools, SKILL.md link)" |
