From 36fe1aa52e70acde2285cd802ab6377353daaf22 Mon Sep 17 00:00:00 2001 From: User Date: Sat, 20 Jun 2026 17:04:51 -0500 Subject: [PATCH 1/4] feat: Add Antigravity (agy) support --- bin/bmalph.js | 0 ralph/drivers/antigravity.sh | 94 ++++++++++++++++++++++++++++++++++++ src/cli.ts | 2 +- src/platform/antigravity.ts | 31 ++++++++++++ src/platform/registry.ts | 2 + src/platform/types.ts | 1 + 6 files changed, 129 insertions(+), 1 deletion(-) mode change 100644 => 100755 bin/bmalph.js create mode 100755 ralph/drivers/antigravity.sh create mode 100644 src/platform/antigravity.ts diff --git a/bin/bmalph.js b/bin/bmalph.js old mode 100644 new mode 100755 diff --git a/ralph/drivers/antigravity.sh b/ralph/drivers/antigravity.sh new file mode 100755 index 0000000..85662a9 --- /dev/null +++ b/ralph/drivers/antigravity.sh @@ -0,0 +1,94 @@ +#!/bin/bash +# Antigravity (agy) driver for Ralph + +driver_name() { + echo "antigravity" +} + +driver_display_name() { + echo "Antigravity (agy)" +} + +driver_cli_binary() { + echo "agy" +} + +driver_min_version() { + echo "0.1.0" +} + +driver_check_available() { + command -v "$(driver_cli_binary)" &>/dev/null +} + +driver_valid_tools() { + VALID_TOOL_PATTERNS=() +} + +driver_supports_tool_allowlist() { + return 1 +} + +driver_permission_denial_help() { + echo " - $DRIVER_DISPLAY_NAME uses its native permission and approval model." + echo " - Use 'agy --dangerously-skip-permissions' or configure toolPermission to 'always-proceed' in settings.json to run unattended loops." +} + +driver_build_command() { + local prompt_file=$1 + local loop_context=$2 + local session_id=$3 + + CLAUDE_CMD_ARGS=("$(driver_cli_binary)") + + if [[ ! -f "$prompt_file" ]]; then + echo "ERROR: Prompt file not found: $prompt_file" >&2 + return 1 + fi + + if [[ "$CLAUDE_USE_CONTINUE" == "true" && -n "$session_id" ]]; then + CLAUDE_CMD_ARGS+=("--conversation" "$session_id") + fi + + local prompt_content + prompt_content=$(cat "$prompt_file") + if [[ -n "$loop_context" ]]; then + prompt_content="$loop_context + +$prompt_content" + fi + + # Using --prompt since the user explicitly requested it in their prompt instructions. + # We could also use --print to run non-interactively if that is what Ralph needs. + # The prompt flag expects the string instruction. + CLAUDE_CMD_ARGS+=("--prompt" "$prompt_content") +} + +driver_supports_sessions() { + return 0 +} + +driver_supports_live_output() { + return 0 +} + +driver_prepare_live_command() { + LIVE_CMD_ARGS=("${CLAUDE_CMD_ARGS[@]}") +} + +driver_stream_filter() { + # If Antigravity doesn't output JSON, we just return empty string to pass raw stdout. + echo '.' +} + +driver_extract_session_id_from_output() { + # We might need to handle conversation ID extraction later, but for now + # this will rely on fallback session id or just pass + echo "" + return 1 +} + +driver_fallback_session_id() { + echo "" + return 1 +} diff --git a/src/cli.ts b/src/cli.ts index 8860b19..bbb9dc7 100644 --- a/src/cli.ts +++ b/src/cli.ts @@ -65,7 +65,7 @@ program .option("-d, --description ", "Project description") .option( "--platform ", - "Target platform (claude-code, codex, opencode, cursor, windsurf, copilot, aider)" + "Target platform (claude-code, codex, opencode, cursor, windsurf, copilot, aider, antigravity)" ) .option("--dry-run", "Preview changes without writing files") .action( diff --git a/src/platform/antigravity.ts b/src/platform/antigravity.ts new file mode 100644 index 0000000..5fe001b --- /dev/null +++ b/src/platform/antigravity.ts @@ -0,0 +1,31 @@ +import type { Platform } from "./types.js"; +import { buildPlatformDoctorChecks } from "./doctor-checks.js"; + +export const antigravityPlatform: Platform = { + id: "antigravity", + displayName: "Antigravity (agy)", + tier: "full", + instructionsFile: "AGENTS.md", // Standard file used by Antigravity rules + commandDelivery: { kind: "skills", dir: ".agents/skills", frontmatterName: "command" }, // Since it supports bmad skills via frontmatter + instructionsSectionMarker: "## BMAD-METHOD Integration", + generateInstructionsSnippet: () => ` +## BMAD-METHOD Integration + +Use bmalph to navigate phases. Use the available slash commands to discover all commands. + +### Available Agents + +| Command | Agent | Role | +|---------|-------|------| +| \`/analyst\` | Analyst | Research, briefs, discovery | +| \`/architect\` | Architect | Technical design, architecture | +| \`/pm\` | Product Manager | PRDs, epics, stories | +| \`/sm\` | Scrum Master | Sprint planning, status, coordination | +| \`/dev\` | Developer | Implementation, coding | +| \`/ux-designer\` | UX Designer | User experience, wireframes | +| \`/qa\` | QA Engineer | Test automation, quality assurance | +`, + getDoctorChecks() { + return buildPlatformDoctorChecks(this); + }, +}; diff --git a/src/platform/registry.ts b/src/platform/registry.ts index 2a29bbf..d0888dd 100644 --- a/src/platform/registry.ts +++ b/src/platform/registry.ts @@ -6,6 +6,7 @@ import { cursorPlatform } from "./cursor.js"; import { windsurfPlatform } from "./windsurf.js"; import { copilotPlatform } from "./copilot.js"; import { aiderPlatform } from "./aider.js"; +import { antigravityPlatform } from "./antigravity.js"; const PLATFORMS: ReadonlyMap = new Map([ ["claude-code", claudeCodePlatform], @@ -15,6 +16,7 @@ const PLATFORMS: ReadonlyMap = new Map([ ["windsurf", windsurfPlatform], ["copilot", copilotPlatform], ["aider", aiderPlatform], + ["antigravity", antigravityPlatform], ]); export function getPlatform(id: PlatformId): Platform { diff --git a/src/platform/types.ts b/src/platform/types.ts index b47c80e..1489c9b 100644 --- a/src/platform/types.ts +++ b/src/platform/types.ts @@ -14,6 +14,7 @@ export const PLATFORM_IDS = [ "windsurf", "copilot", "aider", + "antigravity", ] as const; export type PlatformId = (typeof PLATFORM_IDS)[number]; From 28a9f0095a8be5c5754123ab4535050b699d0317 Mon Sep 17 00:00:00 2001 From: User Date: Sat, 20 Jun 2026 17:07:57 -0500 Subject: [PATCH 2/4] fix: Add auto-detection for antigravity --- src/platform/detect.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/platform/detect.ts b/src/platform/detect.ts index 895a495..47f3e59 100644 --- a/src/platform/detect.ts +++ b/src/platform/detect.ts @@ -14,10 +14,11 @@ const STRONG_DETECTION_MARKERS: Array<{ platform: PlatformId; markers: string[] { platform: "windsurf", markers: [".windsurf"] }, { platform: "copilot", markers: [".github/copilot-instructions.md"] }, { platform: "aider", markers: [".aider.conf.yml"] }, + { platform: "antigravity", markers: [".agents"] }, ]; const ROOT_INSTRUCTION_MARKERS: Array<{ marker: string; candidates: PlatformId[] }> = [ - { marker: "AGENTS.md", candidates: ["codex", "opencode", "cursor"] }, + { marker: "AGENTS.md", candidates: ["codex", "opencode", "cursor", "antigravity"] }, { marker: "CLAUDE.md", candidates: ["claude-code", "cursor"] }, ]; From d046dc830152bca4861b2c2716e65a76084fc9bf Mon Sep 17 00:00:00 2001 From: User Date: Sat, 20 Jun 2026 17:13:28 -0500 Subject: [PATCH 3/4] chore: bump version and update changelog --- CHANGELOG.md | 7 ++++++- package-lock.json | 4 ++-- package.json | 2 +- tests/platform/registry.test.ts | 4 ++-- 4 files changed, 11 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1030014..7c8c4c5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,8 +5,13 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [2.11.0](https://github.com/LarsCowe/bmalph/compare/v2.10.0...v2.11.0) (2026-03-24) +## [Unreleased] + +### Features +* **platform:** add support for Google Antigravity (agy) agent + +## [2.11.0](https://github.com/LarsCowe/bmalph/compare/v2.10.0...v2.11.0) (2026-03-24) ### Features diff --git a/package-lock.json b/package-lock.json index 4d37a1e..70c8927 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "bmalph", - "version": "2.11.0", + "version": "2.12.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "bmalph", - "version": "2.11.0", + "version": "2.12.0", "license": "MIT", "dependencies": { "@inquirer/confirm": "^5.1.9", diff --git a/package.json b/package.json index 01fb105..7c651d4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "bmalph", - "version": "2.11.0", + "version": "2.12.0", "description": "Unified AI Development Framework - BMAD phases with Ralph execution loop", "type": "module", "bin": { diff --git a/tests/platform/registry.test.ts b/tests/platform/registry.test.ts index dc78a12..e757771 100644 --- a/tests/platform/registry.test.ts +++ b/tests/platform/registry.test.ts @@ -31,9 +31,9 @@ describe("registry", () => { }); describe("getAllPlatforms", () => { - it("returns array of 7 platforms", () => { + it("returns array of 8 platforms", () => { const platforms = getAllPlatforms(); - expect(platforms).toHaveLength(7); + expect(platforms).toHaveLength(8); }); }); From 1e770339792d07cc3923657c051689651ffe6a5a Mon Sep 17 00:00:00 2001 From: User Date: Fri, 26 Jun 2026 11:33:36 -0500 Subject: [PATCH 4/4] feat: update antigravity driver --- ralph/drivers/antigravity.sh | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/ralph/drivers/antigravity.sh b/ralph/drivers/antigravity.sh index 85662a9..1a29efe 100755 --- a/ralph/drivers/antigravity.sh +++ b/ralph/drivers/antigravity.sh @@ -31,7 +31,8 @@ driver_supports_tool_allowlist() { driver_permission_denial_help() { echo " - $DRIVER_DISPLAY_NAME uses its native permission and approval model." - echo " - Use 'agy --dangerously-skip-permissions' or configure toolPermission to 'always-proceed' in settings.json to run unattended loops." + echo " - Keep CLAUDE_PERMISSION_MODE=bypassPermissions in $RALPHRC_FILE for unattended loops." + echo " - Alternatively, configure toolPermission to 'always-proceed' in settings.json." } driver_build_command() { @@ -46,6 +47,11 @@ driver_build_command() { return 1 fi + local resolved_permission_mode="${CLAUDE_PERMISSION_MODE:-bypassPermissions}" + if [[ "$resolved_permission_mode" == "bypassPermissions" ]]; then + CLAUDE_CMD_ARGS+=("--dangerously-skip-permissions") + fi + if [[ "$CLAUDE_USE_CONTINUE" == "true" && -n "$session_id" ]]; then CLAUDE_CMD_ARGS+=("--conversation" "$session_id") fi @@ -58,10 +64,8 @@ driver_build_command() { $prompt_content" fi - # Using --prompt since the user explicitly requested it in their prompt instructions. - # We could also use --print to run non-interactively if that is what Ralph needs. - # The prompt flag expects the string instruction. - CLAUDE_CMD_ARGS+=("--prompt" "$prompt_content") + # Using --print to run non-interactively and print the response. + CLAUDE_CMD_ARGS+=("--print" "$prompt_content") } driver_supports_sessions() {