Skip to content

fix(antigravity): use .agent instead of .agents for Antigravity paths#704

Closed
gavy0037 wants to merge 99 commits into
Graphify-Labs:v4from
gavy0037:fix/antigravity-agent-path
Closed

fix(antigravity): use .agent instead of .agents for Antigravity paths#704
gavy0037 wants to merge 99 commits into
Graphify-Labs:v4from
gavy0037:fix/antigravity-agent-path

Conversation

@gavy0037

@gavy0037 gavy0037 commented May 4, 2026

Copy link
Copy Markdown

Problem

Google Antigravity reads configuration from .agent/ (no trailing 's'):

  • Rules: .agent/rules/
  • Workflows: .agent/workflows/
  • Skills: ~/.agent/skills/

The graphify antigravity install command was writing to .agents/ (with a trailing 's'), causing all files to be placed in directories that Antigravity never reads. This meant the integration silently failed — no rules loaded, no workflow registered, no skill found.

Fix

Changed all Antigravity-specific paths from .agents.agent:

Location Before After
_PLATFORM_CONFIG["antigravity"]["skill_dst"] ~/.agents/skills/graphify/SKILL.md ~/.agent/skills/graphify/SKILL.md
_ANTIGRAVITY_RULES_PATH .agents/rules/graphify.md .agent/rules/graphify.md
_ANTIGRAVITY_WORKFLOW_PATH .agents/workflows/graphify.md .agent/workflows/graphify.md
Workflow content ~/.agents/skills/... ~/.agent/skills/...
Help text .agents/rules .agent/rules

Other platforms that use .agents/ (Codex, Gemini Windows) are not affected — only the Antigravity-specific code paths were changed.

Testing

Ran graphify antigravity install after the fix — all files now land in the correct .agent/ directories and are picked up by Antigravity.

safishamsi and others added 30 commits April 23, 2026 19:49
…ink guard, label dedup, chunk-suffix prompt block
Adds a new `graphify tree` subcommand that emits a self-contained D3
v7 collapsible-tree HTML view of an existing graph.json.

Why
---
The existing `graph.html` (force-directed) is great for finding hubs
and unexpected connections.  But for code review and onboarding, a
hierarchical tree-of-modules view is much faster: you can collapse
everything and expand only the package you care about, the depth-
based colour palette gives instant orientation, and the layout
mirrors the on-disk structure.

UX choices include expand-all / collapse-all / reset-view buttons,
multi-line `wrapText` labels with separately-coloured name and count,
a depth-based palette, click-to-toggle subtrees, and a hover-inspector
that surfaces the top-K outbound edges per symbol.

Implementation
--------------
- `graphify/tree_html.py` (575 LOC, single file, no new runtime
  dependencies).  D3 v7 is loaded from cdn.jsdelivr.net at view time.
- Hierarchy is built from `source_file` longest-common-prefix;
  symbols are grouped by containing module so the tree mirrors the
  on-disk layout exactly.
- Inspector pre-computes top-K outbound edges per symbol so the page
  works fully offline once loaded.
- `__main__.py` adds the subcommand + help text after the
  `check-update` block.

Configuration
-------------
- `--graph PATH`     path to graph.json (default: graphify-out/graph.json)
- `--output HTML`    output path (default: graphify-out/GRAPH_TREE.html)
- `--root PATH`      filesystem root (default: LCP of source_files)
- `--max-children N` cap visible children per node (default: 200)
- `--top-k-edges N`  per-symbol outbound edges in inspector (default: 12)
- `--label NAME`     project label shown in the page header

Tested locally on a 17 641-node graph — emits a 4.9 MB HTML file
that renders smoothly in Firefox / Chromium.
html.escape() the values that land in <title> and <h1>, and replace </
with <\/ in the JSON embedded inside <script> so crafted graph labels
or --label values cannot break out. Mirrors the _js_safe() pattern in
export.py.

Reported by Qodo on PR Graphify-Labs#557.
…n hooksPath, fix gitignore inline comments, nosec on write sinks
…ontrols, desync guard, rationale prompt

- Graphify-Labs#550: _file_stem() includes parent dir to prevent node ID collisions for same-named files
- Graphify-Labs#555: extract() relativizes source_file paths before returning for cross-machine portability
- Graphify-Labs#562: to_json() returns bool; _rebuild_code() writes report/html only if json succeeded
- Graphify-Labs#563: skill prompts store rationale as node attribute, not separate node; enforce calls direction
- Graphify-Labs#566: Show All / Hide All buttons added to HTML community panel
- Graphify-Labs#575: _import_js() resolves tsconfig.json compilerOptions.paths aliases before external fallback

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds _dynamic_import_js() helper (65 lines) that detects import() call
expressions in JS/TS, resolves the module path (same logic as static
imports including .js→.ts mapping and tsconfig aliases), and emits
imports_from edges from the enclosing function. Hooked into walk_calls
for JS/TS configs.

Also adds tests/fixtures/dynamic_import.ts fixture and 5 new tests
in tests/test_languages.py (all passing alongside 110 existing tests).
import(`./handlers/${name}`) previously produced a garbage edge to a
path containing the unresolved ${name} expression. Now detects
template_substitution child nodes and breaks without emitting an edge.
Static template literals (no interpolation) still resolve correctly.

Adds 2 new tests: one asserting dynamic templates produce no edge,
one asserting static templates resolve like plain strings.
Grep and Glob tools removed in CC v2.1.117; searches now go through Bash.
Hook now reads stdin tool_input and pattern-matches on search commands.
Uninstall/reinstall handles both old and new matcher for clean upgrades.

Closes Graphify-Labs#578

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…raphify-Labs#582)

AST and semantic entries now write to cache/ast/ and cache/semantic/
respectively. Previously both used the flat cache/ dir causing semantic
results to overwrite AST entries for code files on mixed corpora, making
the shrink guard fire on every subsequent update run.

Migration: load_cached falls back to legacy flat cache/ for AST reads
so existing cache entries are not lost on upgrade.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Graphify-Labs#592)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… concept file_type (Graphify-Labs#601)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…sh escapes

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…e stats to 38k stars / 400k+ downloads / 1900+ waitlist

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
# Conflicts:
#	graphify/extract.py
safishamsi and others added 24 commits May 2, 2026 16:42
… on truncation

Co-Authored-By: Jason Matthew <jasonm4130@gmail.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ML view of graph.json

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…P query tool

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…phify-Labs#573 test)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…Linux/macOS

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…bs#658: cache dir crash, sanitize_label None, rationale file_type, token counting

Graphify-Labs#655 and Graphify-Labs#656 already fixed in cache.py and security.py.
Graphify-Labs#657: add rationale to file_type schema in all 12 skill variants; warn against inventing concept.
Graphify-Labs#658: add explicit chunk-merge step with token summation before save_semantic_cache.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…xecutor (1.66x speedup on 84 files)

Co-Authored-By: hanzala-sohrab <hanzala-sohrab@users.noreply.github.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…unsupported additionalContext

Codex Desktop rejects hookSpecificOutput.additionalContext on PreToolUse.
hook-check is now a no-op — graph guidance reaches the agent via AGENTS.md/skill.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…l time for VS Code extension on Windows

shutil.which() first; falls back to sys.executable sibling Scripts/graphify.exe
so the hook works even when venv/Scripts is not on Codex's PATH.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…y default

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…nore negation, Antigravity slash command, Gemini hook Windows

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ce GRAPH_REPORT.md first

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ase cohesion re-clustering

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ktrees, Antigravity install auto-updates rules/workflow

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Google Antigravity reads rules from .agent/, workflows from .agent/,
and skills from ~/.agent/. The installer was writing to .agents/
(with a trailing 's'), causing the files to be placed where
Antigravity never looks.

Changed all Antigravity-specific paths:
- .agents/rules/       -> .agent/rules/
- .agents/workflows/   -> .agent/workflows/
- ~/.agents/skills/    -> ~/.agent/skills/
- Workflow content referencing ~/.agents/skills/ -> ~/.agent/skills/
- Help text references
@safishamsi

Copy link
Copy Markdown
Collaborator

Fixed in v0.7.6

@safishamsi safishamsi closed this May 5, 2026
@mjjabarullah

Copy link
Copy Markdown
image @safishamsi

@duucck

duucck commented May 8, 2026

Copy link
Copy Markdown

need fix
@safishamsi

@gavy0037
gavy0037 deleted the fix/antigravity-agent-path branch May 21, 2026 13:19
@gavy0037

Copy link
Copy Markdown
Author

It was not working by default , like i used it as a local workflow and rule , but when i try to use it using '/' it doesn't come there autmatically

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.