diff options
Diffstat (limited to 'docs/superpowers/plans')
| -rw-r--r-- | docs/superpowers/plans/2026-10-06-antigravity-marketplace.md | 711 |
1 files changed, 711 insertions, 0 deletions
diff --git a/docs/superpowers/plans/2026-10-06-antigravity-marketplace.md b/docs/superpowers/plans/2026-10-06-antigravity-marketplace.md new file mode 100644 index 0000000..5804e05 --- /dev/null +++ b/docs/superpowers/plans/2026-10-06-antigravity-marketplace.md @@ -0,0 +1,711 @@ +# Antigravity Marketplace Plugin Implementation Plan + +> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking. + +**Goal:** Ship a native Antigravity plugin (manifest with Marketplace fields, logo, always-on rule bootstrap) so Superpowers can be listed in the Antigravity Marketplace. + +**Architecture:** agy reads `.antigravity-plugin/plugin.json` and discovers `skills/` by default. A one-line always-on rule, `rules/AGENTS.md`, `@`-points at `skills/using-superpowers/SKILL.md`; agy rewrites that path to an absolute install path and the model reads it with `view_file`. The logo is a PNG rendered from `assets/superpowers-small.svg` by a script. + +**Tech Stack:** bash, python3 (stdlib only, in tests), `rsvg-convert` (logo rendering only), `agy` 1.3.1 (optional in tests, required for live acceptance), `jq`. + +**Spec:** `docs/superpowers/specs/2026-10-06-antigravity-marketplace-design.md` + +> **Historical record.** This plan was executed as written. The `rules/AGENTS.md` bootstrap it describes was later removed in favor of skill discovery, and the Marketplace copy was replaced; see spec §1 and §2 for the shipped design. + +## Global Constraints + +- Work on branch `antigravity-marketplace`. PRs target `dev`. +- Never copy `using-superpowers` content into another file. The rule is a pointer only. +- No root `plugin.json` and no root `hooks.json` (either changes how agy reads the plugin). +- Manifest `name` is `superpowers`; must match `^[a-z0-9]+(-[a-z0-9]+)*$`. +- Manifest `description` is at most 160 characters. +- `suggestedPrompts`: 1–3 non-empty strings. +- Manifest `version` equals `.claude-plugin/plugin.json`'s `version` (6.4.2 at time of writing). +- `author` matches `.claude-plugin/plugin.json`: `{ "name": "Jesse Vincent", "email": "jesse@fsck.com" }`. +- Logo: `assets/antigravity-logo.png`, 512×512 RGBA PNG; white rounded square inset 31px, corner radius 100; mark `#1a1a1a`, scale 0.905 about (256,256). +- `${PLUGIN_ROOT}` is not substituted in rules. Do not use it in `rules/AGENTS.md`. +- New shell scripts must pass `scripts/lint-shell.sh <file>`. +- Any `agy plugin install` done for testing must be followed by `agy plugin uninstall superpowers`. + +--- + +## File Map + +| File | Action | Responsibility | +|---|---|---| +| `scripts/render-antigravity-logo.sh` | Create | Compose logo SVG from `assets/superpowers-small.svg`, rasterize to PNG | +| `assets/antigravity-logo.png` | Create (generated) | Marketplace logo | +| `.antigravity-plugin/plugin.json` | Create | Native manifest with Marketplace fields | +| `rules/AGENTS.md` | Create | Always-on bootstrap pointer | +| `.version-bump.json` | Modify | Register the new manifest's version | +| `tests/antigravity/test-logo.sh` | Create | Logo file shape checks | +| `tests/antigravity/test-plugin-manifest.sh` | Create | Manifest, rule, and layout checks; `agy plugin validate` when available | +| `tests/antigravity/test-antigravity-tools.sh` | Modify | Fix stale header comment | +| `scripts/sync-to-codex-plugin.sh` | Modify | Exclude Antigravity-only files from the Codex sync | +| `tests/codex-plugin-sync/test-sync-to-codex-plugin.sh` | Modify | Assert those exclusions | +| `README.md` | Modify | Antigravity section prose | +| `docs/porting-to-a-new-harness.md` | Modify (separate commit) | Remove phantom installer; record agy findings | + +--- + +### Task 1: Logo renderer and logo + +**Files:** +- Create: `scripts/render-antigravity-logo.sh` +- Create: `assets/antigravity-logo.png` (generated by the script) +- Test: `tests/antigravity/test-logo.sh` + +**Interfaces:** +- Produces: `assets/antigravity-logo.png` (Task 2's manifest `logo` field points here). `scripts/render-antigravity-logo.sh [--output PATH]`, default output `assets/antigravity-logo.png`. + +- [ ] **Step 1: Write the failing test** + +Create `tests/antigravity/test-logo.sh`: + +```bash +#!/usr/bin/env bash +# Check the Antigravity Marketplace logo: a square RGBA PNG at least 128x128 +# (the Marketplace minimum), at the path the manifest names. When rsvg-convert +# is available, also check the committed PNG matches a fresh render, so the +# asset can't drift from scripts/render-antigravity-logo.sh. +set -euo pipefail + +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +REPO_ROOT="$(cd "$SCRIPT_DIR/../.." && pwd)" +LOGO="$REPO_ROOT/assets/antigravity-logo.png" + +fail() { echo "FAIL: $*" >&2; exit 1; } + +echo "test-logo: checking Antigravity logo" + +[ -f "$LOGO" ] || fail "logo missing at $LOGO" + +python3 - "$LOGO" <<'PY' +import struct +import sys + +data = open(sys.argv[1], "rb").read() +if data[:8] != b"\x89PNG\r\n\x1a\n": + raise SystemExit("FAIL: logo is not a PNG") +width, height, bit_depth, color_type = struct.unpack(">IIBB", data[16:26]) +if width != height: + raise SystemExit(f"FAIL: logo is not square ({width}x{height})") +if width < 128: + raise SystemExit(f"FAIL: logo is smaller than 128x128 ({width}x{height})") +if color_type != 6: + raise SystemExit(f"FAIL: logo is not RGBA (PNG color type {color_type})") +PY + +if command -v rsvg-convert >/dev/null 2>&1; then + tmp="$(mktemp -d)" + trap 'rm -f "$tmp/logo.png"; rmdir "$tmp"' EXIT + bash "$REPO_ROOT/scripts/render-antigravity-logo.sh" --output "$tmp/logo.png" >/dev/null + cmp -s "$tmp/logo.png" "$LOGO" \ + || fail "assets/antigravity-logo.png is stale; run scripts/render-antigravity-logo.sh" +else + echo "SKIP: rsvg-convert not on PATH; not checking logo freshness" +fi + +echo "PASS: Antigravity logo valid" +``` + +- [ ] **Step 2: Run test to verify it fails** + +Run: `bash tests/antigravity/test-logo.sh` +Expected: `FAIL: logo missing at .../assets/antigravity-logo.png`, exit 1. + +- [ ] **Step 3: Write the renderer** + +Create `scripts/render-antigravity-logo.sh`: + +```bash +#!/usr/bin/env bash +# +# Render the Antigravity Marketplace logo from assets/superpowers-small.svg. +# +# Usage: +# scripts/render-antigravity-logo.sh [--output PATH] +# +# Draws the Superpowers mark in near-black on a white rounded square with +# transparent corners, 512x512 PNG. Run it whenever superpowers-small.svg +# changes; tests/antigravity/test-logo.sh fails if the committed PNG is stale. +# Requires rsvg-convert (Homebrew: librsvg). +set -euo pipefail + +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +REPO_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)" +SOURCE_SVG="$REPO_ROOT/assets/superpowers-small.svg" +OUTPUT="$REPO_ROOT/assets/antigravity-logo.png" + +usage() { + sed -n '2,11p' "$0" | sed 's/^# \{0,1\}//' +} + +die() { + echo "error: $*" >&2 + exit 1 +} + +while [[ $# -gt 0 ]]; do + case "$1" in + --output) + [[ $# -ge 2 ]] || die "--output needs a path" + OUTPUT="$2" + shift 2 + ;; + -h | --help) + usage + exit 0 + ;; + *) + usage >&2 + die "unknown argument: $1" + ;; + esac +done + +command -v rsvg-convert >/dev/null 2>&1 \ + || die "rsvg-convert is not on PATH (install librsvg, e.g. 'brew install librsvg')" +[[ -r "$SOURCE_SVG" ]] || die "source mark not readable: $SOURCE_SVG" + +# Everything inside the source <svg> element: the mark's paths and ellipse. +mark="$(sed -E 's/^.*<svg[^>]*>//; s#</svg>.*$##' "$SOURCE_SVG")" +[[ -n "$mark" ]] || die "could not extract the mark from $SOURCE_SVG" + +# The mark's bounding box is centered at (256,256) in its 512 viewBox and is +# 348 units wide; scale 0.905 makes it ~70% of the 450-unit rounded square. +composed="$(mktemp)" +trap 'rm -f "$composed"' EXIT +cat >"$composed" <<EOF +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" width="512" height="512"> + <rect x="31" y="31" width="450" height="450" rx="100" ry="100" fill="#ffffff"/> + <g fill="#1a1a1a" transform="translate(256 256) scale(0.905) translate(-256 -256)">$mark</g> +</svg> +EOF + +rsvg-convert -w 512 -h 512 "$composed" -o "$OUTPUT" +echo "wrote $OUTPUT" +``` + +Then: `chmod +x scripts/render-antigravity-logo.sh` + +- [ ] **Step 4: Render the logo and look at it** + +Run: `bash scripts/render-antigravity-logo.sh` +Expected: `wrote .../assets/antigravity-logo.png`. + +Open `assets/antigravity-logo.png` with the Read tool and confirm: white rounded square, transparent corners, full mark (two arcs, two inner strokes, and the center dot) centered in near-black. + +- [ ] **Step 5: Run the test and the shell linter** + +Run: `bash tests/antigravity/test-logo.sh && scripts/lint-shell.sh scripts/render-antigravity-logo.sh tests/antigravity/test-logo.sh` +Expected: `PASS: Antigravity logo valid`, linter clean. Also run `bash scripts/render-antigravity-logo.sh --help` and confirm it prints usage. + +- [ ] **Step 6: Commit** + +```bash +git add scripts/render-antigravity-logo.sh assets/antigravity-logo.png tests/antigravity/test-logo.sh +git commit -m "feat(antigravity): render Marketplace logo from the Superpowers mark" +``` + +--- + +### Task 2: Native manifest, bootstrap rule, version bump + +**Files:** +- Create: `.antigravity-plugin/plugin.json` +- Create: `rules/AGENTS.md` +- Modify: `.version-bump.json` (add one entry to `files`) +- Test: `tests/antigravity/test-plugin-manifest.sh` + +**Interfaces:** +- Consumes: `assets/antigravity-logo.png` from Task 1. +- Produces: `.antigravity-plugin/plugin.json`, `rules/AGENTS.md` (Task 3 excludes both from the Codex sync; Task 5 installs them). + +- [ ] **Step 1: Write the failing test** + +Create `tests/antigravity/test-plugin-manifest.sh`: + +```bash +#!/usr/bin/env bash +# Validate the native Antigravity plugin: the Marketplace manifest, the +# always-on rule that bootstraps using-superpowers, and the repo layout agy +# depends on. CI-safe; when `agy` is on PATH, also runs `agy plugin validate`. +set -euo pipefail + +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +REPO_ROOT="$(cd "$SCRIPT_DIR/../.." && pwd)" + +echo "test-plugin-manifest: checking Antigravity plugin" + +python3 - "$REPO_ROOT" <<'PY' +import json +import re +import struct +import sys +from pathlib import Path + +root = Path(sys.argv[1]) + +def fail(message): + raise SystemExit(f"FAIL: {message}") + +manifest_path = root / ".antigravity-plugin" / "plugin.json" +if not manifest_path.is_file(): + fail(f"manifest missing at {manifest_path}") +manifest = json.loads(manifest_path.read_text(encoding="utf-8")) + +# --- Marketplace-required fields ------------------------------------------- +for field in ["name", "description", "displayName", "logo", + "suggestedPrompts", "version", "author"]: + if not manifest.get(field): + fail(f"manifest field {field!r} is missing or empty") + +if manifest["name"] != "superpowers": + fail(f"name must be 'superpowers', got {manifest['name']!r}") +if not re.fullmatch(r"[a-z0-9]+(-[a-z0-9]+)*", manifest["name"]): + fail("name is not kebab-case") + +description_length = len(manifest["description"]) +if not 120 <= description_length <= 160: + fail(f"description is {description_length} characters; Marketplace wants 120-160") + +prompts = manifest["suggestedPrompts"] +if not isinstance(prompts, list) or not 1 <= len(prompts) <= 3: + fail("suggestedPrompts must be a list of 1-3 prompts") +if not all(isinstance(p, str) and p.strip() for p in prompts): + fail("suggestedPrompts entries must be non-empty strings") + +claude_manifest = json.loads( + (root / ".claude-plugin" / "plugin.json").read_text(encoding="utf-8")) +if manifest["version"] != claude_manifest["version"]: + fail(f"version {manifest['version']!r} != .claude-plugin version " + f"{claude_manifest['version']!r}") +if manifest["author"] != claude_manifest["author"]: + fail("author does not match .claude-plugin/plugin.json") + +# --- Logo ------------------------------------------------------------------ +logo = root / manifest["logo"] +if not logo.is_file(): + fail(f"logo {manifest['logo']!r} does not exist") +header = logo.read_bytes()[:26] +if header[:8] != b"\x89PNG\r\n\x1a\n": + fail("logo is not a PNG") +width, height = struct.unpack(">II", header[16:24]) +if width != height or width < 128: + fail(f"logo must be square and at least 128x128, got {width}x{height}") + +# --- Version bumps --------------------------------------------------------- +version_config = json.loads((root / ".version-bump.json").read_text(encoding="utf-8")) +if not any(entry.get("path") == ".antigravity-plugin/plugin.json" + and entry.get("field") == "version" + for entry in version_config.get("files", [])): + fail(".version-bump.json does not register .antigravity-plugin/plugin.json") + +# --- Bootstrap rule: @-pointers only, each resolving from rules/ ----------- +rule = root / "rules" / "AGENTS.md" +if not rule.is_file(): + fail(f"bootstrap rule missing at {rule}") +lines = [line.strip() for line in rule.read_text(encoding="utf-8").splitlines() + if line.strip()] +if not lines: + fail("bootstrap rule is empty") +for line in lines: + if not line.startswith("@"): + fail(f"bootstrap rule must contain only @-pointers, found: {line!r}") + target = (rule.parent / line[1:]).resolve() + if not target.is_file(): + fail(f"rule pointer {line!r} does not resolve from rules/ to a file") +if not any(line.endswith("skills/using-superpowers/SKILL.md") for line in lines): + fail("bootstrap rule does not point at using-superpowers") + +# --- Layout agy depends on ------------------------------------------------- +for stray in ["plugin.json", "hooks.json"]: + if (root / stray).exists(): + fail(f"root {stray} must not exist; agy would read it instead") +PY + +if command -v agy >/dev/null 2>&1; then + output="$(agy plugin validate "$REPO_ROOT" 2>&1)" \ + || { echo "$output" >&2; echo "FAIL: agy plugin validate failed" >&2; exit 1; } + grep -q '\[ok\]' <<<"$output" \ + || { echo "$output" >&2; echo "FAIL: agy plugin validate did not report [ok]" >&2; exit 1; } + grep -qE 'skills +: [0-9]+ processed' <<<"$output" \ + || { echo "$output" >&2; echo "FAIL: agy found no skills" >&2; exit 1; } +else + echo "SKIP: agy not on PATH; not running agy plugin validate" +fi + +echo "PASS: Antigravity plugin manifest and bootstrap rule valid" +``` + +Note: `agy plugin validate` output contains ANSI color codes around `[ok]`; the `grep -q '\[ok\]'` still matches because the codes surround, not split, the text. Verify this in Step 4; if it does not match, strip codes with `sed 's/\x1b\[[0-9;]*m//g'` before grepping. + +- [ ] **Step 2: Run test to verify it fails** + +Run: `bash tests/antigravity/test-plugin-manifest.sh` +Expected: `FAIL: manifest missing at .../.antigravity-plugin/plugin.json`, exit 1. + +- [ ] **Step 3: Write the manifest, the rule, and the version-bump entry** + +Create `.antigravity-plugin/plugin.json`: + +```json +{ + "name": "superpowers", + "displayName": "Superpowers", + "version": "6.4.2", + "description": "Skills that make your coding agent work like a senior engineer: brainstorming, planning, test-driven development, systematic debugging, and code review.", + "logo": "assets/antigravity-logo.png", + "suggestedPrompts": [ + "Let's brainstorm a new feature before writing any code", + "Help me systematically debug a failing test", + "Write an implementation plan for this change" + ], + "category": "Developer Tools", + "keywords": [ + "skills", + "tdd", + "debugging", + "collaboration", + "best-practices", + "workflows" + ], + "author": { + "name": "Jesse Vincent", + "email": "jesse@fsck.com" + }, + "homepage": "https://github.com/obra/superpowers", + "repository": "https://github.com/obra/superpowers", + "license": "MIT" +} +``` + +The `description` and `suggestedPrompts` copy needs Jesse's approval before this commit. If he changes it, keep the description 120–160 characters. + +Create `rules/AGENTS.md` containing exactly one line: + +``` +@../skills/using-superpowers/SKILL.md +``` + +In `.version-bump.json`, add after the `.kimi-plugin/plugin.json` entry: + +```json + { "path": ".antigravity-plugin/plugin.json", "field": "version" }, +``` + +- [ ] **Step 4: Run tests to verify they pass** + +Run: `bash tests/antigravity/test-plugin-manifest.sh && scripts/bump-version.sh --check && scripts/bump-version.sh --audit && bash tests/version-bump/test-bump-version.sh && scripts/lint-shell.sh tests/antigravity/test-plugin-manifest.sh` +Expected: `PASS: Antigravity plugin manifest and bootstrap rule valid` (with the agy validate step running, since agy is installed here), version check reports all files at 6.4.2, audit finds no unlisted version strings, version-bump test passes, linter clean. + +- [ ] **Step 5: Commit** + +```bash +git add .antigravity-plugin/plugin.json rules/AGENTS.md .version-bump.json tests/antigravity/test-plugin-manifest.sh +git commit -m "feat(antigravity): native plugin manifest with always-on bootstrap rule" +``` + +--- + +### Task 3: Keep Antigravity-only files out of the Codex sync + +**Files:** +- Modify: `scripts/sync-to-codex-plugin.sh` (the `EXCLUDES=(` array, ~line 45) +- Test: `tests/codex-plugin-sync/test-sync-to-codex-plugin.sh` + +**Interfaces:** +- Consumes: the paths `.antigravity-plugin/plugin.json`, `rules/AGENTS.md`, `assets/antigravity-logo.png`. + +- [ ] **Step 1: Write the failing test** + +In `tests/codex-plugin-sync/test-sync-to-codex-plugin.sh`: + +In `write_upstream_fixture`, add `"$repo/.antigravity-plugin"` and `"$repo/rules"` to the `mkdir -p` list. After the `.kimi-plugin/plugin.json` heredoc (~line 242), add: + +```bash + cat > "$repo/.antigravity-plugin/plugin.json" <<EOF +{ + "name": "superpowers", + "version": "$MANIFEST_VERSION" +} +EOF + + printf '@../skills/using-superpowers/SKILL.md\n' > "$repo/rules/AGENTS.md" + printf 'antigravity png fixture\n' > "$repo/assets/antigravity-logo.png" +``` + +Add these three paths to that function's `git -C "$repo" add` list: + +```bash + .antigravity-plugin/plugin.json \ + rules/AGENTS.md \ + assets/antigravity-logo.png \ +``` + +After the existing assertion `assert_not_contains "$preview_section" ".kimi-plugin/plugin.json" ...` (~line 659), add: + +```bash + assert_not_contains "$preview_section" ".antigravity-plugin/plugin.json" "Preview excludes Antigravity manifest from Codex sync" + assert_not_contains "$preview_section" "rules/AGENTS.md" "Preview excludes Antigravity bootstrap rule from Codex sync" + assert_not_contains "$preview_section" "assets/antigravity-logo.png" "Preview excludes Antigravity logo from Codex sync" +``` + +- [ ] **Step 2: Run test to verify it fails** + +Run: `bash tests/codex-plugin-sync/test-sync-to-codex-plugin.sh` +Expected: the three new assertions FAIL (the files appear in the preview); the rest pass. + +- [ ] **Step 3: Add the exclusions** + +In `scripts/sync-to-codex-plugin.sh`, in `EXCLUDES=(`: + +After `"/.claude/"` (alphabetical among dotdirs), add: + +```bash + "/.antigravity-plugin/" +``` + +Under `# Directories not shipped by canonical Codex plugins`, add `"/rules/"` in alphabetical position (after `"/lib/"`): + +```bash + "/rules/" +``` + +Add a new group after the directories group: + +```bash + + # Other harnesses' assets + "/assets/antigravity-logo.png" +``` + +- [ ] **Step 4: Run test to verify it passes** + +Run: `bash tests/codex-plugin-sync/test-sync-to-codex-plugin.sh && scripts/lint-shell.sh scripts/sync-to-codex-plugin.sh tests/codex-plugin-sync/test-sync-to-codex-plugin.sh` +Expected: all assertions pass, including `assets/app-icon.png` and `assets/superpowers-small.svg` still included; linter clean. + +- [ ] **Step 5: Commit** + +```bash +git add scripts/sync-to-codex-plugin.sh tests/codex-plugin-sync/test-sync-to-codex-plugin.sh +git commit -m "fix(codex-sync): exclude Antigravity manifest, rule, and logo" +``` + +--- + +### Task 4: README and stale test comment + +**Files:** +- Modify: `README.md:84-93` (the `### Antigravity` section) +- Modify: `tests/antigravity/test-antigravity-tools.sh:1-10` (header comment) + +**Interfaces:** none. + +- [ ] **Step 1: Update the README section** + +Replace the body of `### Antigravity` (keep the heading) with: + +````markdown +Install Superpowers as a plugin from this repository: + +```bash +agy plugin install https://github.com/obra/superpowers +``` + +The plugin ships an always-on rule that loads the `using-superpowers` skill, so +Superpowers is active from the first message. Reinstall with the same command to +update. +```` + +- [ ] **Step 2: Fix the stale header comment** + +In `tests/antigravity/test-antigravity-tools.sh`, replace lines 2–7: + +```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 — subagent dispatch via +# invoke_subagent (self/research types) and task tracking via a task artifact — +# and SKILL.md pointing at it. +``` + +with: + +```bash +# Validate the Antigravity (agy) tool mapping: subagent dispatch via +# invoke_subagent (self/research types), task tracking via a task artifact, and +# SKILL.md pointing at the mapping. The plugin manifest and bootstrap rule are +# checked by test-plugin-manifest.sh. +``` + +- [ ] **Step 3: Run the Antigravity suite** + +Run: `bash tests/antigravity/run-tests.sh` +Expected: all three tests pass, ending `=== All Antigravity tests passed ===`. + +- [ ] **Step 4: Commit** + +```bash +git add README.md tests/antigravity/test-antigravity-tools.sh +git commit -m "docs(antigravity): describe the always-on rule bootstrap" +``` + +--- + +### Task 5: Live acceptance on agy + +No repo changes. This is the end-to-end proof required by AGENTS.md's "New Harness Support" section. + +**Files:** none (scratch only). + +**Interfaces:** +- Consumes: the committed tree from Tasks 1–4. + +- [ ] **Step 1: Stage the committed tree and install it** + +Use the scratchpad directory (`$SCRATCH` below), never the repo: + +```bash +mkdir -p "$SCRATCH/accept/superpowers" +git archive HEAD | tar -x -C "$SCRATCH/accept/superpowers" +agy plugin install "$SCRATCH/accept/superpowers" +agy plugin list +``` + +Expected: install `[ok]`, skills processed, hooks skipped; `agy plugin list` shows `"source": "antigravity"`. + +- [ ] **Step 2: Run the acceptance prompt three times in fresh workspaces** + +For `n` in 1 2 3: + +```bash +mkdir -p "$SCRATCH/accept/ws$n" +cd "$SCRATCH/accept/ws$n" +agy -p "Let's make a react todo list" --output-format stream-json --print-timeout 240s > out.jsonl 2> err.txt +``` + +For each run, list the tool steps: + +```bash +python3 -I -c " +import json +for l in open('out.jsonl'): + e=json.loads(l); s=e.get('step_update') or {} + if s.get('state') in ('DONE','ERROR'): + p=(s.get('tool_info') or {}).get('parameters') or {} + print(s.get('step_index'), s.get('tool_name'), str(p.get('AbsolutePath') or p.get('TargetFile') or p.get('CommandLine') or '')[-90:]) + if e.get('event')=='result': print('RESULT:', e['result'].get('response','')[:600]) +" +``` + +Pass criteria for each run: a `view_file` of `.../skills/using-superpowers/SKILL.md` and of `.../skills/brainstorming/SKILL.md` occur before any `write_to_file` outside the agy `brain/` directory, and no project files (`package.json`, `*.jsx`, `*.tsx`) exist in the workspace afterward. Record each run's tool sequence and the final response. + +Also confirm `grep -c 'failed to parse hooks' ~/.gemini/antigravity-cli/cli.log` did not increase across the runs. + +- [ ] **Step 3: Uninstall** + +```bash +agy plugin uninstall superpowers +agy plugin list +``` + +Expected: `No imported plugins.` + +- [ ] **Step 4: Report** + +If any run fails, stop and report to Jesse with the tool sequence; do not change the rule without his approval. If all pass, save the three transcripts' tool sequences for the PR description. + +--- + +### Task 6: Porting guide (separate commit) + +**Files:** +- Modify: `docs/porting-to-a-new-harness.md` (lines ~295, ~520-534, ~681, ~690-705, index table ~797-810) + +**Interfaces:** none. + +- [ ] **Step 1: Routing table row (~line 295)** + +Replace: + +```markdown +| has a plugin install command and a manifest `contextFileName` (or equivalent) the installer keeps | C via the plugin installer | Antigravity (`.antigravity-plugin/` — `agy plugin install` ships a generated context file; verify the installer preserves it — Part 6) | +``` + +with: + +```markdown +| loads always-on rule files shipped inside a plugin | C via a plugin rule | Antigravity (`.antigravity-plugin/plugin.json` + `rules/AGENTS.md`, a one-line `@` pointer to `using-superpowers` — Part 6) | +``` + +- [ ] **Step 2: "No `Skill` tool" case (~lines 527-532)** + +Replace the paragraph beginning `**For the bootstrap itself, prefer a declared context file (Part 6).**` with: + +```markdown + **For the bootstrap itself, prefer something the harness loads every + session (Part 6).** That's a declared context file where the manifest has a + `contextFileName`-style field, or an always-on rule where the plugin format + has rules. Antigravity uses a rule: `rules/AGENTS.md` holds one line, + `@../skills/using-superpowers/SKILL.md`. agy rewrites a rule-relative `@` + path to the absolute install path but does not inline the file; the model + reads it with `view_file`. agy does not substitute `${PLUGIN_ROOT}` in rules. + Point at `using-superpowers`; never copy it into the rule. +``` + +- [ ] **Step 3: Distribution table row (~line 681)** + +Replace: + +```markdown +| Local installer (plugin install) | Antigravity (`agy`) | A small `install.sh` that runs the harness's own `agy plugin install` against a staging dir holding the manifest, the skills, and a generated `contextFileName` context file (the bootstrap). Everything arrives through the install mechanism — *not* by editing the user's config (see below). | +``` + +with: + +```markdown +| Git-URL plugin install + marketplace | Antigravity (`agy`) | Users run `agy plugin install https://github.com/obra/superpowers`. agy reads `.antigravity-plugin/plugin.json`, whose Marketplace fields (`displayName`, `logo`, `suggestedPrompts`, `version`, `author`) also drive the Antigravity Marketplace listing. Without that manifest, agy falls back to importing `gemini-extension.json`. | +``` + +- [ ] **Step 4: Installer-stripping section (~lines 690-705)** + +In the bullet beginning `**Ship a context file the manifest declares.**`, delete the sentences from `This is what` through `unrecognized.` (the `.antigravity-plugin/install.sh` / `ANTIGRAVITY.md` example), and replace them with: + +```markdown + **Verify with a marker** that the installer keeps the file and the + harness loads it: a file the manifest doesn't declare can be stripped as + unrecognized. +``` + +Immediately after that bullet, add a new bullet: + +```markdown + - **Or ship an always-on rule, if the plugin format has rules.** Antigravity + loads `rules/AGENTS.md` from an installed plugin every session; a one-line + `@` pointer there bootstraps `using-superpowers`. Run a marker test to + confirm what the harness does with `@` paths in rules — agy rewrites them + to absolute paths without inlining them. +``` + +- [ ] **Step 5: Harness index row (~line 799)** + +The table is alphabetical. Add this as the first data row, directly above `| Claude Code | ...`: + +```markdown +| Antigravity (`agy`) | `.antigravity-plugin/plugin.json` + `rules/AGENTS.md` | always-on plugin rule `@`-points at `using-superpowers` (no session-start hook event exists) | `references/antigravity-tools.md` | `tests/antigravity/` | `agy plugin install` git URL; Antigravity Marketplace | +``` + +- [ ] **Step 6: Check nothing else references the phantom files** + +Run: `grep -rn 'install.sh\|ANTIGRAVITY.md\|contextFileName' docs/porting-to-a-new-harness.md` +Expected: no remaining line ties `install.sh` or `ANTIGRAVITY.md` to Antigravity. Remaining `contextFileName` mentions must be generic or about Gemini. + +- [ ] **Step 7: Commit (on its own)** + +```bash +git add docs/porting-to-a-new-harness.md +git commit -m "docs(porting): describe Antigravity's rule bootstrap, drop phantom installer" +``` |
