Skip to content

Phase 17: Antigravity Plugin Bundle Skeleton#3

Merged
ProfRandom92 merged 4 commits into
mainfrom
phase-17-antigravity-plugin-bundle
Jun 5, 2026
Merged

Phase 17: Antigravity Plugin Bundle Skeleton#3
ProfRandom92 merged 4 commits into
mainfrom
phase-17-antigravity-plugin-bundle

Conversation

@ProfRandom92
Copy link
Copy Markdown
Owner

Phase 17 Review-Gate PR.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request implements the skeleton command layer (ctxt antigravity) and local templates for the Antigravity plugin bundle (Phase 17). It introduces the antigravity command with subcommands for exporting, validating skills, auditing hooks, and packaging plugins, along with comprehensive templates and smoke tests. Feedback suggests simplifying the repetitive parsing logic for these subcommands in src/cli.rs and adding a target path argument to the ctxt verify command in the hooks template to ensure it runs successfully.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread src/cli.rs
Comment on lines +652 to +756
"antigravity" => {
if argv.len() < 2 {
return Err("missing subcommand for 'antigravity'. Usage: ctxt antigravity <export | skills validate | agents export | hooks audit | plugin package>".to_string());
}
let sub = argv[1].as_str();
match sub {
"export" => {
if argv.len() > 2 {
return Err(format!(
"unexpected argument '{}' for 'antigravity export'",
argv[2]
));
}
Ok(Command::Antigravity {
subcommand: "export".to_string(),
action: None,
})
}
"skills" => {
if argv.len() < 3 {
return Err("missing action for 'antigravity skills'. Usage: ctxt antigravity skills validate".to_string());
}
if argv[2] != "validate" {
return Err(format!(
"unsupported action '{}' for 'antigravity skills'",
argv[2]
));
}
if argv.len() > 3 {
return Err(format!(
"unexpected argument '{}' for 'antigravity skills validate'",
argv[3]
));
}
Ok(Command::Antigravity {
subcommand: "skills".to_string(),
action: Some("validate".to_string()),
})
}
"agents" => {
if argv.len() < 3 {
return Err("missing action for 'antigravity agents'. Usage: ctxt antigravity agents export".to_string());
}
if argv[2] != "export" {
return Err(format!(
"unsupported action '{}' for 'antigravity agents'",
argv[2]
));
}
if argv.len() > 3 {
return Err(format!(
"unexpected argument '{}' for 'antigravity agents export'",
argv[3]
));
}
Ok(Command::Antigravity {
subcommand: "agents".to_string(),
action: Some("export".to_string()),
})
}
"hooks" => {
if argv.len() < 3 {
return Err("missing action for 'antigravity hooks'. Usage: ctxt antigravity hooks audit".to_string());
}
if argv[2] != "audit" {
return Err(format!(
"unsupported action '{}' for 'antigravity hooks'",
argv[2]
));
}
if argv.len() > 3 {
return Err(format!(
"unexpected argument '{}' for 'antigravity hooks audit'",
argv[3]
));
}
Ok(Command::Antigravity {
subcommand: "hooks".to_string(),
action: Some("audit".to_string()),
})
}
"plugin" => {
if argv.len() < 3 {
return Err("missing action for 'antigravity plugin'. Usage: ctxt antigravity plugin package".to_string());
}
if argv[2] != "package" {
return Err(format!(
"unsupported action '{}' for 'antigravity plugin'",
argv[2]
));
}
if argv.len() > 3 {
return Err(format!(
"unexpected argument '{}' for 'antigravity plugin package'",
argv[3]
));
}
Ok(Command::Antigravity {
subcommand: "plugin".to_string(),
action: Some("package".to_string()),
})
}
other => Err(format!("unsupported antigravity subcommand '{}'", other)),
}
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The parsing logic for the antigravity subcommands (skills, agents, hooks, plugin) is highly repetitive and can be significantly simplified by grouping the subcommands that require a single specific action. This reduces code duplication, improves maintainability, and makes it easier to add new subcommands in the future.

        "antigravity" => {
            if argv.len() < 2 {
                return Err("missing subcommand for 'antigravity'. Usage: ctxt antigravity <export | skills validate | agents export | hooks audit | plugin package>".to_string());
            }
            let sub = argv[1].as_str();
            match sub {
                "export" => {
                    if argv.len() > 2 {
                        return Err(format!(
                            "unexpected argument '{}' for 'antigravity export'",
                            argv[2]
                        ));
                    }
                    Ok(Command::Antigravity {
                        subcommand: "export".to_string(),
                        action: None,
                    })
                }
                "skills" | "agents" | "hooks" | "plugin" => {
                    let expected_action = match sub {
                        "skills" => "validate",
                        "agents" => "export",
                        "hooks" => "audit",
                        "plugin" => "package",
                        _ => unreachable!(),
                    };
                    if argv.len() < 3 {
                        return Err(format!(
                            "missing action for 'antigravity {sub}'. Usage: ctxt antigravity {sub} {expected_action}"
                        ));
                    }
                    if argv[2] != expected_action {
                        return Err(format!(
                            "unsupported action '{}' for 'antigravity {sub}'",
                            argv[2]
                        ));
                    }
                    if argv.len() > 3 {
                        return Err(format!(
                            "unexpected argument '{}' for 'antigravity {sub} {expected_action}'",
                            argv[3]
                        ));
                    }
                    Ok(Command::Antigravity {
                        subcommand: sub.to_string(),
                        action: Some(expected_action.to_string()),
                    })
                }
                other => Err(format!("unsupported antigravity subcommand '{}'", other)),
            }
        }

Comment thread templates/antigravity/hooks/hooks.json Outdated
@ProfRandom92 ProfRandom92 merged commit 1bcda69 into main Jun 5, 2026
1 check passed
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.

1 participant