Skip to content

Commit f76184c

Browse files
author
Dattran
committed
feat(antigravity): hooks compat, pre-tool-use plan guard, bump 2.2.11 -> 2.2.12
1 parent 6c77a14 commit f76184c

8 files changed

Lines changed: 61 additions & 10 deletions

File tree

plugins/supergraph/.claude-plugin/marketplace.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "supergraph",
3-
"version": "2.2.11",
3+
"version": "2.2.12",
44
"graphProvider": "Codebase Memory",
55
"displayName": "Supergraph — Graph-Driven AI Workflows",
66
"tagline": "Evidence-gated coding workflows powered by Codebase Memory MCP.",

plugins/supergraph/.claude-plugin/plugin.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "supergraph",
3-
"version": "2.2.11",
3+
"version": "2.2.12",
44
"description": "Evidence-gated AI coding workflow: scan → analyze → plan → TDD → execute → fix → verify → review, powered by Codebase Memory MCP >= 0.9.0 with optional Serena LSP intelligence. Includes blast-radius planning, test/cycle gates, independent review, and Windows Git Bash hook auto-resolution.",
55
"author": {
66
"name": "datit309",

plugins/supergraph/.codex-plugin/plugin.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "supergraph",
3-
"version": "2.2.11",
3+
"version": "2.2.12",
44
"description": "Evidence-gated AI coding workflow: scan → analyze → plan → TDD → execute → fix → verify → review, powered by Codebase Memory MCP >= 0.9.0 with optional Serena LSP intelligence, blast-radius checks, and independent review.",
55
"author": {
66
"name": "datit309",

plugins/supergraph/CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# Changelog
22

3+
## 2.2.12 - 2026-09-04
4+
5+
### Changed
6+
7+
- **Antigravity hooks compat & enhancements**`plugins/supergraph/hooks.json` mở rộng matcher cho `PreToolUse``PostToolUse` bao gồm `write_file|edit_file|update_file|apply_patch` cùng với `write_to_file|replace_file_content`, `plugins/supergraph/hooks/pre-tool-use` bổ sung resolve workspace từ `workspacePaths` và kiểm tra trạng thái plan cho Antigravity (`is_antigravity`), `plugins/supergraph/install.sh` thêm symlink vào `~/.gemini/config/plugins/supergraph` để hỗ trợ cơ chế discovery của Antigravity
8+
- **Bump**`bump-version.sh` synced 4 manifests `2.2.11→2.2.12` (`.claude-plugin/plugin.json`, `marketplace.json`, `plugin.json`, `.codex-plugin/plugin.json`)
9+
310
## 2.2.11 - 2026-08-28
411

512
### Changed

plugins/supergraph/hooks.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
],
99
"PreToolUse": [
1010
{
11-
"matcher": "write_to_file|replace_file_content",
11+
"matcher": "write_to_file|replace_file_content|write_file|edit_file|update_file|apply_patch",
1212
"hooks": [
1313
{
1414
"type": "command",
@@ -28,7 +28,7 @@
2828
],
2929
"PostToolUse": [
3030
{
31-
"matcher": "write_to_file|replace_file_content",
31+
"matcher": "write_to_file|replace_file_content|write_file|edit_file|update_file|apply_patch",
3232
"hooks": [
3333
{
3434
"type": "command",

plugins/supergraph/hooks/pre-tool-use

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,39 @@ if ! printf '%s' "$file" | grep -qE '\.(py|js|ts|jsx|tsx|go|rs|java|php|dart|vue
3434
fi
3535

3636
if [ "$is_antigravity" = true ]; then
37-
printf '{"decision": "allow"}\n'
37+
# Resolve workspace for Antigravity (working dir is plugin root, not workspace)
38+
_ws=$(printf '%s' "$input" | python3 -c 'import sys,json; d=json.load(sys.stdin); ws=d.get("workspacePaths") or []; print(ws[0] if ws else "")' 2>/dev/null || echo "")
39+
if [ -n "$_ws" ]; then
40+
if [ -d "$_ws/docs/supergraph/plans" ]; then
41+
plan=$(ls "$_ws"/docs/supergraph/plans/*.md 2>/dev/null | head -1 || true)
42+
else
43+
plan=""
44+
fi
45+
# if workspace explicitly given but no plan there, do NOT fallback — respect workspace isolation
46+
else
47+
plan=$(ls docs/supergraph/plans/*.md 2>/dev/null | head -1 || true)
48+
if [ -z "$plan" ]; then
49+
_git_root=$(git rev-parse --show-toplevel 2>/dev/null || echo "")
50+
if [ -n "$_git_root" ]; then
51+
plan=$(ls "$_git_root"/docs/supergraph/plans/*.md 2>/dev/null | head -1 || true)
52+
fi
53+
fi
54+
fi
55+
if [ -z "$plan" ]; then
56+
_msg='⚠️ No plan file found. Fast path: <10 lines /1 file → use tdd directly. Otherwise run plan first.'
57+
printf '%s' "$_msg" | python3 -c 'import json,sys; print(json.dumps({"decision":"allow","reason":sys.stdin.read()}))'
58+
else
59+
if ! grep -q '^Review: Approved' "$plan" 2>/dev/null; then
60+
pending=$(grep -c '^Status: pending' "$plan" 2>/dev/null || true); pending=$(printf '%s' "$pending" | tr -d ' \n'); [ -z "$pending" ] && pending=0
61+
in_progress=$(grep -c '^Status: in_progress' "$plan" 2>/dev/null || true); in_progress=$(printf '%s' "$in_progress" | tr -d ' \n'); [ -z "$in_progress" ] && in_progress=0
62+
completed=$(grep -c '^Status: completed' "$plan" 2>/dev/null || true); completed=$(printf '%s' "$completed" | tr -d ' \n'); [ -z "$completed" ] && completed=0
63+
stuck=$(grep -c '^Status: stuck' "$plan" 2>/dev/null || true); stuck=$(printf '%s' "$stuck" | tr -d ' \n'); [ -z "$stuck" ] && stuck=0
64+
_msg="📋 Plan: $(basename "$plan") — completed=$completed pending=$pending in_progress=$in_progress stuck=$stuck — ⚠️ Plan review not approved yet. Run plan-reviewer."
65+
printf '%s' "$_msg" | python3 -c 'import json,sys; print(json.dumps({"decision":"allow","reason":sys.stdin.read()}))'
66+
else
67+
printf '{"decision": "allow"}\n'
68+
fi
69+
fi
3870
exit 0
3971
fi
4072

plugins/supergraph/install.sh

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ usage() {
99
'' \
1010
'Platforms:' \
1111
' claude -> ~/.claude/plugins/supergraph' \
12-
' antigravity -> ~/.gemini/antigravity-cli/plugins/supergraph' \
12+
' antigravity -> ~/.gemini/antigravity-cli/plugins/supergraph + ~/.gemini/config/plugins/supergraph' \
1313
' codex -> ./.codex-plugin' \
1414
' opencode -> ~/.config/opencode/skills/<skill>/ + ~/.config/opencode/plugins/supergraph.ts (skills + hooks, flat symlinks + opencode.json)' \
1515
' all -> install for all 4 platforms at once'
@@ -76,13 +76,17 @@ install_one() {
7676
_platform="$1"
7777
case "$_platform" in
7878
claude) _target="$HOME/.claude/plugins/supergraph" ;;
79-
antigravity) _target="$HOME/.gemini/antigravity-cli/plugins/supergraph" ;;
79+
antigravity) _target="$HOME/.gemini/antigravity-cli/plugins/supergraph"
80+
_target2="$HOME/.gemini/config/plugins/supergraph" ;;
8081
codex) _target="$PWD/.codex-plugin" ;;
8182
opencode) _target="${XDG_CONFIG_HOME:-$HOME/.config}/opencode/skills" ;;
8283
esac
8384
printf 'Platform: %s\n' "$_platform"
8485
printf 'Source: %s\n' "$source_dir"
8586
printf 'Target: %s\n' "$_target"
87+
if [ "$_platform" = "antigravity" ]; then
88+
printf 'Target2: %s\n' "$_target2"
89+
fi
8690
if [ "$dry_run" -eq 1 ]; then
8791
printf 'Dry run: no changes made\n'
8892
if [ "$_platform" = "opencode" ]; then
@@ -94,9 +98,17 @@ install_one() {
9498
return 0
9599
fi
96100
case "$_platform" in
97-
claude|antigravity)
101+
claude)
102+
mkdir -p "$(dirname "$_target")"
103+
link_path "$source_dir" "$_target"
104+
;;
105+
antigravity)
98106
mkdir -p "$(dirname "$_target")"
99107
link_path "$source_dir" "$_target"
108+
# Modern Antigravity also discovers plugins via ~/.gemini/config/plugins
109+
mkdir -p "$(dirname "$_target2")"
110+
link_path "$source_dir" "$_target2"
111+
printf 'Also linked: %s\n' "$_target2"
100112
;;
101113
codex)
102114
mkdir -p "$_target"

plugins/supergraph/plugin.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "supergraph",
3-
"version": "2.2.11",
3+
"version": "2.2.12",
44
"graphProvider": "Codebase Memory",
55
"description": "Supergraph is an evidence-gated AI coding workflow: scan → analyze → plan → TDD → execute → fix → verify → review. Codebase Memory MCP >= 0.9.0 provides local project indexing, blast radius, callers, cycles, test gaps, and architecture evidence; optional Serena adds LSP references and diagnostics. Windows hooks dynamically find system or user-level Git Bash and skip non-blockingly when it is unavailable.",
66
"author": {

0 commit comments

Comments
 (0)