Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
fix(antigravity): single render path, README covers live-verified 1.2.12
Deduplicate the rule body into one render_rule function so the /dev/stdout
and atomic file paths cannot drift. README verified-versions line now includes
agy 1.2.12, confirmed live: plugin install preserves the rule byte-for-byte,
the rule loads at session start (probe + empty-profile control), and the exact
acceptance prompt auto-triggers brainstorming.
  • Loading branch information
aimansour committed Sep 27, 2026
commit 353e662bdbf3da1afc205d10eebc25afee2ac78c
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,8 @@ git clone https://github.com/obra/superpowers.git .agents/plugins/superpowers
All three surfaces load the plugin's always-on rule, which contains the
`using-superpowers` bootstrap and Antigravity tool mapping. The rule is generated
from their canonical files so both reach the model from the first message.
Verified on Antigravity CLI (`agy`) 1.2.7, Antigravity 2.0 2.15.0, and IDE 2.5.5.
Verified on Antigravity CLI (`agy`) 1.2.7 and 1.2.12, Antigravity 2.0 2.15.0,
and IDE 2.5.5.
Update the plugin directory to receive changes; for CLI, rerun
`agy plugin install ./superpowers` afterward.

Expand Down
34 changes: 10 additions & 24 deletions scripts/generate-antigravity-rule.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,8 @@ for src in "$SKILL_SRC" "$MAP_SRC"; do
test -r "$src" || { echo "FAIL: bootstrap source is missing or unreadable: $src" >&2; exit 1; }
done

if [[ "$OUTPUT" == /dev/* ]]; then
{
cat <<'HEADER'
render_rule() {
cat <<'HEADER'
---
trigger: always_on
description: Load Superpowers at the start of every Antigravity session
Expand All @@ -25,34 +24,21 @@ The Superpowers bootstrap and Antigravity tool mapping are already loaded below.
Do not reopen those two files merely to load them. Read other skills when needed.

HEADER
cat "$SKILL_SRC"
printf '\n\n'
cat "$MAP_SRC"
} > "$OUTPUT"
cat "$SKILL_SRC"
printf '\n\n'
cat "$MAP_SRC"
}

if [[ "$OUTPUT" == /dev/* ]]; then
render_rule > "$OUTPUT"
exit 0
fi

mkdir -p "$(dirname "$OUTPUT")"
TMP_OUTPUT="$(mktemp "$(dirname "$OUTPUT")/.superpowers.XXXXXX")"
trap 'rm -f "$TMP_OUTPUT"' EXIT

{
cat <<'HEADER'
---
trigger: always_on
description: Load Superpowers at the start of every Antigravity session
---

<!-- Generated by scripts/generate-antigravity-rule.sh. Do not edit directly. -->

The Superpowers bootstrap and Antigravity tool mapping are already loaded below.
Do not reopen those two files merely to load them. Read other skills when needed.

HEADER
cat "$SKILL_SRC"
printf '\n\n'
cat "$MAP_SRC"
} > "$TMP_OUTPUT"
render_rule > "$TMP_OUTPUT"

mv "$TMP_OUTPUT" "$OUTPUT"
trap - EXIT