oh-my-antigravity (OmA)

repository·main·Indexed 41 days ago

https://github.com/joonghyun-lee-frieren/oh-my-antigravity

An extension-first context engineering and multi-agent workflow pack for the Gemini CLI and Antigravity CLI. Version 0.9.2 transforms single-session assistants into structured, role-driven engineering environments featuring a 5-layer Context Layer Model, dynamic team assembly, workspace and taskboard management, and a Model Router for optimized model selection.

Tokens
68.5K
Snippets
135
Records
228
Agent score
49%

What's inside OmA

  1. Overview of OmA Commands and Skills

    main

    The oh-my-antigravity (OmA) extension provides a comprehensive suite of slash commands and skills designed to manage complex, autonomous, or team-based development workflows.

    Commands

    Commands are used to trigger specific operational tasks, such as status summaries, diagnostics, HUD (Heads-Up Display) management, and workflow orchestration. Common patterns include:

    • Diagnostics & Setup: /oma:doctor for readiness checks, /oma:hooks-init for hook scaffolding, and /oma:deep-init for project mapping.
    • Workflow Control: /oma:team to execute a full stage pipeline, /oma:loop to force an exec -> verify -> fix cycle, and /oma:autopilot for iterative autonomous cycles.
    • State & Memory: /oma:memory to maintain indices, /oma:recall to retrieve past decisions, and /oma:checkpoint to save progress.
    • Configuration: /oma:mode to switch operating profiles (e.g., balanced, speed, deep), /oma:approval to set autonomy levels (suggest, auto, full-auto), and /oma:reasoning to adjust cognitive effort.

    Skills

    Skills are specialized functional primitives used for specific task types. Note that most skills are intentionally limited to a compact set to reduce metadata overhead.

    • $plan / $oma-plan: Converts goals into phase plans with milestones and risks.
    • $execute: Implements a scoped plan slice with change summaries.
    • $prd: Converts requirements into measurable acceptance criteria.
    • $research: Explores options and trade-offs.
    • $deep-dive: Performs discovery via trace-to-interview before planning.
    • $context-optimize: Improves context structure and signal-to-noise ratio.
  2. Overview of OmA core components and control surface

    main

    OmA is a multi-agent workflow package for Gemini CLI designed for complex tasks requiring a plan-execute-review loop.

    Core Components

    • Delivery Model: Official Gemini CLI extension (gemini-extension.json).
    • Main Blocks: GEMINI.md, agents/, commands/, skills/, and context/.
    • Control Surface: Primarily driven by slash commands (/oma:*) and 8 $skills for deep-work (including the oma-plan alias), with support for sub-agent delegation.
    • Model Strategy: Configurable via /oma:model. The balanced division uses pro, flash, and flash-lite aliases by default, with optional auto or custom overrides.

    Key Problem Solved

    OmA addresses the limitations of single-session raw flows by separating agents by role, providing explicit visibility into progress via workspace and taskboard, and handling denied tool calls as explicit approval/fallback events.

  3. Overview of OmA Core Components and Usage

    main

    OmA is a context-engineering-driven multi-agent workflow pack for Gemini CLI. It transforms Gemini CLI from a single-session assistant into a structured engineering workflow with separated roles.

    Core Structure

    • Core Files: GEMINI.md, agents/, commands/, skills/, context/
    • Primary Use Case: Complex implementation tasks requiring a plan -> execute -> review loop.
    • Interface: Controlled via /oma:* slash-commands, 8 deep-work $skills (including oma-plan alias), and sub-agent delegation.
    • Model Strategy: Configurable via /oma:model. The default balanced lane split uses pro / flash / flash-lite aliases, which can be overridden with auto or custom.
  4. Understand the OmA Context Layer Model

    main

    OmA uses a 5-layer Context Layer Model to manage information flow and maintain stability during long AI sessions. This model ensures that the agent stays aligned with platform constraints while maintaining focus on active tasks without being overwhelmed by raw history.

    LayerSourceGoal
    1System / runtime constraintsKeep behavior aligned with platform guarantees
    2Project standardsPreserve team conventions and architecture intent
    3Thin GEMINI.md, MEMORY.md, and shared contextMaintain stable long-session memory without carrying heavy procedure every turn
    4Active task brief + workspace/taskboard stateKeep current objective, active lanes, and acceptance criteria visible
    5Latest execution tracesFeed immediate iteration and review loops without replaying full raw history
  5. How the Learn Skill works as a SessionEnd hook

    main

    The learn skill operates as a SessionEnd hook, meaning it automatically triggers at the conclusion of an OmA session. The lifecycle follows these steps:

    1. Session Evaluation: The skill checks if the session meets the minimum message requirement (default is 10+ messages).
    2. Pattern Detection: The system scans for extractable patterns, specifically focusing on:
      • Common Error Resolutions: Recurring error fixes.
      • Environment Workarounds: Fixes for tool or framework quirks.
      • Style/Conventions: Project-specific rules.
      • Corrected Behaviors: Mistakes the agent should avoid.
    3. Skill Extraction: Useful patterns are saved as new rules in the .omg/rules/learned/ directory.
  6. Use Derived Signals for high-level orchestration

    main

    Derived signals are state-driven mappings that trigger based on patterns in Native Events. They allow you to implement higher-level logic (like detecting loops or stage transitions) without manually parsing every raw event.

    Common Derived Signals:

    • session-start: Triggered by SessionStart.
    • stage-transition: Triggered by AfterAgent (e.g., moving from plan to exec).
    • blocker-raised: Triggered by AfterAgent when a new blocker is identified.
    • agent-blocked: Triggered by AfterAgent when execution is paused.
    • agent-finished-early: Triggered by AfterAgent when a goal is completed before all tasks are exhausted.
    • pre-verify: Triggered by BeforeTool for critical validation.
    • post-verify: Triggered by AfterTool to confirm outcome.
    • checkpoint-save: Triggered by AfterTool when state is persisted.
    • blocker-repeat: Triggered by Notification or AfterAgent when the same blocker persists.
    • loop-stall: Triggered by Notification or AfterAgent when a loop fails to progress.
    • risk-spike: Triggered by Notification or AfterAgent on high failure density.
    • context-drift: Triggered by PreCompress when summary entropy is high.
    • token-burst: Triggered by AfterModel when token usage exceeds thresholds.
  7. Understand the OmA Project Structure

    main

    The OmA project structure organizes state, commands, and context as follows:

    oh-my-antigravity/
    |- GEMINI.md
    |- gemini-extension.json
    |- .omg/
    |  `- state/
    |     |- session-lock.json
    |     `- interviews/
    |     |  |- active.json
    |     |  `- [slug]/
    |     |     |- context.json
    |     |     `- prd.md
    |     `- sessions/
    |        `- [session-slug]/
    |           |- workspace.json
    |           |- taskboard.md
    |           |- workflow.md
    |           `- checkpoint.md
    |- agents/
    |- commands/
    |  `- omg/
    |- skills/
    |- context/
    |- docs/
    `- LICENSE

    Key directories:

    • .omg/state/: Stores session locks, interview contexts, and workspace/taskboard states.
    • agents/: Contains agent definitions.
    • commands/omg/: Contains OmA specific commands.
    • skills/: Contains reusable skills.
    • context/: Contains shared context files.
  8. How OmA extension boundaries and upgrades work

    main

    To ensure stability and avoid duplicate outputs or outdated behavior, follow these rules regarding the OmA extension boundary:

    • Installation/Updates: Always use gemini extensions ... in the terminal. Do not treat the copied command/skill folders as your primary runtime path.
    • Hook Registration: Ensure there is only one authoritative path for OmA hook registration per event. Mixing extension management hooks with manual duplicates can cause AfterAgent output duplication.
    • Troubleshooting Updates: If OmA appears outdated after an update, check gemini extensions list and perform a refresh or reinstall before manually editing any shipped files.
    • Preflight Check: For long-running or multi-lane tasks, use /oma:workspace audit as a default preflight check before running review, automation, or team-exec.
  9. Understand Shared Workflow State and Locking

    main

    OmA uses a single-writer lock mechanism to manage shared workflow and operating-profile state to prevent corruption during parallel tasks.

    • The Lock: .omg/state/session-lock.json acts as the single-writer lock for the project.
    • Orchestrator Role: Only the orchestration session holding the lock is permitted to write to shared files such as workspace.json, taskboard.md, workflow.md, checkpoint.md, mode.json, hud.json, approval.json, reasoning.json, hooks.json, and notify.json.
    • Parallel Sessions: Parallel top-level sessions that do not hold the lock should write to session-local drafts in .omg/state/sessions/[session-slug]/ and then return them to the orchestrator for merging.
    • Sub-agents: Delegated worker or sub-agent turns should remain 'read-mostly' and must not directly mutate shared workflow state.
  10. How OmA solves mono-session workflow problems

    main

    OmA addresses several limitations of standard single-session LLM workflows:

    ProblemOmA Solution
    Context mixing (planning vs execution)Separate agents with focused responsibilities
    Low visibility on long tasksExplicit steps and command-driven checks
    Parallel lane driftworkspace + taskboard maintain ownership and task IDs
    Tool call loops (refused calls)Refused actions become explicit approval/fallback events
    Interview interruptionslearn-signal hook suppresses nudges during deep-interviews
    Repetitive promptingOperational control via slash commands and retained skills ($plan, $execute, etc.)
    Decision driftIntegrated review/debugging roles within the orchestration loop
  11. Manage shared workflow state and session locks

    main

    OmA uses a structured state management system to prevent conflicts in multi-agent or parallel workflows.

    • Authoritative Writer Lock: .omg/state/session-lock.json acts as a lock. Only the orchestration session holding this lock is permitted to update shared files like workspace.json, taskboard.md, workflow.md, checkpoint.md, mode.json, hud.json, approval.json, reasoning.json, hooks.json, and notify.json.
    • Parallel Sessions: Parallel top-level sessions should not overwrite shared state. Instead, they should create session-local drafts under .omg/state/sessions/[session-slug]/ and pass them to the orchestrator for merging.
    • Delegated Workers: Sub-agents or delegated workers should not modify the shared workflow state directly.
  12. Manage Interview Session Storage in OmA

    main

    OmA manages /oma:interview session states within the .omg/state/interviews/[slug]/ directory rather than using a single shared interview file.

    • Tracking: The file .omg/state/interviews/active.json tracks the current interview.
    • Purpose: This structure allows for deterministic resume/status behavior and enables the distinction and archiving of multiple requirements discovery passes within the same project.