$ show Joonghyun-Lee-Frieren/oh-my-antigravity
oh-my-antigravity (OmA) is an extension for Gemini CLI that adds a structured, role-driven multi-agent workflow layer on top of the base CLI. It transforms a single-session AI assistant into an orchestrated engineering pipeline with roles such as architect, planner, executor, reviewer, and verifier. The extension provides over 40 slash commands, 11 retained deep-work skills, 13 sub-agent definitions, and two shipped hooks (silent BeforeModel model router and AfterAgent learn-signal filter). The architecture is entirely extension-native, relying on Gemini CLI's extension manifest (`gemini-extension.json`), command definitions in TOML files, agent prompts in Markdown, and hook scripts in JavaScript. The primary data flow is user input → `/oma:*` command → staged pipeline (intent → workspace → team-assemble → team-plan → team-prd → team-exec → team-verify → team-fix → loop) with persistent state in `.omg/state/`. The codebase demonstrates strong engineering discipline with version consistency checks, skill metadata validation, atomic file writes, environment-variable-driven runtime controls, and thorough documentation. It is not a data research project; it is a workflow automation and context-engineering pack for an AI terminal agent.
The LLM identified 4 files worth highlighting for reuse:
A silent BeforeModel hook that routes outgoing model requests based on `.omg/state/model.json` without printing a per-request banner. It reads the model policy, detects the lane from hook input context, resolves the target model, and writes an optional trace file (`model-router-last.json`) when `OMG_MODEL_ROUTING_TRACE=1` is set. The hook is resilient: it handles missing files, invalid JSON, environment variable controls, and falls back to defaults. It can be disabled via `OMG_MODEL_ROUTING=off` or the `OMG_DISABLED_HOOKS` env var. This is a high-quality example of a safe, configurable, traceable model router that could be extracted and reused in other Gemini CLI extensions with minimal modification.
A safety-hardened AfterAgent learn-signal hook that decides whether to suggest `/oma:learn` after a session. It implements multiple safety layers: transcript deduplication via SHA-256 fingerprint, cross-session cooldown (configurable via `.omg/rules/learn.json`), informational-query filtering, delegation detection (skip worker/subagent turns unless `OMG_ALLOW_DELEGATED_HOOKS=1`), deep-interview lock suppression, atomic state writes via temp file + rename, and environment-controlled profile (`OMG_HOOK_PROFILE=minimal|balanced|strict`) and disable (`OMG_DISABLED_HOOKS=learn`). The state persists to `learn-watch.json` and the lock state is read from `deep-interview.json`. This is a robust, production-quality hook pattern that could be extracted and reused as a generic 'post-session nudge' component for any AI CLI extension.
A standalone Node.js script that validates frontmatter metadata in `skills/*/SKILL.md` files. It parses frontmatter blocks, checks for required keys (`name`, `description`), verifies that the `name` matches the directory name, and detects duplicate skill names across directories. The script is self-contained with zero external dependencies and can be run via `npm run test:skills`. It produces clear error output and exits with appropriate codes. This utility could be easily extracted and reused in any project that maintains Markdown files with YAML-style frontmatter, providing a simple CI gate for metadata consistency.
A minimal hook bootstrap script that safely imports and runs a target hook script. It resolves the target path, converts it to a file URL, and dynamically imports it as an ES module. The wrapper catches all errors and fails open, writing a default 'allow' decision to stdout so a broken hook never blocks the parent CLI flow. At just 20 lines, it demonstrates a clean, reusable pattern for decoupling hook configuration from hook implementation, and can be reused as a generic shim for any Gemini CLI extension that needs to load hook scripts dynamically.