claude_native/rules/
foundation_extra.rs1use crate::rules::*;
2use crate::scan::ProjectContext;
3
4pub struct AgentsMdExists;
7
8impl Rule for AgentsMdExists {
9 fn id(&self) -> &str { "1.8" }
10 fn name(&self) -> &str { "AGENTS.md exists (universal standard)" }
11 fn dimension(&self) -> Dimension { Dimension::Foundation }
12 fn severity(&self) -> Severity { Severity::Low }
13
14 fn check(&self, ctx: &ProjectContext) -> RuleResult {
15 if ctx.agents_md_content.is_some() {
16 self.pass()
17 } else {
18 self.warn(
19 "No AGENTS.md — the universal AI agent instruction standard",
20 Suggestion {
21 priority: SuggestionPriority::NiceToHave,
22 title: "Create AGENTS.md".into(),
23 description: "Run `claude-native --init` to generate AGENTS.md. Backed by Anthropic, OpenAI, Cursor, and Copilot.".into(),
24 effort: Effort::Minutes,
25 },
26 )
27 }
28 }
29}