Docs/Core concepts
System prompt & rules
Edit Gray's system prompt with /agentsmd, and let each repository's AGENTS.md or CLAUDE.md ride along with every turn.
Source: crates/gray/src/system_prompt.rs
The system prompt is a file you own: ~/.gray/AGENTS.md. Gray sends it verbatim minus HTML comments, so <!-- notes to self --> stay in the file and never reach the model. At runtime Gray appends the working directory.
$/agentsmd # open it in your editor (alias /sys)$/agentsmd show # print it$/agentsmd reset # restore the default
Project rules
Each turn, Gray looks upward from the working directory for the nearest AGENTS.md or CLAUDE.md and serves it as a <project_context> block. Project rules are part of the permanent prompt, not a tool result, so compaction never prunes them.
Installed foreign packages can contribute their own AGENTS.md the same way, and memory adds its snapshot after the prompt.
Join the Discord
Chat with the people building and running Gray. Show what you made with it.
Join Discord →