pub enum AgentId {
ClaudeCode,
AgentsMd,
Cursor,
Aider,
Windsurf,
Copilot,
}Expand description
One of the agent toolchains repograph knows how to find rules for.
Serialized as a kebab-case string in TOML (claude-code, agents-md, …)
and JSON. Unknown IDs deserialize as a typed error via serde’s default
rejection of unknown enum variants.
Variants§
ClaudeCode
Anthropic’s Claude Code — CLAUDE.md at repo root.
AgentsMd
Cross-vendor AGENTS.md convention.
Cursor
Cursor — .cursor/rules/*.md and legacy .cursorrules.
Aider
Aider — CONVENTIONS.md.
Windsurf
Windsurf — .windsurfrules.
Copilot
GitHub Copilot — .github/copilot-instructions.md.
Implementations§
Source§impl AgentId
impl AgentId
Sourcepub const fn all() -> &'static [Self]
pub const fn all() -> &'static [Self]
All known agent IDs in the v1 registry, in display order.
Sourcepub const fn as_str(&self) -> &'static str
pub const fn as_str(&self) -> &'static str
The kebab-case identifier used in TOML / JSON / CLI flags.
Sourcepub const fn display_name(&self) -> &'static str
pub const fn display_name(&self) -> &'static str
A short human-readable label for UI rendering (cliclack option labels).
Sourcepub const fn file_patterns(&self) -> &'static [&'static str]
pub const fn file_patterns(&self) -> &'static [&'static str]
The glob-style file patterns this agent stores its rules at, relative to a repository’s root. Returned slice is always non-empty.
Sourcepub fn parse(s: &str) -> Result<Self, RepographError>
pub fn parse(s: &str) -> Result<Self, RepographError>
Parse a kebab-case agent ID string. Used by the --agents CLI flag.
§Errors
Returns RepographError::InvalidName with kind = "agent" when the
input is not one of the v1 registry entries. The error maps to exit
code 2 (usage error) per the documented contract.