~/groundwork

Gemini CLI

Gemini CLI sessions start with your project's brief and save as you go.

In Gemini CLI, every session starts with the brief, and your work is saved after each response, before a compression and when the session closes. Type /gw to resume or save.

npx groundwork-ai init --adapter gemini     # or: npx groundwork-ai adapter add gemini

Start Gemini CLI in the project root. Gemini CLI asks you to accept project hooks, and asks again when one changes.

Google's docs say Gemini CLI stays available with paid API keys, and that Antigravity CLI replaced it for other users. Antigravity CLI has no adapter.

What happens when

WhenHookWhat happens
A session starts, resumes or is clearedSessionStartThe brief goes into the session
The agent finishes a responseAfterAgentA checkpoint. If the handoff is behind, Gemini CLI retries with a reminder to save, once per commit
Before a compressionPreCompressA checkpoint only. The summary is not told what to keep
The session endsSessionEndA last checkpoint, best effort: the CLI does not wait for it
You type /gwCommandResume from memory, or save

These hooks never block your work. After a compression nothing re-adds the brief, so AGENTS.md tells the agent to run npx groundwork-ai brief.

Files it writes

PathWhat it is
.gemini/settings.jsonThe hooks. Merged into your file, never replaced
.gemini/hooks/groundwork.mjsA small script that hands Groundwork's text to Gemini CLI in the form it expects
.gemini/commands/gw.tomlThe /gw command
GEMINI.mdImports AGENTS.md. An existing GEMINI.md keeps your text

With the optional flow on

init --flow or flow on adds:

AddedWhat it does
/gw-approve, /gw-rejectCommands you type
.gemini/agents/gw-*.mdTester, implementer and reviewer subagents
BeforeTool guardRuns the commit gate, protects Groundwork's own files, and runs your guards for shell commands, write_file and replace

What Gemini CLI does not enforce:

GapWhat it means
The guard is not fail-closedA guard that can't start lets the call through. MCP tools aren't checked
Approvals aren't bound to your messageThe commit gate can't tell that a human approved
The approval commands aren't human-onlyThe documentation doesn't say whether the model can run one
The reviewer isn't read-onlyIt has a shell to run the checks, and a shell can write

init --flow and flow on print this list.

Status

Built from Gemini CLI's documentation, read on 2026-11-15. Not yet run inside a live Gemini CLI session. Run npx groundwork-ai doctor after your first one.

On this page