Originally created by: kumaakh
Gemini CLI has native subagent support via .gemini/agents/*.md. This enables defining distinct pm, doer, and reviewer personas with isolated context windows, tool sets, and behavioral rules — selected by prefixing the dispatched prompt with @agent-name.
Current pain points with Gemini fleet members:
STOP instructions at verify checkpoints and continues executing tasks (observed in [#204] sprint — blew through V1–V5 without halting)send_files for remote members).gemini/agents/
├── pm-agent.md # Orchestrates only — no code writing, dispatches work via fleet tools
├── doer-agent.md # Executes tasks — stops at VERIFY, never self-continues past phase boundary
└── reviewer-agent.md # Read-only — writes feedback.md, never modifies source files
# Fleet PM sends:
execute_prompt(member, "@doer-agent\nT4 — compress batch 1...")
execute_prompt(member, "@reviewer-agent\nReview PR #204...")
No CLI flag needed. Gemini CLI routes to the named subagent automatically when @agent-name appears at the start of the prompt.
Does the pm skill become redundant? If Gemini members have a pm-agent persona, PM orchestration could move into the fleet skill itself with agent personas replacing the current pm skill structure. Or does the pm skill remain as the Claude-side orchestrator that dispatches Gemini members? Needs design thinking.
Remote member deployment: Unlike GEMINI.md (which is already sent via send_files before each dispatch), agent files need to land in .gemini/agents/ on the member. This is a one-time send_files per member rather than a true installation — PM can push agent files before first dispatch. But this adds a pre-flight step to the onboarding sequence.
Checkpoint enforcement: Will a well-crafted doer-agent.md with explicit STOP-at-VERIFY behavior actually halt the session? Needs validation — Gemini's tendency to continue may override even persona-level instructions.
Tool scoping per agent: Each agent .md can list allowed tools. This is a natural fit for reviewer (read-only) vs doer (full build/test/commit). Define the right tool profiles per role.
User-level vs project-level agents: ~/.gemini/agents/ is user-level (persists across repos), .gemini/agents/ is project-level (shipped with repo). For fleet members on remote machines, project-level + send_files is cleaner.