MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / context_file_for_agent

Function context_file_for_agent

atomic-agent/src/learnings.rs:121–130  ·  view source on GitHub ↗

Returns the context file name for a given agent. Each agent reads a specific markdown file at session start for project context. Learnings are appended to this file so the agent reads them automatically on the next session. # Examples ```rust use atomic_agent::learnings::context_file_for_agent; assert_eq!(context_file_for_agent("claude-code"), "CLAUDE.md"); assert_eq!(context_file_for_agent("g

(agent_name: &str)

Source from the content-addressed store, hash-verified

119/// assert_eq!(context_file_for_agent("unknown"), ".atomic/learnings.md");
120/// ```
121pub fn context_file_for_agent(agent_name: &str) -> &'static str {
122 match agent_name {
123 "claude-code" => "CLAUDE.md",
124 "gemini-cli" => "GEMINI.md",
125 "codex" => "codex.md",
126 "opencode" => "opencode.md",
127 "kiro" => "AGENTS.md",
128 _ => ".atomic/learnings.md",
129 }
130}
131
132/// Returns the full path to the agent's context file in a repository.
133pub fn context_file_path(repo_root: &Path, agent_name: &str) -> PathBuf {

Callers 2

runMethod · 0.85
context_file_pathFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected