antigravity-sdk-python icon indicating copy to clipboard operation
antigravity-sdk-python copied to clipboard

Adopt PkgDiet as the default AST dependency governance tool for Antigravity

Open om-tajne opened this issue 3 months ago • 2 comments

Problem Statement

As AI coding agents become more autonomous, they frequently hallucinate or install outdated, bloated, or unmaintained npm packages without human oversight. Relying solely on the LLM's training data for dependency resolution leads to polluted 'node_modules' and security vulnerabilities across Antigravity developer workspaces.

Proposed Solution

I propose bundling PkgDiet as a default, built-in MCP Server and Skill within the core Antigravity distribution. PkgDiet is an AST-based dependency governance CLI that evaluates the network cost, calculates tarball sizes, and determines if a package is actively maintained or legacy. It is already officially listed in the global Anthropic MCP Registry as an active server (io.github.om-tajne/pkgdiet).

If adopted:

  1. Antigravity agents will autonomously route any 'npm install' intent through PkgDiet first.
  2. The agent will read the machine-readable JSON health score.
  3. If the package is bloated or unmaintained, the agent will gracefully halt the installation and propose a modern alternative to the user.

Alternatives Considered

  1. Relying on standard 'npm audit': This only catches known CVEs, not bloated, abandoned, or deprecated packages.
  2. Regex parsing: This is error-prone. PkgDiet uses a full AST parser (@babel/parser) to guarantee accurate detection of unused dependencies before the agent installs them.

Additional Context

If the maintainer team is open to this architecture, I am prepared to submit a Pull Request. The PR will include the bundled 'mcp_config.json' entry for the Stdio transport and the progressive-disclosure 'SKILL.md' teaching the agent how to interpret the PkgDiet AST outputs.

om-tajne avatar Sep 02 '26 08:09 om-tajne

Thanks for the enhancement label! I'd love to submit the Pull Request for this myself.

Since Antigravity is so modular, could you point me to the exact directory or configuration file where you register default/built-in MCP servers and Skills? Once you point me to the right place, I'll open the PR immediately!

om-tajne avatar Sep 02 '26 10:09 om-tajne

Appreciate the energy but unfortunately we're not taking contributions in this repository. For more deets check out: https://github.com/google-antigravity/antigravity-sdk-python/blob/main/CONTRIBUTING.md

NTaylorMullen avatar Sep 02 '26 17:09 NTaylorMullen