Skip to content

[Idea] add native hook adaptation support for Antigravity target #3065

Description

@bravest-cat

What outcome do you need?

Summary

Currently, npx ecc-universal install --target antigravity maps rules (.agents/rules/), workflows (.agents/workflows/), skills (.agents/skills/), and agents (.agents/agents/). However, ECC's hook lifecycle (hooks/hooks.json / guardrails) is not adapted for Antigravity, relying solely on static rules/prompt constraints.

Antigravity natively supports an event-driven hook lifecycle engine. ECC should adapt and register equivalent hooks when running with --target antigravity.


Context & Antigravity Hook Capabilities

Antigravity supports structured workspace lifecycle hooks categorized into:

  • Inspect Hooks (read-only, async): Telemetry, audit trails, and execution observers (e.g., PostToolCallHook).
  • Decide Hooks (blocking, gating): Permission validation and pre-execution safety filters (e.g., PreToolCallDecideHook, PreTurnHook).
  • Transform Hooks (blocking, modifying): Intercepting errors or mutating inputs/outputs (e.g., OnToolErrorHook, OnInteractionHook).

Proposed Behavior

  1. Adapter Mapping:
    Update the installer script (in scripts/install.js and install.sh) to detect and translate compatible hooks from hooks/hooks.json (such as pre-commit validation, destructive command guards, or linter triggers) into Antigravity’s hook configuration schema.
  2. Lifecycle Management:
    Include hook registrations in .agents/ecc-install-state.json so that doctor.js, repair.js, and uninstall.js track and clean them up alongside rules and skills.

What do you do today?

No response

Which harness is affected?

Another harness

What would success look like?

Impact

  • Parity: Brings Antigravity users the same active guardrail and validation loop protections that Claude Code users get.
  • Safety: Eliminates reliance purely on LLM adherence to markdown rules for critical pre-execution checks (e.g., preventing forbidden bash commands or accidental file overwrites).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestneeds-triageNot yet reviewed or routed

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions