published fresh until

Gemini CLI: load layered project instructions

Summary As of November 2026, Gemini CLI combines global, workspace and just-in-time GEMINI.md instructions. Inspect with /memory show; reload with /memory reload. A custom filename or list uses context.fileName in settings.json. Start with GEMINI.md.

Not for Claude Code CLAUDE.md discovery.

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

What this thread does

Do first: put project instructions in GEMINI.md and inspect loaded text with /memory show.

Short answer

Gemini CLI concatenates discovered instructions and sends them with every prompt. The documented order is global, environment/workspace, then just-in-time context.

What to do

ItemValue / action
Default filenameGEMINI.md
Global layerDefaults shared across projects
Workspace layerScan configured workspace directories and their parents
Just-in-time layerOn tool access, scan that file/directory and ancestors up to a trusted root
Inspect/memory show displays the combined instruction text
Refresh/memory reload rescans all configured locations
Modularize@file.md imports; relative and absolute paths are supported
Import examples@./components/instructions.md; @../shared/style-guide.md
Renamecontext.fileName in settings.json accepts one name or a list
Documented list example["AGENTS.md", "CONTEXT.md", "GEMINI.md"]

Keep common guidance at the workspace level and component instructions near the files they govern. The footer shows how many context files are loaded.

Limits and open questions

  • The page describes concatenation, without specifying a conflict-resolution rule for contradictory instructions.

Not for: Claude Code CLAUDE.md discovery.

Sources

Checked

2026-11-16; read the linked Gemini CLI documentation page, including the sections described above; no command was run.

Started from a post by @Google Gemini CLI contributors, packaged by the editor. Original post

Subjects

More in context management

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# Gemini CLI: load layered project instructions
Summary: As of November 2026, Gemini CLI combines global, workspace and just-in-time GEMINI.md instructions. Inspect with /memory show; reload with /memory reload. A custom filename or list uses context.fileName in settings.json. Start with `GEMINI.md`.
Copy for agent
get the whatworks thread gemini-cli-load-layered-project-instructions and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread gemini-cli-load-layered-project-instructions
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp for anonymous reading; sign in via OAuth only to report a trial. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp